Repository navigation
feat: add expanded suite of tests - #3
Merged
Merged
Conversation
Permissions (assign + remove role) apply to both the standard UNC instance and the 21 CFR Part 11 instance. Tagging with both suites avoids a duplicate test file while giving full coverage. Co-Authored-By: Claude <noreply@anthropic.com>
Extends the template test with two previously uncovered checklist items: - Make Default: clicks the 'Make Default' anchor scoped to the target row, asserts the success banner - Clone: clicks the 'Copy' anchor, saves the pre-filled form, asserts the clone name appears in the table All actions are scoped to the timestamped template name so the test is safe to run alongside existing templates in the dataverse. Cleanup deletes only the two templates created by this run. Also tags the test @standard (in addition to @21cfr) since dataset templates are a standard-instance feature too. Co-Authored-By: Claude <noreply@anthropic.com>
Adds synthesised test data files covering every format the checklist exercises: sample-data.csv tabular data (5 rows, used for Data Explorer) demo-code.R R analysis script ro-crate-metadata.json RO-Crate 1.1 metadata document demo-document.pdf minimal valid PDF 1.4 demo-data.xlsx minimal valid XLSX (zipped XML, 3-column table) demo-archive.zip ZIP containing a readme and a CSV demo-double-archive.zip ZIP containing a nested ZIP demo-geo.zip ZIP containing a GeoJSON (NC Research Triangle) demo-data.dta Stata 118 format (minimal, 1 variable, 0 obs) demo-data.RData R serialisation format v2 XDR (NULL object) demo-data.sav SPSS SAV with correct magic bytes and terminator All files are generated from scratch with Python's stdlib; no external tools or licenses required. Co-Authored-By: Claude <noreply@anthropic.com>
Creates a timestamped guestbook with all four account-info fields required and a multiple-choice custom question (two options). Verifies the guestbook is created, downloads the all-responses CSV and asserts the filename is non-null, then deletes the guestbook. Column-level CSV verification is deferred — see backlog. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Data Explorer and File Previewer require a cloak function from a separate repository with a different suite config. Not testable against the current target instance until that integration is available. Co-Authored-By: Claude <noreply@anthropic.com>
- Scaffold tests/regression/ project with tsconfig.json
- Add regression-state.ts helper (persists template name and custom terms
to .regression-template-name and .regression-custom-terms)
- Implement dataset-creation-default-custom-license.spec.ts (22 steps):
* Create dataset template with unique timestamped name
* Populate Title, Author, Contact Email, Description, Subject
* Set Custom Dataset Terms license with All Rights Reserved ToU
* Make template the collection default
* Create new dataset and verify it inherits the template title
* Verify Terms tab shows Custom Dataset Terms and exact ToU text
* Unset the template default
- Register regression-{chromium,firefox,webkit} projects in playwright.config.ts
each depending on its own regression-setup-* auth project
- Add .regression-template-name and .regression-custom-terms to .gitignore
- 18-file-upload-formats.spec.ts — non-ingest formats (.csv, .zip, .pdf, .R, ro-crate-metadata.json); passing - 19-file-upload-tabular.spec.ts — tabular ingest formats (.dta, .RData, .sav, .xlsx); failing due to known ingest bug, test is intentionally kept as a regression detector - Both specs wait for filenames to appear in the staging area before saving, plus a 10s buffer for background ingest processing
…#81, #99, #100)
- 20-preview-url.spec.ts:
* Creates a fresh unpublished dataset
* Opens Edit Dataset -> Preview URL via stable IDs
* Creates General Preview URL, reads token from div.highlight span
* Navigates to preview URL and verifies Unpublished Dataset Preview
URL banner scoped to #messagePanel
* Disables URL via confirmation popup
* Verifies success message
- 21-dataset-citation-download.spec.ts:
* Creates its own unpublished dataset (fully self-contained)
* Verifies DOI https://doi.org/ is present in citation block
* Downloads EndNote XML, reads file content, asserts <?xml <records>
* Downloads RIS, reads file content, asserts TY - DATA and ER -
* Opens BibTeX in new tab, asserts @DaTa doi = { url = {
- secure_docs/TEST_COVERAGE.md: m
- 20-preview-url.spec.ts:
* Create
'
Qdr translation
There was a problem hiding this comment.
🟡 Changes recommended
Several newly added tests contain clear documentation/expectation mismatches and a test-only dependency is incorrectly scoped as a production dependency.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR expands the Playwright E2E coverage by adding a larger “standard” suite and introducing a new “regression” suite with cross-test state persistence, along with new test data artifacts and Playwright project configuration to run both suites.
Changes:
- Added multiple new
@standardPlaywright specs covering uploads, preview URLs, citation downloads, permissions, and guestbooks. - Introduced a
@regressionsuite (new specs + state helpers + tsconfig) and updated Playwright config to includetests/**. - Added new test-data assets (CSV, RO-Crate JSON, R script) and updated repo metadata (.gitignore, backlog, npm deps).
File summaries
| File | Description |
|---|---|
| tests/suite/test-data/sample-data.csv | Adds sample CSV used by upload-related tests. |
| tests/suite/test-data/ro-crate-metadata.json | Adds RO-Crate metadata sample for upload coverage. |
| tests/suite/test-data/demo-code.R | Adds a sample R script for upload coverage. |
| tests/suite/22-dataset-permissions.spec.ts | Adds dataset/file permissions management tests. |
| tests/suite/21-dataset-citation-download.spec.ts | Adds citation download coverage (EndNote/RIS/BibTeX). |
| tests/suite/20-preview-url.spec.ts | Adds coverage for preview URL create/verify/disable flow. |
| tests/suite/19-file-upload-tabular.spec.ts | Adds tabular ingest upload coverage for multiple formats. |
| tests/suite/18-file-upload-formats.spec.ts | Adds non-ingest (plus CSV) upload coverage in a single batch. |
| tests/suite/11-create-edit-metadata-template.spec.ts | Expands template test to cover default/clone and safer cleanup. |
| tests/suite/10-assign-user-group-roles.spec.ts | Extends tagging to include standard suite coverage. |
| tests/suite/07-guestbook.spec.ts | Adds guestbook create/download/delete coverage. |
| tests/regression/tsconfig.json | Adds regression-suite TypeScript configuration. |
| tests/regression/regression-state.ts | Adds file-based state persistence utilities for regression steps. |
| tests/regression/dataset-download-locally-fair.spec.ts | Adds regression test for locally FAIR dataverse download behavior. |
| tests/regression/dataset-creation-default-custom-license.spec.ts | Adds regression test for default template + custom license inheritance. |
| playwright.config.ts | Expands testDir and adds regression setup/suite projects per browser. |
| package.json | Adds Axe Playwright integration dependency. |
| package-lock.json | Locks newly added dependencies. |
| docs/backlog.md | Updates backlog with new follow-up items. |
| .gitignore | Ignores regression runtime state files. |
Review details
Suppressed comments (1)
tests/suite/18-file-upload-formats.spec.ts:94
- This comment refers to "9 files" and tabular ingestion, but the test uploads 5 files. The mismatch can confuse why the timeout is 60s.
// 9 files including tabular ingestion means the server takes longer to
// respond — extend the timeout well beyond the 5s default.
await expect(page.getByText("This dataset has been created.")).toBeVisible({
- Files reviewed: 18/28 changed files
- Comments generated: 5
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
35
to
37
| "dependencies": { | ||
| "@axe-core/playwright": "^4.13.0", | ||
| "dotenv": "^17.4.2" |
Comment on lines
+91
to
+92
| // Step 13: Template edited and saved confirmation | ||
| await expect(page.getByText("Template has been edited and saved.")).toBeVisible(); |
Comment on lines
+73
to
+75
| // Wait for every filename to appear in the upload staging area before | ||
| // saving — more reliable than a fixed timeout for 9 files with tabular | ||
| // ingestion (.dta, .RData, .sav, .xlsx, .csv). |
Comment on lines
+8
to
+10
| * Creates a new dataset, uploads the four tabular ingest formats one by one, | ||
| * and verifies each filename appears in the file table after save. | ||
| * |
Comment on lines
+7
to
+21
| * Standard Suite — Tests #72–#78 | ||
| * Translated from QDR `test_dataset_permissions.py`. | ||
| * | ||
| * Covers dataset-level permissions (permissions-manage.xhtml) and | ||
| * file-level permissions (permissions-manage-files.xhtml). | ||
| * | ||
| * Tests (in order): | ||
| * 1. Permissions page loads — Assign Roles button + table row visible #72–#73 | ||
| * 2. Assign Curator role to :authenticated-users #74 | ||
| * 3. Remove the Curator role #74 | ||
| * 4. File permissions page loads #75 | ||
| * 5. Grant file access to :authenticated-users; verify table row #76–#77 | ||
| * 6. Revoke file access; verify row gone #78 | ||
| * | ||
| * Selector reference: secure_docs/SELECTOR_MAP.md |
…o-reload regression
…or license dropdown
… standard deployment
…download link selector
…rict-mode violations
…ict mode violations
…ebKit compatibility
…oad detection on WebKit
…s-browser compatible
…wnload event not fired
ashmanda-cs
commented
Sep 17, 2026
ashmanda-cs
added a commit
to uncch-rdmc/dataverse-jsf-tests
that referenced
this pull request
Oct 7, 2026
feat: add expanded suite of tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Expands on the previous test suite with dozens of new tests for critical code paths.