test(accordion): remove unnecessary tests (#26009)
@ -2,7 +2,9 @@ import { expect } from '@playwright/test';
|
||||
import { test } from '@utils/test/playwright';
|
||||
|
||||
test.describe('accordion: multiple', () => {
|
||||
test('should update value and not have visual regressions', async ({ page }) => {
|
||||
test('should update value and visually expand items', async ({ page, skip }) => {
|
||||
skip.rtl();
|
||||
|
||||
await page.goto(`/src/components/accordion/test/multiple`);
|
||||
const accordionGroup = page.locator('ion-accordion-group');
|
||||
const diningHeader = page.locator('ion-accordion[value="dining"] ion-item[slot="header"]');
|
||||
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 75 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 71 KiB |
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 67 KiB |
Before Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 65 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 28 KiB |
@ -2,11 +2,33 @@ import { expect } from '@playwright/test';
|
||||
import { test } from '@utils/test/playwright';
|
||||
|
||||
test.describe('accordion: nested', () => {
|
||||
test('should not have visual regressions', async ({ page }) => {
|
||||
test.beforeEach(async ({ page, skip }) => {
|
||||
skip.rtl();
|
||||
|
||||
await page.goto(`/src/components/accordion/test/nested`);
|
||||
});
|
||||
|
||||
await page.setIonViewport();
|
||||
test('parent and child should not be disabled', async ({ page }) => {
|
||||
const enabledGroup = page.locator('ion-accordion-group#enabled');
|
||||
|
||||
expect(await page.screenshot()).toMatchSnapshot(`accordion-nested-${page.getSnapshotSettings()}.png`);
|
||||
expect(await enabledGroup.screenshot()).toMatchSnapshot(
|
||||
`accordion-nested-enabled-${page.getSnapshotSettings()}.png`
|
||||
);
|
||||
});
|
||||
|
||||
test('parent should not be disabled when only child is disabled', async ({ page }) => {
|
||||
const nestedDisabledGroup = page.locator('ion-accordion-group#nested-disabled');
|
||||
|
||||
expect(await nestedDisabledGroup.screenshot()).toMatchSnapshot(
|
||||
`accordion-child-disabled-${page.getSnapshotSettings()}.png`
|
||||
);
|
||||
});
|
||||
|
||||
test('parent and child should be disabled when parent is disabled', async ({ page }) => {
|
||||
const parentDisabledGroup = page.locator('ion-accordion-group#parent-disabled');
|
||||
|
||||
expect(await parentDisabledGroup.screenshot()).toMatchSnapshot(
|
||||
`accordion-parent-disabled-${page.getSnapshotSettings()}.png`
|
||||
);
|
||||
});
|
||||
});
|
||||
|
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 9.9 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 151 KiB |
Before Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 122 KiB |
Before Width: | Height: | Size: 151 KiB |
Before Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 122 KiB |
Before Width: | Height: | Size: 128 KiB |
Before Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 114 KiB |
Before Width: | Height: | Size: 129 KiB |
Before Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 114 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 9.6 KiB |
After Width: | Height: | Size: 26 KiB |
@ -43,7 +43,7 @@
|
||||
<div class="grid ion-padding">
|
||||
<div class="grid-item">
|
||||
<h2>Nested</h2>
|
||||
<ion-accordion-group expand="inset" value="attractions">
|
||||
<ion-accordion-group id="enabled" expand="inset" value="attractions">
|
||||
<ion-accordion value="attractions">
|
||||
<ion-item color="primary" slot="header" button detail="false">
|
||||
<ion-icon slot="start" ios="film-outline" md="film"></ion-icon>
|
||||
@ -75,7 +75,7 @@
|
||||
</div>
|
||||
<div class="grid-item">
|
||||
<h2>Nested Disabled</h2>
|
||||
<ion-accordion-group expand="inset" value="attractions">
|
||||
<ion-accordion-group id="nested-disabled" expand="inset" value="attractions">
|
||||
<ion-accordion value="attractions">
|
||||
<ion-item color="primary" slot="header" button detail="false">
|
||||
<ion-icon slot="start" ios="film-outline" md="film"></ion-icon>
|
||||
@ -107,7 +107,7 @@
|
||||
</div>
|
||||
<div class="grid-item">
|
||||
<h2>Nested Parent Disabled</h2>
|
||||
<ion-accordion-group expand="inset" value="attractions" disabled="true">
|
||||
<ion-accordion-group id="parent-disabled" expand="inset" value="attractions" disabled="true">
|
||||
<ion-accordion value="attractions">
|
||||
<ion-item color="primary" slot="header" button detail="false">
|
||||
<ion-icon slot="start" ios="film-outline" md="film"></ion-icon>
|
||||
|