Skip to content

Commit

Permalink
fix test after class renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
novikov82 committed Jan 18, 2024
1 parent f5d3a50 commit 10a880b
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions playwright/my-surveys.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,23 @@ test("remember organization", async ({ page, browser }) => {
await page.goto(`${url}/service/mysurveys`);

await expect(await isOrganizationCookieExists()).toBeFalsy();
await expect(page.locator('.v2-class---my-surveys-page__choose-organization-button-text').filter({ hasText: personalSurveys })).toBeVisible();
await expect(page.locator('.v2-class---my-surveys-page__choose-organization-button-text').filter({ hasText: organizationSurveys })).toBeHidden();
await expect(page.locator('.v2-class---drop-down-button__selected-item-button-text').filter({ hasText: personalSurveys })).toBeVisible();
await expect(page.locator('.v2-class---drop-down-button__selected-item-button-text').filter({ hasText: organizationSurveys })).toBeHidden();

await page.locator('.v2-class---my-surveys-page__drop-down-button.v2-class---my-surveys-page__choose-organization').click();
await page.locator('.v2-class---drop-down-button.v2-class---drop-down-button__selected-item').click();
await expect(page.getByRole('link', { name: personalSurveys })).toBeVisible();
await expect(page.getByRole('link', { name: organizationSurveys })).toBeVisible();

await page.getByRole('link', { name: organizationSurveys }).click();
await expect(page.locator('.v2-class---my-surveys-page__choose-organization-button-text').filter({ hasText: personalSurveys })).toBeHidden();
await expect(page.locator('.v2-class---my-surveys-page__choose-organization-button .v2-class---drop-down-menu-item__text').filter({ hasText: personalSurveys })).toBeHidden();
await expect(page.locator('.v2-class---my-surveys-page__choose-organization-button .v2-class---drop-down-menu-item__text').filter({ hasText: organizationSurveys })).toBeVisible();
await expect(page.locator('.v2-class---drop-down-button__selected-item-button-text').filter({ hasText: personalSurveys })).toBeHidden();
await expect(page.locator('.v2-class---drop-down-button__selected-item-button .v2-class---drop-down-menu-item__text').filter({ hasText: personalSurveys })).toBeHidden();
await expect(page.locator('.v2-class---drop-down-button__selected-item-button .v2-class---drop-down-menu-item__text').filter({ hasText: organizationSurveys })).toBeVisible();
await expect(await isOrganizationCookieExists()).toBeTruthy();

await page.goto(`${url}/service/mysurveys`);
await expect(await isOrganizationCookieExists()).toBeTruthy();
await expect(page.locator('.v2-class---my-surveys-page__choose-organization-button-text').filter({ hasText: personalSurveys })).toBeHidden();
await expect(page.locator('.v2-class---my-surveys-page__choose-organization-button .v2-class---drop-down-menu-item__text').filter({ hasText: personalSurveys })).toBeHidden();
await expect(page.locator('.v2-class---my-surveys-page__choose-organization-button .v2-class---drop-down-menu-item__text').filter({ hasText: organizationSurveys })).toBeVisible();
await expect(page.locator('.v2-class---drop-down-button__selected-item-button-text').filter({ hasText: personalSurveys })).toBeHidden();
await expect(page.locator('.v2-class---drop-down-button__selected-item-button .v2-class---drop-down-menu-item__text').filter({ hasText: personalSurveys })).toBeHidden();
await expect(page.locator('.v2-class---drop-down-button__selected-item-button .v2-class---drop-down-menu-item__text').filter({ hasText: organizationSurveys })).toBeVisible();
});

0 comments on commit 10a880b

Please sign in to comment.