Skip to content

test(playwright): grant Create to the test case import EditAll user - #37046

Merged
ShaileshParmar11 merged 2 commits into
mainfrom
claude/testcase-import-export-e2e-rca-e9b154
Nov 4, 2026
Merged

ShaileshParmar11 merged 2 commits into
mainfrom
claude/testcase-import-export-e2e-rca-e9b154

Conversation

@ShaileshParmar11

Copy link
Copy Markdown
Contributor

Describe your changes:

Fixes the TestCaseImportExportE2eFlow.spec.ts › EditAll User: Complete export-import-validate flow failure (MySQL and PostgreSQL, every attempt).

#36077 made a CSV import authorize each row as its REST write (ADR:2026-11-02-a-csv-import-authorizes-each-row-as-its-own-write). A test case row that creates a new test case now goes through TestCaseWriteAuthRequests.forCreate, which needs CreateTests on the table or Create on the testCase.

The spec's EditAll user had only ViewAll, ViewBasic and EditAll on testCase. The import refused the new "Complete" row with operations [Create] not allowed, so passed-row showed 1 instead of 2. The backend behaves as intended. This PR adds Create to the user's testCase rule. The later steps only update existing test cases, and EditAll already allows that.

#36077 never ran Playwright: PR CI skips it, and the PR has no merge-queue run.

Type of change:

  • Bug fix

High-level design:

N/A — small change.

Tests:

Use cases covered

  • A user with EditAll + Create on testCase exports test cases, imports the CSV with one complete row and three invalid rows, sees 2 passed / 3 failed, then updates and bulk-edits the rows.

Unit tests

Not applicable — Playwright spec change only.

Backend integration tests

Not applicable — no backend changes.

Ingestion integration tests

Not applicable — no ingestion changes.

Playwright (UI) tests

Ran against a local MySQL stack built from this branch (./docker/run_local_docker.sh -m ui -d mysql -i false, server revision 55a8fc70e3e, which includes #36077), with PLAYWRIGHT_IS_OSS=true and --retries=0:

Run Result
Spec without this change, EditAll test only 1 failed — passed-row expected "2", received "1" (importUtils.ts:953), the same failure as in CI
Spec with this change, both tests 5 passed (setup, Admin flow, EditAll flow, teardown) in 2.7m

ESLint on the spec: 0 errors. One existing no-restricted-syntax warning for browser.newPage() at line 55 is unrelated to this change. Prettier passes.

Manual testing performed

  1. Read the failed CI error context: the import grid showed the new row as Skip with Principal: CatalogPrincipal{...} operations [Create] not allowed.
  2. Reproduced that failure locally with the spec before this change, then confirmed the spec passes after it (table above).

UI screen recording:

Not applicable — test-only change.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation> — test fix, no issue (labelled skip-pr-checks).
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above — test fix, no issue.
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: N/A.
  • For a UI feature or feature task: N/A.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.
  • Self-review: I reviewed the final diff against REVIEW.md (the pr-checklist skill runs it) and fixed every 🔴 finding, or answered it on the line below.
    Reviewed 55a8fc70e3e: no 🔴 findings.
  • Decision check: no new decision; the change follows ADR:2026-11-02-a-csv-import-authorizes-each-row-as-its-own-write.

🤖 Generated with Claude Code

CSV imports now authorize each row as its REST write (#36077), so a new
test case row needs Create on testCase. The EditAll user's policy lacked
it, the import refused the new row, and the flow saw 1 passed row instead
of 2 on both MySQL and PostgreSQL.
@ShaileshParmar11 ShaileshParmar11 added the skip-pr-checks Bypass PR metadata validation check label Nov 4, 2026
@github-actions github-actions Bot added safe to test Add this label to run secure Github workflows on PRs UI UI specific issues labels Nov 4, 2026
@ShaileshParmar11
ShaileshParmar11 marked this pull request as ready for review November 4, 2026 14:04
@ShaileshParmar11
ShaileshParmar11 requested a review from a team as a code owner November 4, 2026 14:04
@ShaileshParmar11
ShaileshParmar11 requested review from shah-harshit and a balanced review from Copilot November 4, 2026 14:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@gitar-bot

gitar-bot Bot commented Nov 4, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

🟢 Low risk · Adding Create to the Playwright test user's testCase rule only adjusts test setup; it does not change production authorization behavior.

Grants the Create permission on testCase to the EditAll user in the test case import/export Playwright spec, so the complete row in the CSV import is authorized under the per-row write checks from #36077. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@ShaileshParmar11
ShaileshParmar11 enabled auto-merge (squash) November 4, 2026 14:10
@ShaileshParmar11
ShaileshParmar11 merged commit 4de49dd into main Nov 4, 2026
103 of 113 checks passed
@ShaileshParmar11
ShaileshParmar11 deleted the claude/testcase-import-export-e2e-rca-e9b154 branch November 4, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants