diff --git a/tests/e2e/demo-components-compare.spec.ts b/tests/e2e/demo-components-compare.spec.ts index aa548371dd..9e8a4ad9a9 100644 --- a/tests/e2e/demo-components-compare.spec.ts +++ b/tests/e2e/demo-components-compare.spec.ts @@ -9,7 +9,7 @@ const IGNORED_TESTS = [ ]; const runComponentCompareTests = (testConfig) => { - const { packageDir, componentsDir, srcDir = '', ignoredComponents = [], packageName } = testConfig; + const { packageDir, componentsDir, srcDir = '', packageName } = testConfig; if (packageName) { const formattedPackageName = packageName .split('-') @@ -19,7 +19,11 @@ const runComponentCompareTests = (testConfig) => { test.describe(`Demo ${formattedPackageName} Components`, () => { const componentDirs = readdirSync(`${packageDir}${srcDir}${componentsDir}`, { withFileTypes: true }) .filter((item) => item.isDirectory()) - .filter((item) => !ignoredComponents.includes(item.name)) + .filter((item) => + readdirSync(`${packageDir}${srcDir}${componentsDir}/${item.name}`).includes( + packageName !== 'web-twig' ? 'index.html' : `${item.name}.stories.twig`, + ), + ) .filter((item) => !IGNORED_TESTS.includes(item.name)) .map((item) => item.name.toLowerCase()); @@ -56,14 +60,12 @@ const testConfigs = [ }, { componentsDir: '/src/components', - ignoredComponents: ['Field', 'Dialog', 'Icon', 'TextFieldBase', 'VisuallyHidden'], packageDir: 'packages/web-react', packageName: 'web-react', }, // Disable web-twig tests for now on CI, because we don't have a way to run them in CI yet. !isTestingEnvironment() && { componentsDir: '/components', - ignoredComponents: ['Field', 'Icon', 'TextFieldBase', 'VisuallyHidden'], packageDir: 'packages/web-twig', packageName: 'web-twig', srcDir: '/src/Resources', diff --git a/tests/e2e/demo-components-compare.spec.ts-snapshots/icon-chromium-linux.png b/tests/e2e/demo-components-compare.spec.ts-snapshots/icon-chromium-linux.png new file mode 100644 index 0000000000..ba24e46485 Binary files /dev/null and b/tests/e2e/demo-components-compare.spec.ts-snapshots/icon-chromium-linux.png differ diff --git a/tests/e2e/demo-components-compare.spec.ts-snapshots/nossr-chromium-linux.png b/tests/e2e/demo-components-compare.spec.ts-snapshots/nossr-chromium-linux.png deleted file mode 100644 index 409c5b128e..0000000000 Binary files a/tests/e2e/demo-components-compare.spec.ts-snapshots/nossr-chromium-linux.png and /dev/null differ diff --git a/tests/e2e/demo-components-compare.spec.ts-snapshots/offcanvas-chromium-linux.png b/tests/e2e/demo-components-compare.spec.ts-snapshots/offcanvas-chromium-linux.png deleted file mode 100644 index a25caeb2e4..0000000000 Binary files a/tests/e2e/demo-components-compare.spec.ts-snapshots/offcanvas-chromium-linux.png and /dev/null differ diff --git a/tests/e2e/demo-homepages.spec.ts-snapshots/web-chromium-linux.png b/tests/e2e/demo-homepages.spec.ts-snapshots/web-chromium-linux.png index a25caeb2e4..9786ab7d73 100644 Binary files a/tests/e2e/demo-homepages.spec.ts-snapshots/web-chromium-linux.png and b/tests/e2e/demo-homepages.spec.ts-snapshots/web-chromium-linux.png differ