Skip to content

test(e2e): add read-only and write collaborator ACL browser UI tests - #3979

Merged
jaegeral merged 2 commits into
google:masterfrom
jaegeral:2026-11-10_ui-e2e-tests-v2
Nov 11, 2026
Merged

jaegeral merged 2 commits into
google:masterfrom
jaegeral:2026-11-10_ui-e2e-tests-v2

Conversation

@jaegeral

Copy link
Copy Markdown
Collaborator

Summary: Multi-User ACL Browser UI E2E Tests

Extends UiEndToEndTest (end_to_end_tests/ui_test.py) with two multi-user Playwright browser tests ( user test vs. user: test2)

  • test_05_readonly_collaborator_cannot_modify_sketch: Shares an indexed sketch (sigma_events.csv) with test2 (read only), confirms test2 can view events in Explore while Add comment, Submit comment, and Delete sketch are hidden, exercises star, tag (suspicious), manual event creation, timeline deletion, sketch archiving, and timeline upload in Vuetify (confirming error snackbars), and checks via the API client that no state was modified.
  • test_06_write_collaborator_can_upload_annotate_and_add_event: Shares a new sketch with test2 via the Vuetify Share dialog (ShareCard.vue), logs in as test2 to upload sigma_events.csv, stars, tags (suspicious), and comments on an event, adds a manual event (AddManualEvent.vue), confirms Delete sketch remains hidden (delete=False), and checks via the API client that both timelines, all 5 events, and all annotations are persisted.

Key Decisions & Rationale

  • Vuetify UI actions + API client state checks (single ui_test.py file): Rather than splitting out a separate browser-helper module that re-implements timesketch_api_client, tests drive user interactions in Vuetify and check final backend persistence via self.api / self.user2_api.
  • Pure Vuetify DOM synchronization (no custom network listeners): Removed page.expect_response wrappers in favor of waiting on visible Vuetify DOM transitions ("Updated sharing", tag chips, rendered comments, modal dismissal, and .v-snack__wrapper.error snackbars on 403).
  • Ordered, self-explanatory test names (test_01_<behavior>–test_07_<behavior>): Kept numeric prefixes so inspect.getmembers() preserves the parallel Plaso pipeline order while giving every test and failure artifact a clear behavior name.
  • Scoped to end_to_end_tests/ui_test.py: Three minor frontend-ng state-cleanup issues uncovered by the tests (AddManualEvent.vue not dispatching updateSketch on 201, and UploadForm.vue / Sketch.vue not resetting loading state on 403) were logged as follow-up TODOs to keep this PR test-only.

Extend UiEndToEndTest with two multi-user Playwright browser tests (test_05_readonly_collaborator_cannot_modify_sketch and test_06_write_collaborator_can_upload_annotate_and_add_event) pipelined inside the background Plaso indexing window, and give all UI E2E test methods self-explanatory names.
@jaegeral jaegeral self-assigned this Nov 10, 2026
@jaegeral jaegeral added the github_actions Pull requests that update GitHub Actions code label Nov 10, 2026
@jaegeral
jaegeral force-pushed the 2026-11-10_ui-e2e-tests-v2 branch from dc2a3d7 to 0a772da Compare November 11, 2026 10:49
@jaegeral
jaegeral marked this pull request as ready for review November 11, 2026 11:16
@jaegeral
jaegeral requested a review from berggren November 11, 2026 11:16
@jaegeral
jaegeral merged commit 776dc01 into google:master Nov 11, 2026
15 checks passed
@jaegeral
jaegeral deleted the 2026-11-10_ui-e2e-tests-v2 branch November 12, 2026 10:11
jaegeral added a commit to jaegeral/timesketch that referenced this pull request Nov 24, 2026
…oogle#3979)

* test(e2e): add read-only and write collaborator ACL browser UI tests

Extend UiEndToEndTest with two multi-user Playwright browser tests (test_05_readonly_collaborator_cannot_modify_sketch and test_06_write_collaborator_can_upload_annotate_and_add_event) pipelined inside the background Plaso indexing window, and give all UI E2E test methods self-explanatory names.

* fix tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant