diff --git a/core/src/components/radio-group/test/e2e.ts b/core/src/components/radio-group/test/e2e.ts deleted file mode 100644 index 8366128e94..0000000000 --- a/core/src/components/radio-group/test/e2e.ts +++ /dev/null @@ -1,88 +0,0 @@ -import { newE2EPage } from '@stencil/core/testing'; - -/** - * @param page the E2E page that contains the radio button - * @param radioButtonId the id of the radio button to focus - * @returns the checked property of the focused radio button - */ -const selectRadio = async (page, radioButtonId: string, selectionMethod: 'keyboard' | 'mouse'): Promise => { - const selector = `ion-radio#${radioButtonId}`; - if (selectionMethod === 'keyboard') { - await page.focus(selector); - await page.keyboard.press('Space'); - } else if (selectionMethod === 'mouse') { - await page.click(selector); - } - - await page.waitForChanges(); - - const radioGroup = await page.find(`ion-radio#${radioButtonId} >>> input`); - const checked = await radioGroup.getProperty('checked'); - return checked; -}; - -describe('radio-group', () => { - it('Spacebar should not deselect without allowEmptySelection', async () => { - const page = await newE2EPage(); - await page.setContent(` - - - One - - - - `); - - const checked = await selectRadio(page, 'one', 'keyboard'); - - expect(checked).toBe(true); - }); - - it('Spacebar should deselect with allowEmptySelection', async () => { - const page = await newE2EPage(); - await page.setContent(` - - - One - - - - `); - - const checked = await selectRadio(page, 'one', 'keyboard'); - - expect(checked).toBe(false); - }); - - it('Click should not deselect without allowEmptySelection', async () => { - const page = await newE2EPage(); - await page.setContent(` - - - One - - - - `); - - const checked = await selectRadio(page, 'one', 'mouse'); - - expect(checked).toBe(true); - }); - - it('Click should deselect with allowEmptySelection', async () => { - const page = await newE2EPage(); - await page.setContent(` - - - One - - - - `); - - const checked = await selectRadio(page, 'one', 'mouse'); - - expect(checked).toBe(false); - }); -}); diff --git a/core/src/components/radio-group/test/radio-group.e2e.ts b/core/src/components/radio-group/test/radio-group.e2e.ts new file mode 100644 index 0000000000..9a6aa2f80a --- /dev/null +++ b/core/src/components/radio-group/test/radio-group.e2e.ts @@ -0,0 +1,133 @@ +import { expect } from '@playwright/test'; +import type { Locator } from '@playwright/test'; +import { test } from '@utils/test/playwright'; +import type { E2EPage } from '@utils/test/playwright'; + +test.describe('radio-group', () => { + // eslint-disable-next-line no-empty-pattern + test.beforeEach(({}, testInfo) => { + test.skip(testInfo.project.metadata.rtl === true, 'This does not test LTR vs RTL logic.'); + }); + + test.describe('radio-group: interaction', () => { + let radioFixture: RadioFixture; + + test.beforeEach(({ page }) => { + radioFixture = new RadioFixture(page); + }); + + test('spacebar should not deselect without allowEmptySelection', async ({ page }) => { + await page.setContent(` + + + One + + + + `); + + await radioFixture.checkRadio('keyboard'); + await radioFixture.expectChecked(true); + }); + + test('spacebar should deselect with allowEmptySelection', async ({ page }) => { + await page.setContent(` + + + One + + + + `); + + await radioFixture.checkRadio('keyboard'); + await radioFixture.expectChecked(false); + }); + + test('click should not deselect without allowEmptySelection', async ({ page }) => { + await page.setContent(` + + + One + + + + `); + + await radioFixture.checkRadio('mouse'); + await radioFixture.expectChecked(true); + }); + + test('click should deselect with allowEmptySelection', async ({ page }) => { + await page.setContent(` + + + One + + + + `); + + await radioFixture.checkRadio('mouse'); + await radioFixture.expectChecked(false); + }); + }); + test.describe('radio-group: state', () => { + test('radio should remain checked after being removed/readded to the dom', async ({ page }) => { + await page.goto('/src/components/radio-group/test/search'); + + const radioGroup = page.locator('ion-radio-group'); + const radio = page.locator('ion-radio[value=two]'); + + // select radio + await radio.click(); + await expect(radio.locator('input')).toHaveJSProperty('checked', true); + + // filter radio so it is not in DOM + await page.fill('ion-searchbar input', 'zero'); + await page.waitForChanges(); + expect(radio).toBeHidden(); + + // ensure radio group has the same value + expect(radioGroup).toHaveJSProperty('value', 'two'); + + // clear the search so the radio appears + await page.fill('ion-searchbar input', ''); + await page.waitForChanges(); + + // ensure that the new radio instance is still checked + await expect(radio.locator('input')).toHaveJSProperty('checked', true); + }); + }); +}); + +class RadioFixture { + readonly page: E2EPage; + + private radio!: Locator; + + constructor(page: E2EPage) { + this.page = page; + } + + async checkRadio(method: 'keyboard' | 'mouse', selector = 'ion-radio') { + const { page } = this; + const radio = (this.radio = page.locator(selector)); + + if (method === 'keyboard') { + await radio.focus(); + await page.keyboard.press('Space'); + } else { + await radio.click(); + } + + await page.waitForChanges(); + + return radio; + } + + async expectChecked(state: boolean) { + const { radio } = this; + await expect(radio.locator('input')).toHaveJSProperty('checked', state); + } +} diff --git a/core/src/components/radio-group/test/search/e2e.ts b/core/src/components/radio-group/test/search/e2e.ts deleted file mode 100644 index 315c42d6d0..0000000000 --- a/core/src/components/radio-group/test/search/e2e.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { newE2EPage } from '@stencil/core/testing'; - -test('radio-group: search', async () => { - const page = await newE2EPage({ - url: '/src/components/radio-group/test/search?ionic:_testing=true', - }); - - const screenshotCompares = []; - screenshotCompares.push(await page.compareScreenshot()); - - const radioTwo = await page.find('ion-radio[value=two]'); - await radioTwo.click(); - - const value = await page.find('#value'); - expect(value.textContent).toEqual('Current value: two'); - - const searchbar = await page.find('ion-searchbar'); - await searchbar.click(); - await page.keyboard.type('zero'); - - const valueAgain = await page.find('#value'); - expect(valueAgain.textContent).toEqual('Current value: two'); - - for (const screenshotCompare of screenshotCompares) { - expect(screenshotCompare).toMatchScreenshot(); - } -}); diff --git a/core/src/components/radio-group/test/standalone/e2e.ts b/core/src/components/radio-group/test/standalone/e2e.ts deleted file mode 100644 index e05c75a9c4..0000000000 --- a/core/src/components/radio-group/test/standalone/e2e.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { newE2EPage } from '@stencil/core/testing'; - -test('radio-group: standalone', async () => { - const page = await newE2EPage({ - url: '/src/components/radio-group/test/standalone?ionic:_testing=true', - }); - - const compare = await page.compareScreenshot(); - expect(compare).toMatchScreenshot(); -}); diff --git a/core/src/components/radio-group/test/standalone/index.html b/core/src/components/radio-group/test/standalone/index.html deleted file mode 100644 index 4618724958..0000000000 --- a/core/src/components/radio-group/test/standalone/index.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - Radio Group - Standalone - - - - - - - - - - - - - - - - - - - - - - - - - - -

- allow-empty-selection="true":  - - - - - -

- - - - diff --git a/core/src/components/radio/test/a11y/e2e.ts b/core/src/components/radio/test/a11y/e2e.ts deleted file mode 100644 index eb8c2060fe..0000000000 --- a/core/src/components/radio/test/a11y/e2e.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { newE2EPage } from '@stencil/core/testing'; - -test('radio: a11y', async () => { - const page = await newE2EPage({ - url: '/src/components/radio/test/a11y?ionic:_testing=true', - }); - - const compare = await page.compareScreenshot(); - expect(compare).toMatchScreenshot(); -}); - -test('radio:rtl: a11y', async () => { - const page = await newE2EPage({ - url: '/src/components/radio/test/a11y?ionic:_testing=true&rtl=true', - }); - - const compare = await page.compareScreenshot(); - expect(compare).toMatchScreenshot(); -}); diff --git a/core/src/components/radio/test/a11y/index.html b/core/src/components/radio/test/a11y/index.html index 8abe74fce8..6fbf96b149 100644 --- a/core/src/components/radio/test/a11y/index.html +++ b/core/src/components/radio/test/a11y/index.html @@ -23,35 +23,11 @@ -
-

Select a maintenance drone (native):

- -
- - -
- -
- - -
- -
- - -
- -
- - -
-
- Select a maintenance drone: - + Huey @@ -75,7 +51,7 @@ - + Huey diff --git a/core/src/components/radio/test/a11y/radio.e2e.ts b/core/src/components/radio/test/a11y/radio.e2e.ts new file mode 100644 index 0000000000..ba44ca68d4 --- /dev/null +++ b/core/src/components/radio/test/a11y/radio.e2e.ts @@ -0,0 +1,47 @@ +import { expect } from '@playwright/test'; +import { test } from '@utils/test/playwright'; + +test.describe('radio: a11y', () => { + // eslint-disable-next-line no-empty-pattern + test.beforeEach(({}, testInfo) => { + test.skip(testInfo.project.metadata.rtl === true, 'This does not test LTR vs RTL logic.'); + }); + test('tabbing should switch between radio groups', async ({ page, browserName }) => { + const tabKey = browserName === 'webkit' ? 'Alt+Tab' : 'Tab'; + await page.goto(`/src/components/radio/test/a11y`); + + const firstGroupRadios = page.locator('#first-group ion-radio'); + const secondGroupRadios = page.locator('#second-group ion-radio'); + + await page.keyboard.press(tabKey); + await expect(firstGroupRadios.nth(0)).toBeFocused(); + + await page.keyboard.press(tabKey); + await expect(secondGroupRadios.nth(0)).toBeFocused(); + + await page.keyboard.press(`Shift+${tabKey}`); + await expect(firstGroupRadios.nth(0)).toBeFocused(); + }); + test('using arrow keys should move between enabled radios within group', async ({ page, browserName }) => { + const tabKey = browserName === 'webkit' ? 'Alt+Tab' : 'Tab'; + await page.goto(`/src/components/radio/test/a11y`); + + const firstGroupRadios = page.locator('#first-group ion-radio'); + + await page.keyboard.press(tabKey); + await expect(firstGroupRadios.nth(0)).toBeFocused(); + + await page.keyboard.press('ArrowDown'); + await expect(firstGroupRadios.nth(1)).toBeFocused(); + + // firstGroupRadios.nth(2) is disabled so it should not receive focus. + await page.keyboard.press('ArrowDown'); + await expect(firstGroupRadios.nth(3)).toBeFocused(); + + await page.keyboard.press('ArrowDown'); + await expect(firstGroupRadios.nth(0)).toBeFocused(); + + await page.keyboard.press('ArrowUp'); + await expect(firstGroupRadios.nth(3)).toBeFocused(); + }); +}); diff --git a/core/src/components/radio/test/basic/e2e.ts b/core/src/components/radio/test/basic/e2e.ts deleted file mode 100644 index 3340d8b527..0000000000 --- a/core/src/components/radio/test/basic/e2e.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { newE2EPage } from '@stencil/core/testing'; - -test('radio: basic', async () => { - const page = await newE2EPage({ - url: '/src/components/radio/test/basic?ionic:_testing=true', - }); - - const compare = await page.compareScreenshot(); - expect(compare).toMatchScreenshot(); - - const groupedRadio = await page.find('#groupedRadio'); - await groupedRadio.click(); - expect(groupedRadio).toHaveClass('radio-checked'); - - const ungroupedRadio = await page.find('#ungroupedRadio'); - await ungroupedRadio.click(); - expect(ungroupedRadio).toHaveClass('radio-checked'); -}); - -test('radio:rtl: basic', async () => { - const page = await newE2EPage({ - url: '/src/components/radio/test/basic?ionic:_testing=true&rtl=true', - }); - - const compare = await page.compareScreenshot(); - expect(compare).toMatchScreenshot(); -}); diff --git a/core/src/components/radio/test/basic/radio.e2e.ts b/core/src/components/radio/test/basic/radio.e2e.ts new file mode 100644 index 0000000000..396077abd5 --- /dev/null +++ b/core/src/components/radio/test/basic/radio.e2e.ts @@ -0,0 +1,140 @@ +import { expect } from '@playwright/test'; +import { test } from '@utils/test/playwright'; + +test.describe('radio: rendering', () => { + test('should correctly render an unchecked radio group', async ({ page }) => { + await page.setContent(` + + + Pepperoni + + + + + Sausage + + + + + Pineapple + + + + `); + + const radioGroup = page.locator('ion-radio-group'); + expect(await radioGroup.screenshot()).toMatchSnapshot(`radio-group-unchecked-${page.getSnapshotSettings()}.png`); + }); + test('should correctly render a checked radio group', async ({ page }) => { + await page.setContent(` + + + Pepperoni + + + + + Sausage + + + + + Pineapple + + + + `); + + const radioGroup = page.locator('ion-radio-group'); + expect(await radioGroup.screenshot()).toMatchSnapshot(`radio-group-checked-${page.getSnapshotSettings()}.png`); + }); + test('should allow shadow parts to be styled', async ({ page }) => { + await page.setContent(` + + + Pepperoni + + + + + Sausage + + + + + Pineapple + + + + + + `); + + const radioGroup = page.locator('ion-radio-group'); + expect(await radioGroup.screenshot()).toMatchSnapshot(`radio-group-part-${page.getSnapshotSettings()}.png`); + }); + test('should apply color correctly', async ({ page }) => { + await page.setContent(` + + `); + + const radio = page.locator('ion-radio'); + await radio.click(); + await page.waitForChanges(); + expect(await radio.screenshot({ animations: 'disabled' })).toMatchSnapshot( + `radio-color-${page.getSnapshotSettings()}.png` + ); + }); +}); + +test.describe('radio: interaction', () => { + // eslint-disable-next-line no-empty-pattern + test.beforeEach(({}, testInfo) => { + test.skip(testInfo.project.metadata.rtl === true, 'This does not test LTR vs RTL logic.'); + }); + test('radio should be checked when activated', async ({ page }) => { + await page.setContent(` + + + Pepperoni + + + + `); + + const radio = page.locator('ion-radio'); + const radioGroup = page.locator('ion-radio-group'); + + await expect(radio.locator('input')).toHaveJSProperty('checked', false); + await expect(radioGroup).toHaveJSProperty('value', undefined); + + await radio.click(); + await page.waitForChanges(); + + await expect(radio.locator('input')).toHaveJSProperty('checked', true); + await expect(radioGroup).toHaveJSProperty('value', 'pepperoni'); + }); + test('radio should be checked when activated even without a radio group', async ({ page }) => { + await page.setContent(` + + `); + + const radio = page.locator('ion-radio'); + + await expect(radio.locator('input')).toHaveJSProperty('checked', false); + + await radio.click(); + await page.waitForChanges(); + + await expect(radio.locator('input')).toHaveJSProperty('checked', true); + }); +}); diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-color-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-color-ios-ltr-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..24b6def316 Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-color-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-color-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-color-ios-ltr-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..05241469b7 Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-color-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-color-ios-ltr-Mobile-Safari-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-color-ios-ltr-Mobile-Safari-linux.png new file mode 100644 index 0000000000..20a57eb948 Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-color-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-color-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-color-ios-rtl-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..cf9d7cdc1a Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-color-ios-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-color-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-color-ios-rtl-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..05241469b7 Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-color-ios-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-color-ios-rtl-Mobile-Safari-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-color-ios-rtl-Mobile-Safari-linux.png new file mode 100644 index 0000000000..20a57eb948 Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-color-ios-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-color-md-ltr-Mobile-Chrome-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-color-md-ltr-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..16d7ed2cd8 Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-color-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-color-md-ltr-Mobile-Firefox-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-color-md-ltr-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..caca5fc3ca Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-color-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-color-md-ltr-Mobile-Safari-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-color-md-ltr-Mobile-Safari-linux.png new file mode 100644 index 0000000000..a0cfebc135 Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-color-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-color-md-rtl-Mobile-Chrome-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-color-md-rtl-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..eaf46e32aa Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-color-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-color-md-rtl-Mobile-Firefox-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-color-md-rtl-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..caca5fc3ca Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-color-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-color-md-rtl-Mobile-Safari-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-color-md-rtl-Mobile-Safari-linux.png new file mode 100644 index 0000000000..a0cfebc135 Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-color-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-checked-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-checked-ios-ltr-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..1ce822ee8c Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-checked-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-checked-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-checked-ios-ltr-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..e23972eb3c Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-checked-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-checked-ios-ltr-Mobile-Safari-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-checked-ios-ltr-Mobile-Safari-linux.png new file mode 100644 index 0000000000..b9808db1ed Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-checked-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-checked-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-checked-ios-rtl-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..2506694a86 Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-checked-ios-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-checked-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-checked-ios-rtl-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..833cf40bbd Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-checked-ios-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-checked-ios-rtl-Mobile-Safari-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-checked-ios-rtl-Mobile-Safari-linux.png new file mode 100644 index 0000000000..4bc5305559 Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-checked-ios-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-checked-md-ltr-Mobile-Chrome-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-checked-md-ltr-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..5e5ccd0e86 Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-checked-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-checked-md-ltr-Mobile-Firefox-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-checked-md-ltr-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..008a040e51 Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-checked-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-checked-md-ltr-Mobile-Safari-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-checked-md-ltr-Mobile-Safari-linux.png new file mode 100644 index 0000000000..f4fbdd5393 Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-checked-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-checked-md-rtl-Mobile-Chrome-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-checked-md-rtl-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..98bfc01384 Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-checked-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-checked-md-rtl-Mobile-Firefox-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-checked-md-rtl-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..266de069d5 Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-checked-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-checked-md-rtl-Mobile-Safari-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-checked-md-rtl-Mobile-Safari-linux.png new file mode 100644 index 0000000000..9ddabfc8d6 Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-checked-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-part-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-part-ios-ltr-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..a739019b87 Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-part-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-part-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-part-ios-ltr-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..9c66b06670 Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-part-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-part-ios-ltr-Mobile-Safari-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-part-ios-ltr-Mobile-Safari-linux.png new file mode 100644 index 0000000000..f1cce5c2b1 Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-part-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-part-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-part-ios-rtl-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..e146378847 Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-part-ios-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-part-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-part-ios-rtl-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..9eaf34813f Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-part-ios-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-part-ios-rtl-Mobile-Safari-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-part-ios-rtl-Mobile-Safari-linux.png new file mode 100644 index 0000000000..b90723c202 Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-part-ios-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-part-md-ltr-Mobile-Chrome-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-part-md-ltr-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..5afd0f3d9b Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-part-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-part-md-ltr-Mobile-Firefox-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-part-md-ltr-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..ff20888abd Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-part-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-part-md-ltr-Mobile-Safari-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-part-md-ltr-Mobile-Safari-linux.png new file mode 100644 index 0000000000..c2ffbe7ee9 Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-part-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-part-md-rtl-Mobile-Chrome-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-part-md-rtl-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..8b31ccaf75 Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-part-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-part-md-rtl-Mobile-Firefox-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-part-md-rtl-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..0280a5a7c9 Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-part-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-part-md-rtl-Mobile-Safari-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-part-md-rtl-Mobile-Safari-linux.png new file mode 100644 index 0000000000..d82e7a0b46 Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-part-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-unchecked-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-unchecked-ios-ltr-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..7ebfde954a Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-unchecked-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-unchecked-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-unchecked-ios-ltr-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..1f99966462 Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-unchecked-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-unchecked-ios-ltr-Mobile-Safari-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-unchecked-ios-ltr-Mobile-Safari-linux.png new file mode 100644 index 0000000000..cb069bf1e8 Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-unchecked-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-unchecked-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-unchecked-ios-rtl-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..0080bb9e5f Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-unchecked-ios-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-unchecked-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-unchecked-ios-rtl-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..ac7b7e9ed6 Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-unchecked-ios-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-unchecked-ios-rtl-Mobile-Safari-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-unchecked-ios-rtl-Mobile-Safari-linux.png new file mode 100644 index 0000000000..11cc1c3be5 Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-unchecked-ios-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-unchecked-md-ltr-Mobile-Chrome-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-unchecked-md-ltr-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..db528e293c Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-unchecked-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-unchecked-md-ltr-Mobile-Firefox-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-unchecked-md-ltr-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..44b3be827c Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-unchecked-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-unchecked-md-ltr-Mobile-Safari-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-unchecked-md-ltr-Mobile-Safari-linux.png new file mode 100644 index 0000000000..e7e67f8c32 Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-unchecked-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-unchecked-md-rtl-Mobile-Chrome-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-unchecked-md-rtl-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..795f771dea Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-unchecked-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-unchecked-md-rtl-Mobile-Firefox-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-unchecked-md-rtl-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..d8fc1c5626 Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-unchecked-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-unchecked-md-rtl-Mobile-Safari-linux.png b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-unchecked-md-rtl-Mobile-Safari-linux.png new file mode 100644 index 0000000000..7b85f412e9 Binary files /dev/null and b/core/src/components/radio/test/basic/radio.e2e.ts-snapshots/radio-group-unchecked-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/radio/test/standalone/e2e.ts b/core/src/components/radio/test/standalone/e2e.ts deleted file mode 100644 index b0510a048a..0000000000 --- a/core/src/components/radio/test/standalone/e2e.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { newE2EPage } from '@stencil/core/testing'; - -test('radio: standalone', async () => { - const page = await newE2EPage({ - url: '/src/components/radio/test/standalone?ionic:_testing=true', - }); - - const compare = await page.compareScreenshot(); - expect(compare).toMatchScreenshot(); -}); diff --git a/core/src/components/radio/test/standalone/radio.e2e.ts b/core/src/components/radio/test/standalone/radio.e2e.ts new file mode 100644 index 0000000000..1b563b587d --- /dev/null +++ b/core/src/components/radio/test/standalone/radio.e2e.ts @@ -0,0 +1,12 @@ +import { expect } from '@playwright/test'; +import { test } from '@utils/test/playwright'; + +test.describe('radio: standalone', () => { + test('should not have visual regressions', async ({ page }) => { + await page.goto(`/src/components/radio/test/standalone`); + + await page.setIonViewport(); + + expect(await page.screenshot()).toMatchSnapshot(`radio-standalone-${page.getSnapshotSettings()}.png`); + }); +}); diff --git a/core/src/components/radio/test/standalone/radio.e2e.ts-snapshots/radio-standalone-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/radio/test/standalone/radio.e2e.ts-snapshots/radio-standalone-ios-ltr-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..99364c3359 Binary files /dev/null and b/core/src/components/radio/test/standalone/radio.e2e.ts-snapshots/radio-standalone-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/radio/test/standalone/radio.e2e.ts-snapshots/radio-standalone-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/radio/test/standalone/radio.e2e.ts-snapshots/radio-standalone-ios-ltr-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..83a4a30559 Binary files /dev/null and b/core/src/components/radio/test/standalone/radio.e2e.ts-snapshots/radio-standalone-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/radio/test/standalone/radio.e2e.ts-snapshots/radio-standalone-ios-ltr-Mobile-Safari-linux.png b/core/src/components/radio/test/standalone/radio.e2e.ts-snapshots/radio-standalone-ios-ltr-Mobile-Safari-linux.png new file mode 100644 index 0000000000..236e2ed4a2 Binary files /dev/null and b/core/src/components/radio/test/standalone/radio.e2e.ts-snapshots/radio-standalone-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/radio/test/standalone/radio.e2e.ts-snapshots/radio-standalone-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/radio/test/standalone/radio.e2e.ts-snapshots/radio-standalone-ios-rtl-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..560068e38e Binary files /dev/null and b/core/src/components/radio/test/standalone/radio.e2e.ts-snapshots/radio-standalone-ios-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/radio/test/standalone/radio.e2e.ts-snapshots/radio-standalone-ios-rtl-Mobile-Firefox-linux.png b/core/src/components/radio/test/standalone/radio.e2e.ts-snapshots/radio-standalone-ios-rtl-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..7fafc5ddb1 Binary files /dev/null and b/core/src/components/radio/test/standalone/radio.e2e.ts-snapshots/radio-standalone-ios-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/radio/test/standalone/radio.e2e.ts-snapshots/radio-standalone-ios-rtl-Mobile-Safari-linux.png b/core/src/components/radio/test/standalone/radio.e2e.ts-snapshots/radio-standalone-ios-rtl-Mobile-Safari-linux.png new file mode 100644 index 0000000000..c3c53abf5d Binary files /dev/null and b/core/src/components/radio/test/standalone/radio.e2e.ts-snapshots/radio-standalone-ios-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/radio/test/standalone/radio.e2e.ts-snapshots/radio-standalone-md-ltr-Mobile-Chrome-linux.png b/core/src/components/radio/test/standalone/radio.e2e.ts-snapshots/radio-standalone-md-ltr-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..955de4d2f0 Binary files /dev/null and b/core/src/components/radio/test/standalone/radio.e2e.ts-snapshots/radio-standalone-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/radio/test/standalone/radio.e2e.ts-snapshots/radio-standalone-md-ltr-Mobile-Firefox-linux.png b/core/src/components/radio/test/standalone/radio.e2e.ts-snapshots/radio-standalone-md-ltr-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..ae2912ea9f Binary files /dev/null and b/core/src/components/radio/test/standalone/radio.e2e.ts-snapshots/radio-standalone-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/radio/test/standalone/radio.e2e.ts-snapshots/radio-standalone-md-ltr-Mobile-Safari-linux.png b/core/src/components/radio/test/standalone/radio.e2e.ts-snapshots/radio-standalone-md-ltr-Mobile-Safari-linux.png new file mode 100644 index 0000000000..ec5077c3bf Binary files /dev/null and b/core/src/components/radio/test/standalone/radio.e2e.ts-snapshots/radio-standalone-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/radio/test/standalone/radio.e2e.ts-snapshots/radio-standalone-md-rtl-Mobile-Chrome-linux.png b/core/src/components/radio/test/standalone/radio.e2e.ts-snapshots/radio-standalone-md-rtl-Mobile-Chrome-linux.png new file mode 100644 index 0000000000..21edc42918 Binary files /dev/null and b/core/src/components/radio/test/standalone/radio.e2e.ts-snapshots/radio-standalone-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/radio/test/standalone/radio.e2e.ts-snapshots/radio-standalone-md-rtl-Mobile-Firefox-linux.png b/core/src/components/radio/test/standalone/radio.e2e.ts-snapshots/radio-standalone-md-rtl-Mobile-Firefox-linux.png new file mode 100644 index 0000000000..67f89c8ee2 Binary files /dev/null and b/core/src/components/radio/test/standalone/radio.e2e.ts-snapshots/radio-standalone-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/radio/test/standalone/radio.e2e.ts-snapshots/radio-standalone-md-rtl-Mobile-Safari-linux.png b/core/src/components/radio/test/standalone/radio.e2e.ts-snapshots/radio-standalone-md-rtl-Mobile-Safari-linux.png new file mode 100644 index 0000000000..29a64d56d4 Binary files /dev/null and b/core/src/components/radio/test/standalone/radio.e2e.ts-snapshots/radio-standalone-md-rtl-Mobile-Safari-linux.png differ