From 703c5cddd831b30796cbfce889617fc0e2e97fb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Kry=C5=A1p=C3=ADn?= Date: Fri, 16 Aug 2024 17:04:12 +0200 Subject: [PATCH] Test: Temporarily disable all visual tests and SCSS loading --- packages/web/src/scss/components/index.scss | 73 ++++++++++--------- packages/web/src/scss/foundation/index.scss | 19 ++--- packages/web/src/scss/helpers/index.scss | 19 ++--- packages/web/src/scss/utilities/index.scss | 3 +- .../{scss.test.ts => scss.test-disabled.ts} | 0 .../e2e/components/demo-modal-compare.spec.ts | 33 +++++---- tests/e2e/demo-components-compare.spec.ts | 45 +++++++++++- tests/e2e/demo-homepages.spec.ts | 23 +++--- 8 files changed, 134 insertions(+), 81 deletions(-) rename packages/web/tests/{scss.test.ts => scss.test-disabled.ts} (100%) diff --git a/packages/web/src/scss/components/index.scss b/packages/web/src/scss/components/index.scss index 75616b3ae2..1fd566fec0 100644 --- a/packages/web/src/scss/components/index.scss +++ b/packages/web/src/scss/components/index.scss @@ -1,36 +1,37 @@ -@forward 'Accordion'; -@forward 'Alert'; -@forward 'Breadcrumbs'; -@forward 'Button'; -@forward 'Checkbox'; -@forward 'Collapse'; -@forward 'Container'; -@forward 'Divider'; -@forward 'Dropdown'; -@forward 'FieldGroup'; -@forward 'FileUploader'; -@forward 'Flex'; -@forward 'Grid'; -@forward 'Header'; -@forward 'Item'; -@forward 'Modal'; -@forward 'Pagination'; -@forward 'Pill'; -@forward 'Radio'; -@forward 'ScrollView'; -@forward 'Select'; -@forward 'Stack'; -@forward 'Tabs'; -@forward 'Tag'; -@forward 'TextArea'; -@forward 'TextField'; -@forward 'Toast'; -@forward 'Tooltip'; -@forward 'UNSTABLE_ActionLayout'; -@forward 'UNSTABLE_Avatar'; -@forward 'UNSTABLE_EmptyState'; -@forward 'UNSTABLE_PartnerLogo'; -@forward 'UNSTABLE_ProductLogo'; -@forward 'UNSTABLE_Section'; -@forward 'UNSTABLE_Slider'; -@forward 'UNSTABLE_Toggle'; +// This code is commented out until we switch it to the new token system +// @forward 'Accordion'; +// @forward 'Alert'; +// @forward 'Breadcrumbs'; +// @forward 'Button'; +// @forward 'Checkbox'; +// @forward 'Collapse'; +// @forward 'Container'; +// @forward 'Divider'; +// @forward 'Dropdown'; +// @forward 'FieldGroup'; +// @forward 'FileUploader'; +// @forward 'Flex'; +// @forward 'Grid'; +// @forward 'Header'; +// @forward 'Item'; +// @forward 'Modal'; +// @forward 'Pagination'; +// @forward 'Pill'; +// @forward 'Radio'; +// @forward 'ScrollView'; +// @forward 'Select'; +// @forward 'Stack'; +// @forward 'Tabs'; +// @forward 'Tag'; +// @forward 'TextArea'; +// @forward 'TextField'; +// @forward 'Toast'; +// @forward 'Tooltip'; +// @forward 'UNSTABLE_ActionLayout'; +// @forward 'UNSTABLE_Avatar'; +// @forward 'UNSTABLE_EmptyState'; +// @forward 'UNSTABLE_PartnerLogo'; +// @forward 'UNSTABLE_ProductLogo'; +// @forward 'UNSTABLE_Section'; +// @forward 'UNSTABLE_Slider'; +// @forward 'UNSTABLE_Toggle'; diff --git a/packages/web/src/scss/foundation/index.scss b/packages/web/src/scss/foundation/index.scss index 0b5e4da6e7..a7f8e0c1df 100644 --- a/packages/web/src/scss/foundation/index.scss +++ b/packages/web/src/scss/foundation/index.scss @@ -1,9 +1,10 @@ -@forward '@csstools/normalize.css/normalize.css'; -@forward 'box-sizing'; -@forward 'images'; -@forward 'interactions'; -@forward 'links'; -@forward 'reset'; -@forward 'shared'; -@forward 'tokens'; -@forward 'typography'; +// This code is commented out until we switch it to the new token system +// @forward '@csstools/normalize.css/normalize.css'; +// @forward 'box-sizing'; +// @forward 'images'; +// @forward 'interactions'; +// @forward 'links'; +// @forward 'reset'; +// @forward 'shared'; +// @forward 'tokens'; +// @forward 'typography'; diff --git a/packages/web/src/scss/helpers/index.scss b/packages/web/src/scss/helpers/index.scss index 79b48fcc8a..1963035cf7 100644 --- a/packages/web/src/scss/helpers/index.scss +++ b/packages/web/src/scss/helpers/index.scss @@ -1,9 +1,10 @@ -@forward 'accessibility'; -@forward 'animations'; -@forward 'breakout'; -@forward 'images'; -@forward 'links'; -@forward 'lists'; -@forward 'scroll-control'; -@forward 'text'; -@forward 'typography'; +// This code is commented out until we switch it to the new token system +// @forward 'accessibility'; +// @forward 'animations'; +// @forward 'breakout'; +// @forward 'images'; +// @forward 'links'; +// @forward 'lists'; +// @forward 'scroll-control'; +// @forward 'text'; +// @forward 'typography'; diff --git a/packages/web/src/scss/utilities/index.scss b/packages/web/src/scss/utilities/index.scss index e611d65b2b..bbb4d31f80 100644 --- a/packages/web/src/scss/utilities/index.scss +++ b/packages/web/src/scss/utilities/index.scss @@ -1 +1,2 @@ -@forward 'utilities'; +// This code is commented out until we switch it to the new token system +// @forward 'utilities'; diff --git a/packages/web/tests/scss.test.ts b/packages/web/tests/scss.test-disabled.ts similarity index 100% rename from packages/web/tests/scss.test.ts rename to packages/web/tests/scss.test-disabled.ts diff --git a/tests/e2e/components/demo-modal-compare.spec.ts b/tests/e2e/components/demo-modal-compare.spec.ts index 9f98616449..9f959940d1 100644 --- a/tests/e2e/components/demo-modal-compare.spec.ts +++ b/tests/e2e/components/demo-modal-compare.spec.ts @@ -99,25 +99,28 @@ const modalTestConfigs: ModalTestConfig[] = [ const componentName = 'Modal'; const testConfigs: TestConfig[] = [ - { - componentName, - componentsDir: '/src/scss/components', - packageName: 'web', - }, - { - componentName, - componentsDir: '/src/components', - packageName: 'web-react', - }, + // Commented out because we changed tokens and broke utilities, helper and styles used in the demos. + // Should be uncommented in DS-1452 ticket. + // Jan Kryšpín 2024-08-27 + // { + // componentName, + // componentsDir: '/src/scss/components', + // packageName: 'web', + // }, + // { + // componentName, + // componentsDir: '/src/components', + // packageName: 'web-react', + // }, ]; // Disable web-twig tests for now on CI, because we don't have a way to run them in CI yet. if (!isTestingEnvironment()) { - testConfigs.push({ - componentName, - componentsDir: '/components', - packageName: 'web-twig', - }); + // testConfigs.push({ + // componentName, + // componentsDir: '/components', + // packageName: 'web-twig', + // }); } testConfigs.forEach(runComponentCompareTests); diff --git a/tests/e2e/demo-components-compare.spec.ts b/tests/e2e/demo-components-compare.spec.ts index 577f1ccaa4..ee98d77dd4 100644 --- a/tests/e2e/demo-components-compare.spec.ts +++ b/tests/e2e/demo-components-compare.spec.ts @@ -5,7 +5,50 @@ import { readdirSync } from 'fs'; import { formatPackageName, getServerUrl, takeScreenshot, waitForPageLoad } from '../helpers'; // Tests that are intentionally broken, but will be fixed in the future -const IGNORED_TESTS: string[] = []; +const IGNORED_TESTS: string[] = [ + 'Accordion', + 'Alert', + 'Breadcrumbs', + 'Button', + 'ButtonLink', + 'Checkbox', + 'Collapse', + 'Container', + 'Divider', + 'Dropdown', + 'FieldGroup', + 'FileUploader', + 'Grid', + 'Header', + 'Heading', + 'Icon', + 'Item', + 'Link', + 'Modal', + 'Pagination', + 'Pill', + 'Radio', + 'ScrollView', + 'Select', + 'Spinner', + 'Stack', + 'Tabs', + 'Tag', + 'Text', + 'TextArea', + 'TextField', + 'Toast', + 'Tooltip', + 'UNSTABLE_ActionLayout', + 'UNSTABLE_Avatar', + 'UNSTABLE_EmptyState', + 'UNSTABLE_PartnerLogo', + 'UNSTABLE_ProductLogo', + 'UNSTABLE_Section', + 'UNSTABLE_Slider', + 'UNSTABLE_Toggle', + 'UNSTABLE_Truncate', +]; interface TestConfig { packageDir: string; diff --git a/tests/e2e/demo-homepages.spec.ts b/tests/e2e/demo-homepages.spec.ts index 46bada1754..5d105c0955 100644 --- a/tests/e2e/demo-homepages.spec.ts +++ b/tests/e2e/demo-homepages.spec.ts @@ -1,18 +1,21 @@ -import { isTesting } from '@lmc-eu/spirit-common/constants/environments'; -import { SERVERS, getDevelopmentEndpointUri } from '@lmc-eu/spirit-common/constants/servers'; +// import { isTesting } from '@lmc-eu/spirit-common/constants/environments'; +// import { SERVERS, getDevelopmentEndpointUri } from '@lmc-eu/spirit-common/constants/servers'; import { test } from '@playwright/test'; import { takeScreenshot, waitForPageLoad } from '../helpers'; test.describe('Demo Homepages', () => { const demos = [ - { - url: isTesting() ? SERVERS.TESTING.web : getDevelopmentEndpointUri('web', { isDocker: true }), - package: 'web', - }, - { - url: isTesting() ? SERVERS.TESTING['web-react'] : getDevelopmentEndpointUri('web-react', { isDocker: true }), - package: 'web-react', - }, + // Commented out because we changed tokens and broke utilities, helper and styles used in the demos. + // Can be enabled when new styles are applied to the demos. Or in the DS-1455 ticket. + // Jan Kryšpín 2024-08-27 + // { + // url: isTesting() ? SERVERS.TESTING.web : getDevelopmentEndpointUri('web', { isDocker: true }), + // package: 'web', + // }, + // { + // url: isTesting() ? SERVERS.TESTING['web-react'] : getDevelopmentEndpointUri('web-react', { isDocker: true }), + // package: 'web-react', + // }, ]; for (const demo of demos) {