Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 5 additions & 18 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -408,14 +408,13 @@ jobs:
run: |
pnpm --filter @semcore/theme build
pnpm --filter @semcore/core build
pnpm --filter @semcore/base-components build
pnpm build:icons
pnpm build:illustration
pnpm --filter @semcore/icon build
pnpm --filter @semcore/illustration build
- name: Browser testing (Functional tests - ${{ matrix.browser }})
id: browser-testing-functional
env:
CHANGED_COMPONENTS: ${{ needs.defineChangedComponents.outputs.changedComponents }}
run: HOME=/root pnpm playwright test --config playwright.browser.config.ts --grep "@functional" --project=${{ matrix.browser }} $CHANGED_COMPONENTS
run: HOME=/root pnpm playwright test --pass-with-no-tests --config playwright.browser.config.ts --grep "@functional" --project=${{ matrix.browser }} $CHANGED_COMPONENTS
continue-on-error: true
- name: Save test results as artifacts
if: steps.browser-testing-functional.outcome != 'success'
Expand Down Expand Up @@ -486,7 +485,7 @@ jobs:
id: axe-testing
env:
CHANGED_COMPONENTS: ${{ needs.defineChangedComponents.outputs.changedComponents }}
run: HOME=/root pnpm playwright test --config playwright.axe.config.ts $CHANGED_COMPONENTS
run: HOME=/root pnpm playwright test --pass-with-no-tests --config playwright.axe.config.ts $CHANGED_COMPONENTS
continue-on-error: true
- name: Save test results as artifacts
if: steps.axe-testing.outcome != 'success'
Expand Down Expand Up @@ -527,18 +526,6 @@ jobs:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
enableCrossOsArchive: true
# - name: Restore cached build
# uses: actions/cache@v4
# id: cache-build
# with:
# path: |
# semcore/*/lib
# tools/*/lib
# semcore/illustration/**/*.js
# semcore/illustration/**/*.mjs
# semcore/illustration/**/*.d.ts
# key: build-${{ hashFiles('**/pnpm-lock.yaml', '**/CHANGELOG.md') }}-6
# enableCrossOsArchive: true
- name: Install dependencies
run: |
pnpm install --frozen-lockfile --ignore-scripts
Expand All @@ -563,7 +550,7 @@ jobs:
pnpm --filter @semcore/core build
pnpm --filter @semcore/icon build

pnpm exec playwright test --config playwright.nvda.config.ts -- $components
pnpm exec playwright test --pass-with-no-tests --config playwright.nvda.config.ts -- $components
continue-on-error: true
- name: Save test results as artifacts
if: steps.nvda-testing.outcome != 'success'
Expand Down
14 changes: 12 additions & 2 deletions tools/testing-utils/shared/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
import type { Page } from 'playwright';

import { e2eStandToHtml } from '../e2e-stand';

export async function loadPage(page: any, examplePath: string, lang: string, props = {}) {
const htmlContent = await e2eStandToHtml(examplePath, lang, props);
const stands = new Map<string, string>();

export async function loadPage(page: Page, examplePath: string, lang: string, props?: Record<string, unknown>) {
const key = `${examplePath}_${lang}_${props ? JSON.stringify(props) : ''}`;
const htmlContent = stands.get(key) ?? await e2eStandToHtml(examplePath, lang, props ?? {});

if (!stands.has(key)) {
stands.set(key, htmlContent);
}

await page.setContent(htmlContent);
}
Loading