mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-12-24 05:58:31 +00:00
fix tour.spec (#22800)
(cherry picked from commit b136282db7ff53c4ecdc5a525a5b5b85cfef694e)
This commit is contained in:
parent
0d31300462
commit
0d35d56340
@ -14,6 +14,7 @@ import { expect, Page, test } from '@playwright/test';
|
||||
import { UserClass } from '../../support/user/UserClass';
|
||||
import { performAdminLogin } from '../../utils/admin';
|
||||
import { redirectToHomePage } from '../../utils/common';
|
||||
import { waitForAllLoadersToDisappear } from '../../utils/entity';
|
||||
|
||||
const user = new UserClass();
|
||||
|
||||
@ -132,6 +133,7 @@ test.describe('Tour should work properly', () => {
|
||||
test('Tour should work from help section', async ({ page }) => {
|
||||
await page.locator('[data-testid="help-icon"]').click();
|
||||
await page.getByRole('link', { name: 'Tour', exact: true }).click();
|
||||
await waitForAllLoadersToDisappear(page);
|
||||
await page.waitForURL('**/tour');
|
||||
|
||||
await page.waitForSelector('#feedWidgetData');
|
||||
@ -145,6 +147,7 @@ test.describe('Tour should work properly', () => {
|
||||
.locator('.whats-new-alert-close')
|
||||
.click();
|
||||
await page.getByText('Take a product tour to get started!').click();
|
||||
await waitForAllLoadersToDisappear(page);
|
||||
await page.waitForURL('**/tour');
|
||||
|
||||
await page.waitForSelector('#feedWidgetData');
|
||||
@ -154,6 +157,7 @@ test.describe('Tour should work properly', () => {
|
||||
|
||||
test('Tour should work from URL directly', async ({ page }) => {
|
||||
await page.goto('/tour');
|
||||
await waitForAllLoadersToDisappear(page);
|
||||
await page.waitForURL('**/tour');
|
||||
|
||||
await page.waitForSelector('#feedWidgetData');
|
||||
|
||||
@ -38,7 +38,7 @@ import {
|
||||
import { searchAndClickOnOption } from './explore';
|
||||
import { sidebarClick } from './sidebar';
|
||||
|
||||
const waitForAllLoadersToDisappear = async (page: Page) => {
|
||||
export const waitForAllLoadersToDisappear = async (page: Page) => {
|
||||
for (let attempt = 0; attempt < 3; attempt++) {
|
||||
const allLoaders = page.locator('[data-testid="loader"]');
|
||||
const count = await allLoaders.count();
|
||||
|
||||
@ -41,7 +41,7 @@ const TourPage = () => {
|
||||
updateIsTourOpen(true);
|
||||
|
||||
let attempts = 0;
|
||||
const maxAttempts = 10;
|
||||
const maxAttempts = 60;
|
||||
|
||||
const waitForElement = () => {
|
||||
const el = document.querySelector('#feedWidgetData');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user