Skip to content

Commit

Permalink
Replace the joyride tooltip selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
Vijaykv5 committed Jul 30, 2024
1 parent fff13b0 commit 0152bbf
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions e2e/specs/onboarding-test.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,42 +29,32 @@ test('Basic Walkthrough', async ({ page }) => {
});

await test.step('Then I should see the first Joyride tooltip', async () => {
await expect(
page.locator('#react-joyride-step-0 div').filter({ hasText: 'Welcome to OpenMRS!' }).first(),
).toBeVisible();
await expect(page.locator('div').filter({ hasText: 'Welcome to OpenMRS!' }).nth(1)).toBeVisible();
await page.getByLabel('Next', { exact: true }).click();
});

await test.step('And I should see the search icon Joyride tooltip', async () => {
await expect(
page.locator('#react-joyride-step-1 div').filter({ hasText: 'This is the search icon' }).first(),
).toBeVisible();
await expect(page.locator('div').filter({ hasText: 'This is the search icon.' }).nth(1)).toBeVisible();
await page.getByLabel('Next', { exact: true }).click();
});

await test.step('Then I should see the add patient icon Joyride tooltip', async () => {
await expect(
page.locator('#react-joyride-step-2 div').filter({ hasText: 'This is the add patient icon' }).first(),
).toBeVisible();
await expect(page.locator('div').filter({ hasText: 'This is the add patient' }).nth(1)).toBeVisible();
await page.getByLabel('Next', { exact: true }).click();
});

await test.step('And I should see the user icon Joyride tooltip', async () => {
await expect(page.locator('#react-joyride-step-3 div').filter({ hasText: 'The user icon' }).first()).toBeVisible();
await expect(page.locator('div').filter({ hasText: 'The user icon' }).nth(1)).toBeVisible();
await page.getByLabel('Next', { exact: true }).click();
});

await test.step('Then I should see the active visits Joyride tooltip', async () => {
await expect(
page.locator('#react-joyride-step-4 div').filter({ hasText: 'This table displays active visits' }).first(),
).toBeVisible();
await expect(page.locator('div').filter({ hasText: 'This table displays active visits' }).nth(1)).toBeVisible();
await page.getByLabel('Next', { exact: true }).click();
});

await test.step('And I should see the appointments table Joyride tooltip', async () => {
await expect(
page.locator('#react-joyride-step-5 div').filter({ hasText: 'This table shows appointments' }).first(),
).toBeVisible();
await expect(page.locator('div').filter({ hasText: 'This table shows appointments' }).nth(1)).toBeVisible();
await page.getByLabel('Last').click();
});
});

0 comments on commit 0152bbf

Please sign in to comment.