Repository navigation
[2.0] Fix ContextCenterPermission and AuditLogs specs broken by the article-permission and Audit Logs backports - #38887
Conversation
…backports Two 2.0 backports changed the UI without updating these specs, so they fail on every 2.0 nightly. - ContextCenterPermission: #38821 (#38800) gates the article header on the article's own permission. The spec's article had no owner, and OrganizationPolicy-NoOwner-Rule lets any user set the owner of an unowned asset, so edit-owner-btn is now correctly shown to view-only and Data Consumer users. Give the article an owner (the admin) so the check is about EditOwners again, and open that article in the role-based tests instead of whichever article is first in the tree. - AuditLogs: #38687 (#38290) renders the change summary with data-testid="description-content" instead of the description-content class. Select it by test id, as main's spec already does.
|
Counterpart: open-metadata/openmetadata-collate#9006 backports the Collate SSO Test Login popup fix (#8624) to 2.0, which fixes the third failure on the same nightly (SSOTestLogin). |
…ator suppressions this change removed
Code Review ✅ Approved 🟢 Low riskThe changes only adjust Playwright fixtures, navigation, and a selector; production behavior remains unchanged, limiting impact to test coverage. Updates the ContextCenterPermission and AuditLogs Playwright specs to match the 2.0 UI changes: the owner-button test now uses an article with a known owner, and the audit log locator switches to VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Describe your changes:
Fixes the ContextCenterPermission and AuditLogs Playwright failures on the
2.0nightly (Collate AUT, 1.12.14 ➡ 2.0, MySQL and PostgreSQL). Two2.0backports changed the UI but not these specs. The UI is correct in both cases; the specs were stale.ContextCenterPermission (3 tests: view-only, ViewAll-only and Data Consumer users see
edit-owner-btn)OrganizationPolicy-NoOwner-RuleallowsEditOwnerson any asset with no owner (noOwner()), so the per-article permission isEditOwners: allowfor every user. The failing trace shows exactly that: resource-levelEditOwners: conditionalAllow, article-levelEditOwners: allow, articleowners: []. The server accepts that PATCH as well, so showing the button is correct.EditOwnersagain. The ViewAll-only and Data Consumer tests now open that article instead of whichever article is first in the hierarchy, which on an upgraded instance may or may not have an owner. That is also why the Data Consumer test failed on MySQL only.AuditLogs (
should display audit log entry in UI after entity creation)<Box data-testid="description-content">instead of<div className="description-content">. The spec still used.locator('.description-content'), which now matches nothing. The failing trace's DOM has 102data-testid="description-content"and no element with that class.getByTestId('description-content'), whichmain's spec already uses.Other branches.
main(#38818) and2.1(#38819) have the same article-header change and the same ContextCenterPermission spec, so they will fail the same way. I'll fix those in follow-up PRs. AuditLogs is already correct onmain.Counterpart. The third failure on this nightly,
SSOTestLogin, is a real Collate bug: Collate 2.0'sindex.tsxlacks the Test Login popup guard. Fixed by the Collate2.0backport PR linked in a comment below.Type of change:
High-level design:
N/A — test-only change, 2 files.
Tests:
Use cases covered
Unit tests
Not applicable (Playwright specs only).
Backend integration tests
Ingestion integration tests
Playwright (UI) tests
playwright/e2e/Features/ContextCenterPermission.spec.ts,playwright/e2e/Pages/AuditLogs.spec.tsprettierclean, andtsc --noEmit -p playwright/tsconfig.jsonreports no errors in either file.2.0nightly verifies them. ESLint was not run locally because the 2.0 config does not load with themainnode_modules I had; CIui-checkstylecovers it.Manual testing performed
OrganizationPolicy.jsonon2.0thatOrganizationPolicy-NoOwner-RulegrantsEditOwnersundernoOwner().edit-owner-btnthroughEditAll.UI screen recording / screenshots:
Not applicable (test-only change).
Checklist:
REVIEW.mdat 2e9a383. No 🔴 findings. Test map: both changed files are specs (they are their own tests).Fixes <issue-number>: <short explanation>— test fix, no issue (skip-pr-checks).🤖 Generated with Claude Code