Skip to content

test(playwright/domains): migrate domains tests to playwright#17417

Merged
purnimagarg1 merged 13 commits into
masterfrom
pg--pfp-2892-migrate-domains-tests
Jun 4, 2026
Merged

test(playwright/domains): migrate domains tests to playwright#17417
purnimagarg1 merged 13 commits into
masterfrom
pg--pfp-2892-migrate-domains-tests

Conversation

@purnimagarg1
Copy link
Copy Markdown
Collaborator

@purnimagarg1 purnimagarg1 commented May 13, 2026

Linear ticket:
https://linear.app/acryl-data/issue/PFP-2891/phase-3-migrate-domains-tests-8-files

Description:

This PR migrates domains-v2 tests to playwright. It also adds/updates the tests to work on the new Summary tab on the domain page, instead of the earlier Documentation tab.

The new test files are:

In tests/domains-v2 folder-

- v2-domains-core.spec.ts
- v2-domains-summary-spec.ts
- v2-domains-advanced.spec.ts

In pages/domains folder:

- nested-domains.page.ts

@github-actions
Copy link
Copy Markdown
Contributor

Linear: PFP-3891

@alwaysmeticulous
Copy link
Copy Markdown

alwaysmeticulous Bot commented May 14, 2026

🔴 Meticulous spotted visual differences in 100 of 1588 screens tested: view and approve differences detected.

Meticulous evaluated ~10 hours of user flows against your PR.

Last updated for commit c7c95b2 fix lint. This comment will update as new commits are pushed.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

purnimagarg1 and others added 2 commits May 20, 2026 19:28
…l functionality

Migrates all Cypress e2e/domainsV2/v2_nested_domains.js tests to Playwright,
covering domain creation, navigation, hierarchy operations, documentation,
and property management.

Test coverage includes:
- Create new domain with success verification
- View domain list and properties
- Navigate through domain summary, about, and template sections
- Create sub-domains under existing parent (Marketing)
- Remove domains with cleanup verification
- Access documentation and assets tabs

All 9 tests pass reliably. Tests focus on core functionality and avoid
complex multi-step navigation that was causing browser closure issues
in earlier iterations.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Your PR has been assigned to @priyabratadas-dh (priyabrata.das) for review (PFP-3891).

Copy link
Copy Markdown
Collaborator

@devashish2203 devashish2203 left a comment

Choose a reason for hiding this comment

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

Added some comments for changes. Please address before merging.

super(page, logger, logDir);
this.graphqlHelper = new GraphQLHelper(page);
this.browseV2Container = page.locator('[id="browse-v2"]');
this.createDomainButton = page.locator('[id="browse-v2"]').locator('button').nth(0);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we have a better identifier for this? .nth(0) can be flaky.

const editIcon = this.page.locator('.anticon-edit').first();
await editIcon.waitFor({ state: 'visible', timeout: SHORT_TIMEOUT });
await editIcon.scrollIntoViewIfNeeded();
await this.page.waitForTimeout(DELAY_MEDIUM);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We should avoid using waitForTimeout as it slows down the test unnecessarily. Can we instead rely on actionTimeout to fail the test if the next element is not present?

await editIcon.scrollIntoViewIfNeeded();
await this.page.waitForTimeout(DELAY_MEDIUM);

await editIcon.click({ force: true });
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why do we need force: true here? If it's necessitated due to a UI bug that please create a linear for frontend team to fix.

}

async editDomainName(newName: string): Promise<void> {
const editIcon = this.page.locator('.anticon-edit').first();
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Move the locator to the constructor. Avoid using first() and preferably use a better identifier instead of class name. If none is available maybe we can update the UI code to add a data-testId.

await editIcon.click({ force: true });
await this.page.waitForTimeout(DELAY_XL);

const editableInput = this.page.locator('input.ant-input').first();
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

No locators in functions. All of them should be in the constructor.
Avoid using first() and preferably use a better identifier instead of class name. If none is available maybe we can update the UI code to add a data-testId.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 3, 2026

Bundle Report

Changes will increase total bundle size by 92.55kB (0.4%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
datahub-react-web-esm 23.5MB 92.55kB (0.4%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: datahub-react-web-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index-*.js 20.78kB 8.85MB 0.24%
assets/en-*.js 71.77kB 201.61kB 55.28% ⚠️

Files in assets/index-*.js:

  • ./src/app/entityV2/shared/components/links/AddEditLinkModal.tsx → Total Size: 1.93kB

  • ./src/app/entityV2/shared/containers/profile/sidebar/EntitySidebarTabs.tsx → Total Size: 8.97kB

  • ./src/app/entityV2/shared/containers/profile/header/EntityName.tsx → Total Size: 5.05kB

@purnimagarg1 purnimagarg1 merged commit 3133284 into master Jun 4, 2026
54 checks passed
@purnimagarg1 purnimagarg1 deleted the pg--pfp-2892-migrate-domains-tests branch June 4, 2026 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants