From 8d74ff832ee8206a7faf28f4904c5f0932d1976f Mon Sep 17 00:00:00 2001 From: Amanda Johnston <90629384+amandaejohnston@users.noreply.github.com> Date: Wed, 21 Sep 2022 14:59:57 -0500 Subject: [PATCH] test(fab-button): migrate tests to Playwright (#25988) Co-authored-by: Liam DeBeasi --- .../fab-button/test/a11y/fab-button.e2e.ts | 16 ++ .../fab-button/test/fab-button.spec.ts | 19 --- .../fab-button/test/standalone/e2e.ts | 10 -- .../fab-button/test/standalone/index.html | 142 ------------------ 4 files changed, 16 insertions(+), 171 deletions(-) create mode 100644 core/src/components/fab-button/test/a11y/fab-button.e2e.ts delete mode 100644 core/src/components/fab-button/test/fab-button.spec.ts delete mode 100644 core/src/components/fab-button/test/standalone/e2e.ts delete mode 100644 core/src/components/fab-button/test/standalone/index.html diff --git a/core/src/components/fab-button/test/a11y/fab-button.e2e.ts b/core/src/components/fab-button/test/a11y/fab-button.e2e.ts new file mode 100644 index 0000000000..3e1ed79514 --- /dev/null +++ b/core/src/components/fab-button/test/a11y/fab-button.e2e.ts @@ -0,0 +1,16 @@ +import { expect } from '@playwright/test'; +import { test } from '@utils/test/playwright'; + +test.describe('fab-button: aria attributes', () => { + test('should inherit aria attributes to inner button', async ({ page, skip }) => { + skip.rtl(); + skip.mode('ios'); + + await page.setContent(` + My Button + `); + + const nativeButton = page.locator('ion-fab-button button'); + await expect(nativeButton).toHaveAttribute('aria-label', 'Hello World'); + }); +}); diff --git a/core/src/components/fab-button/test/fab-button.spec.ts b/core/src/components/fab-button/test/fab-button.spec.ts deleted file mode 100644 index 930fcea9bc..0000000000 --- a/core/src/components/fab-button/test/fab-button.spec.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { newSpecPage } from '@stencil/core/testing'; - -import { FabButton } from '../fab-button'; - -describe('fab-button: aria attributes', () => { - it('should inherit aria attributes to inner