From 3f3e9b2b9ed716e1708ce8d0e271ed2d44affb03 Mon Sep 17 00:00:00 2001 From: Mark Phelps <209477+markphelps@users.noreply.github.com> Date: Mon, 13 May 2024 15:39:55 -0400 Subject: [PATCH] chore: use role selector in onboarding specs Signed-off-by: Mark Phelps <209477+markphelps@users.noreply.github.com> --- ui/tests/onboarding.spec.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/ui/tests/onboarding.spec.ts b/ui/tests/onboarding.spec.ts index 4d26f79659..b6c953d5fc 100644 --- a/ui/tests/onboarding.spec.ts +++ b/ui/tests/onboarding.spec.ts @@ -7,27 +7,29 @@ test.describe('Onboarding', () => { await expect(page.locator('h1')).toContainText('Onboarding'); await expect( - page.getByText('Get Started', { exact: true }) + page.getByRole('heading', { name: 'Get Started' }) ).toBeVisible(); await expect( - page.getByText('Introducing Flipt Hybrid Cloud', { exact: true }) + page.getByRole('heading', { name: 'Introducing Flipt Hybrid Cloud' }) ).toBeVisible(); await expect( - page.getByText('Try the CLI', { exact: true }) + page.getByRole('heading', { name: 'Try the CLI' }) ).toBeVisible(); await expect( - page.getByText('Checkout a Guide', { exact: true }) + page.getByRole('heading', { name: 'Checkout a Guide' }) ).toBeVisible(); await expect( - page.getByText('Integrate Your Application', { exact: true }) + page.getByRole('heading', { name: 'Integrate Your Application' }) ).toBeVisible(); await expect( - page.getByText('Join the Community', { exact: true }) + page.getByRole('heading', { name: 'Join the Community' }) ).toBeVisible(); await expect( - page.getByText('View API Reference', { exact: true }) + page.getByRole('heading', { name: 'View API Reference' }) + ).toBeVisible(); + await expect( + page.getByRole('heading', { name: 'Support Us' }) ).toBeVisible(); - await expect(page.getByText('Support Us', { exact: true })).toBeVisible(); await expect( page.getByRole('button', { name: 'Continue to Dashboard' }) ).toBeVisible();