diff --git a/e2e/specs/onboarding-test.spec.ts b/e2e/specs/onboarding-test.spec.ts index 86c8119..0e7f0c0 100644 --- a/e2e/specs/onboarding-test.spec.ts +++ b/e2e/specs/onboarding-test.spec.ts @@ -18,7 +18,7 @@ test('Basic Walkthrough', async ({ page }) => { }); await test.step('Then I should see the tutorial modal', async () => { - await expect(page.getByText(/tutorials/i)).toBeVisible(); + await expect(page.getByRole('heading', { name: 'Tutorials' })).toBeVisible(); await expect( page.getByText(/find walkthroughs and video tutorials on some of the core features of openMRS./i), ).toBeVisible(); @@ -29,7 +29,6 @@ test('Basic Walkthrough', async ({ page }) => { }); await test.step('Then I should see the first Joyride tooltip', async () => { - await page.waitForSelector('#react-joyride-step-0 div', { state: 'visible' }); await expect( page.locator('#react-joyride-step-0 div').filter({ hasText: 'Welcome to OpenMRS!' }).first(), ).toBeVisible(); @@ -37,7 +36,6 @@ test('Basic Walkthrough', async ({ page }) => { }); await test.step('And I should see the search icon Joyride tooltip', async () => { - await page.waitForSelector('#react-joyride-step-1 div', { state: 'visible' }); await expect( page.locator('#react-joyride-step-1 div').filter({ hasText: 'This is the search icon' }).first(), ).toBeVisible(); @@ -45,7 +43,6 @@ test('Basic Walkthrough', async ({ page }) => { }); await test.step('Then I should see the add patient icon Joyride tooltip', async () => { - await page.waitForSelector('#react-joyride-step-2 div', { state: 'visible' }); await expect( page.locator('#react-joyride-step-2 div').filter({ hasText: 'This is the add patient icon' }).first(), ).toBeVisible(); @@ -53,13 +50,11 @@ test('Basic Walkthrough', async ({ page }) => { }); await test.step('And I should see the user icon Joyride tooltip', async () => { - await page.waitForSelector('#react-joyride-step-3 div', { state: 'visible' }); await expect(page.locator('#react-joyride-step-3 div').filter({ hasText: 'The user icon' }).first()).toBeVisible(); await page.locator('[data-test-id="button-primary"]').click(); }); await test.step('Then I should see the active visits Joyride tooltip', async () => { - await page.waitForSelector('#react-joyride-step-4 div', { state: 'visible' }); await expect( page.locator('#react-joyride-step-4 div').filter({ hasText: 'This table displays active visits' }).first(), ).toBeVisible(); @@ -67,7 +62,6 @@ test('Basic Walkthrough', async ({ page }) => { }); await test.step('And I should see the appointments table Joyride tooltip', async () => { - await page.waitForSelector('#react-joyride-step-5 div', { state: 'visible' }); await expect( page.locator('#react-joyride-step-5 div').filter({ hasText: 'This table shows appointments' }).first(), ).toBeVisible();