Skip to content

Commit f41b23a

Browse files
authored
test: add test for terms of use before registration [WPB-24831] (#21156)
* test(registration): add test for terms of use before registration This commit implements TC-1621 to ensure users are properly informed about the terms of use when creating a personal account via the SSO login flow. The implemented scenario verifies: - Entering an unregistered email on the SSO sign-in page. - Navigating to the personal account registration page. - The visibility of the Terms of Use link. - Opening the link and validating the correct routing to the `/legal#terms` URL in a new tab. Refs: WPB-24831 * test(registration): refactor popup handling for terms of use test The test now uses `Promise.all` with `page.waitForEvent('popup')` instead of `context().waitForEvent('page')` to handle the new tab creation. Refs: WPB-24831
2 parents ad8c6fa + e482bdc commit f41b23a

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

apps/webapp/test/e2e_tests/specs/Registration/registration.spec.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,29 @@ test.describe('Registration', () => {
3232
addCreatedUser(userA);
3333
});
3434

35+
test(
36+
'I want to be informed about terms of personal account before registration',
37+
{tag: ['@TC-1621', '@regression']},
38+
async ({pageManager}) => {
39+
const newUser = getUser();
40+
const unregisteredEmail = newUser.email;
41+
42+
await pageManager.openMainPage();
43+
const {pages} = pageManager.webapp;
44+
45+
await goToPersonalRegistration(pageManager, unregisteredEmail);
46+
47+
await expect(pages.registration().termsLabel).toBeVisible();
48+
49+
const [newTab] = await Promise.all([
50+
pageManager.page.waitForEvent('popup'),
51+
pages.registration().termsLabel.click(),
52+
]);
53+
54+
await expect(newTab).toHaveURL(/legal#terms/);
55+
},
56+
);
57+
3558
test(
3659
'I want to be notified if the email address I entered during registration has already been registered',
3760
{tag: ['@TC-1623', '@TC-1640', '@regression']},

0 commit comments

Comments
 (0)