From 1a176ac3fe4e3469057927df6d1f781ff1498987 Mon Sep 17 00:00:00 2001 From: lipata Date: Mon, 10 Nov 2025 15:08:42 +0200 Subject: [PATCH 1/4] ci: install playwright in the yaml file --- .../projects/_base/files/__dot__azure/azure-pipelines.yml | 4 ++++ .../projects/_base/files/__dot__github/workflows/node.js.yml | 5 +++++ .../react/igr-ts/projects/_base/files/src/setupTests.ts | 5 ++--- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/cli/templates/react/igr-ts/projects/_base/files/__dot__azure/azure-pipelines.yml b/packages/cli/templates/react/igr-ts/projects/_base/files/__dot__azure/azure-pipelines.yml index f54ce8ee5..673ba184f 100644 --- a/packages/cli/templates/react/igr-ts/projects/_base/files/__dot__azure/azure-pipelines.yml +++ b/packages/cli/templates/react/igr-ts/projects/_base/files/__dot__azure/azure-pipelines.yml @@ -19,5 +19,9 @@ steps: continueOnError: true - script: npm run build displayName: 'Build the project' + - script: npx playwright install chromium-headless-shell + displayName: 'Install Playwright browsers' - script: npm run test displayName: 'Run tests' + env: + CI: 'true' diff --git a/packages/cli/templates/react/igr-ts/projects/_base/files/__dot__github/workflows/node.js.yml b/packages/cli/templates/react/igr-ts/projects/_base/files/__dot__github/workflows/node.js.yml index 161dbc00e..6a478b2c2 100644 --- a/packages/cli/templates/react/igr-ts/projects/_base/files/__dot__github/workflows/node.js.yml +++ b/packages/cli/templates/react/igr-ts/projects/_base/files/__dot__github/workflows/node.js.yml @@ -29,5 +29,10 @@ jobs: - run: npm i # replace with 'npm ci' after committing lock file from first install # - run: npm run lint - run: npm run build + - name: Install Playwright browsers + run: npx playwright install chromium-headless-shell - run: npm run test + env: + CI: 'true' + diff --git a/packages/cli/templates/react/igr-ts/projects/_base/files/src/setupTests.ts b/packages/cli/templates/react/igr-ts/projects/_base/files/src/setupTests.ts index 38ac68997..ff1551bad 100644 --- a/packages/cli/templates/react/igr-ts/projects/_base/files/src/setupTests.ts +++ b/packages/cli/templates/react/igr-ts/projects/_base/files/src/setupTests.ts @@ -1,11 +1,10 @@ -import '@testing-library/jest-dom' import 'vitest-canvas-mock' import ResizeObserver from 'resize-observer-polyfill' import {vi} from 'vitest' -global.ResizeObserver = ResizeObserver; +globalThis.ResizeObserver = ResizeObserver; HTMLElement.prototype.scrollIntoView = vi.fn(); HTMLElement.prototype.hidePopover = vi.fn(); HTMLElement.prototype.showPopover = vi.fn(); -HTMLElement.prototype.togglePopover = vi.fn(); \ No newline at end of file +HTMLElement.prototype.togglePopover = vi.fn(); From 73918305239279c03483569e48fa6dadf4301b17 Mon Sep 17 00:00:00 2001 From: Nikolay Alipiev Date: Mon, 10 Nov 2025 15:13:06 +0200 Subject: [PATCH 2/4] Update packages/cli/templates/react/igr-ts/projects/_base/files/__dot__github/workflows/node.js.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../_base/files/__dot__github/workflows/node.js.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/cli/templates/react/igr-ts/projects/_base/files/__dot__github/workflows/node.js.yml b/packages/cli/templates/react/igr-ts/projects/_base/files/__dot__github/workflows/node.js.yml index 6a478b2c2..08c9b9fc4 100644 --- a/packages/cli/templates/react/igr-ts/projects/_base/files/__dot__github/workflows/node.js.yml +++ b/packages/cli/templates/react/igr-ts/projects/_base/files/__dot__github/workflows/node.js.yml @@ -32,7 +32,5 @@ jobs: - name: Install Playwright browsers run: npx playwright install chromium-headless-shell - run: npm run test - - env: - CI: 'true' - + env: + CI: 'true' From ed4241567b6fc2b6240bf9cec5e5b53b4dafb2f8 Mon Sep 17 00:00:00 2001 From: Nikolay Alipiev Date: Mon, 10 Nov 2025 15:13:12 +0200 Subject: [PATCH 3/4] Update packages/cli/templates/react/igr-ts/projects/_base/files/__dot__azure/azure-pipelines.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../projects/_base/files/__dot__azure/azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cli/templates/react/igr-ts/projects/_base/files/__dot__azure/azure-pipelines.yml b/packages/cli/templates/react/igr-ts/projects/_base/files/__dot__azure/azure-pipelines.yml index 673ba184f..98efee714 100644 --- a/packages/cli/templates/react/igr-ts/projects/_base/files/__dot__azure/azure-pipelines.yml +++ b/packages/cli/templates/react/igr-ts/projects/_base/files/__dot__azure/azure-pipelines.yml @@ -23,5 +23,5 @@ steps: displayName: 'Install Playwright browsers' - script: npm run test displayName: 'Run tests' - env: - CI: 'true' + env: + CI: 'true' From df9711165389a9b802ae46f99db1273634e2e0c1 Mon Sep 17 00:00:00 2001 From: lipata Date: Mon, 10 Nov 2025 15:14:24 +0200 Subject: [PATCH 4/4] ci(react): add env to test step --- .../projects/_base/files/__dot__azure/azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cli/templates/react/igr-ts/projects/_base/files/__dot__azure/azure-pipelines.yml b/packages/cli/templates/react/igr-ts/projects/_base/files/__dot__azure/azure-pipelines.yml index 98efee714..673ba184f 100644 --- a/packages/cli/templates/react/igr-ts/projects/_base/files/__dot__azure/azure-pipelines.yml +++ b/packages/cli/templates/react/igr-ts/projects/_base/files/__dot__azure/azure-pipelines.yml @@ -23,5 +23,5 @@ steps: displayName: 'Install Playwright browsers' - script: npm run test displayName: 'Run tests' - env: - CI: 'true' + env: + CI: 'true'