E2E Test Scenarios¶
Auto-generated
This page is automatically generated from test docstrings.
Run mkdocs serve or mkdocs build to update.
Total: 48 tests across 5 scenarios
Alice's Workflow¶
Source: test_scenario_alice.py
| Test | Scenario | Given | When | Then |
|---|---|---|---|---|
test_alice_health_check |
Verify Alice can access the application. | - | - | - |
test_alice_creates_project_folder |
Alice creates a folder for her project | Alice is authenticated | Alice creates a new folder | Folder is created successfully |
test_alice_creates_private_document |
Alice creates a private document | Alice is authenticated | Alice creates a private document | Document is created and not public |
test_alice_creates_public_announcement |
Alice creates a public announcement | Alice is authenticated | Alice creates a public document | Document is accessible to everyone |
test_alice_lists_her_documents |
Alice views her document list | Alice has created multiple documents | Alice requests her documents | All her documents are returned |
test_alice_updates_document_content |
Alice updates a document | Alice owns a document | Alice updates the content | Document is updated successfully |
test_alice_creates_document_in_folder |
Alice organizes documents into folders | Alice has a folder | Alice creates a document in that folder | Document is associated with the folder |
test_alice_shares_document_with_bob |
Alice shares a document with Bob (read permission) | Alice owns a document | Alice shares it with Bob for reading | Share is created successfully |
test_alice_shares_document_with_write_permission |
Alice grants write permission | Alice owns a document | Alice shares with write permission | Collaborator can edit the document |
test_alice_views_document_shares |
Alice checks who has access to her document | Alice has shared a document | Alice views document shares | All shares are listed |
test_alice_creates_nested_folder_structure |
Alice creates hierarchical folder structure | Alice wants to organize documents | Alice creates parent and child folders | Folder hierarchy is created |
test_alice_deletes_her_document |
Alice deletes a document she no longer needs | Alice owns a document | Alice deletes it | Document is removed |
test_alice_complete_project_workflow |
Alice's complete project management workflow | Alice starts a new project | Alice creates structure, documents, and shares | Complete project setup is successful |
Authorization Failures¶
Source: test_scenario_authorization_failures.py
| Test | Scenario | Given | When | Then |
|---|---|---|---|---|
test_bob_cannot_read_alice_private_document |
Bob attempts to read Alice's private document | Alice has a private document | Bob tries to read it | Access is denied (403 or 404) |
test_bob_cannot_update_alice_document |
Bob attempts to update Alice's document | Alice owns a document | Bob tries to update it | Update is denied |
test_bob_cannot_delete_alice_document |
Bob attempts to delete Alice's document | Alice owns a document | Bob tries to delete it | Deletion is denied |
test_bob_cannot_share_alice_document |
Bob attempts to share Alice's document | Alice owns a document | Bob tries to share it with Charlie | Share is denied |
test_bob_cannot_delete_alice_folder |
Bob attempts to delete Alice's folder | Alice owns a folder | Bob tries to delete it | Deletion is denied |
test_bob_cannot_modify_alice_folder |
Bob attempts to rename Alice's folder | Alice owns a folder | Bob tries to rename it | Update is denied |
test_bob_cannot_delete_shared_document_with_read_permission |
Bob has read permission but tries to delete | Alice shared document with Bob (read-only) | Bob tries to delete the document | Deletion is denied |
test_bob_lists_only_accessible_documents |
Bob lists documents, sees only what he can access | Alice has private documents | Bob lists documents | Bob only sees his own and public documents |
test_complete_authorization_denial_workflow |
Comprehensive authorization denial test | Alice owns resources | Bob attempts unauthorized operations | All operations are denied |
Bob's Workflow¶
Source: test_scenario_bob.py
| Test | Scenario | Given | When | Then |
|---|---|---|---|---|
test_bob_health_check |
Verify Bob can access the application. | - | - | - |
test_bob_creates_own_document |
Bob creates his own document | Bob is authenticated | Bob creates a document | Document is created and owned by Bob |
test_bob_reads_own_document |
Bob reads his own document | Bob has created a document | Bob requests to read it | Document content is returned |
test_bob_updates_own_document |
Bob updates his document | Bob owns a document | Bob updates it | Update succeeds |
test_bob_deletes_own_document |
Bob deletes his document | Bob owns a document | Bob deletes it | Deletion succeeds |
test_bob_creates_folder |
Bob organizes with folders | Bob is authenticated | Bob creates a folder | Folder is created |
test_bob_lists_his_documents |
Bob views his document list | Bob has documents | Bob lists documents | His documents and public documents are visible |
test_bob_lists_his_folders |
Bob views his folders | Bob has folders | Bob lists folders | Only his folders are visible |
test_bob_complete_workflow |
Bob's typical day workflow | Bob starts his workday | Bob performs typical tasks | All operations succeed |
Public Documents¶
Source: test_scenario_public_documents.py
| Test | Scenario | Given | When | Then |
|---|---|---|---|---|
test_alice_creates_public_document |
Alice creates a public document | Alice wants to share information | Alice creates document with is_public=True | Document is marked as public |
test_bob_reads_public_document |
Bob reads Alice's public document | Alice has created a public document | Bob requests to read it | Bob can access the document |
test_public_documents_in_list |
Public documents appear in everyone's list | Alice creates a public document | Bob lists documents | Alice's public document appears in Bob's list |
test_bob_cannot_modify_alice_public_document |
Bob cannot modify Alice's public document | Alice has a public document | Bob tries to update it | Update is denied |
test_bob_cannot_delete_alice_public_document |
Bob cannot delete Alice's public document | Alice has a public document | Bob tries to delete it | Deletion is denied |
test_alice_makes_private_document_public |
Alice changes private document to public | Alice has a private document | Alice updates it to be public | Document becomes publicly accessible |
test_alice_makes_public_document_private |
Alice changes public document to private | Alice has a public document | Alice updates it to be private | Document is no longer publicly accessible |
test_multiple_users_create_public_documents |
Multiple users create public documents | Both Alice and Bob are authenticated | Both create public documents | Both can see each other's public documents |
test_complete_public_document_workflow |
Complete public document lifecycle | Alice manages public communications | Complete workflow is executed | Public access works correctly |
Document Sharing¶
Source: test_scenario_sharing.py
| Test | Scenario | Given | When | Then |
|---|---|---|---|---|
test_alice_shares_document_bob_reads |
Alice shares document, Bob reads it | Alice creates a document | Alice shares it with Bob (read permission) | Bob can read but not write the document |
test_alice_shares_with_write_bob_edits |
Alice grants write permission | Alice creates a document | Alice shares with write permission | Bob can read and write the document |
test_alice_views_document_shares |
Alice checks who has access | Alice has shared a document | Alice lists shares for the document | All shares are displayed |
test_share_with_multiple_users |
Document shared with multiple users | Alice creates a document | Alice shares with Bob and Charlie | Both can access based on their permissions |
test_cannot_share_same_document_twice |
Prevent duplicate shares | Alice has shared document with Bob | Alice tries to share same document with Bob again | Conflict error is returned |
test_share_nonexistent_document |
Cannot share document that doesn't exist | Alice tries to share | Document ID is invalid | 404 error is returned |
test_share_with_nonexistent_user |
Cannot share with user that doesn't exist | Alice creates document | Alice tries to share with invalid user | 404 error is returned |
test_complete_sharing_workflow |
Complete document sharing lifecycle | Alice and Bob collaborate | Full sharing workflow is executed | All operations succeed in correct order |