From 4518b951545ba58b439b4f7988d3c6c957c438a1 Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Thu, 3 Nov 2022 19:27:49 +0530 Subject: [PATCH] feat(testing): Added playwright to CI feat(testing): Added playwright to CI feat(testing): Added playwright to CI feat(testing): Added playwright to CI feat(testing): Added playwright to CI feat(testing): Added playwright to CI feat(testing): Added playwright to CI feat(testing): Added playwright to CI feat(testing): Added playwright to CI feat(testing): Added playwright to CI feat(testing): Added playwright to CI --- .github/workflows/ci-cd.yml | 8 ++++++++ scripts/playwright/playwright.config.ts | 3 ++- scripts/playwright/tests/columnSingleSelect.spec.ts | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 9856119469..5c291e1e2e 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -1554,7 +1554,15 @@ jobs: - name: Run backend working-directory: ./packages/nocodb run: npm run watch:run:playwright > mysql_test_backend.log & + - name: Cache playwright npm modules + uses: actions/cache@v3 + id: playwright-cache + with: + path: | + **/playwright/node_modules + key: cache-playwright-${{ hashFiles('**/playwright/package-lock.json') }} - name: Install dependencies + if: steps.playwright-cache.outputs.cache-hit != 'true' working-directory: ./scripts/playwright run: npm install - name: Install Playwright Browsers diff --git a/scripts/playwright/playwright.config.ts b/scripts/playwright/playwright.config.ts index 494b4dba1d..d2e3135ac2 100644 --- a/scripts/playwright/playwright.config.ts +++ b/scripts/playwright/playwright.config.ts @@ -24,7 +24,8 @@ const config: PlaywrightTestConfig = { /* Run tests in files in parallel */ fullyParallel: true, /* Fail the build on CI if you accidentally left test.only in the source code. */ - forbidOnly: !!process.env.CI, + // forbidOnly: !!process.env.CI, + forbidOnly: false, /* Retry on CI only */ retries: process.env.CI ? 2 : 0, /* Opt out of parallel tests on CI. */ diff --git a/scripts/playwright/tests/columnSingleSelect.spec.ts b/scripts/playwright/tests/columnSingleSelect.spec.ts index 4596d4ba2b..50dbaea6a7 100644 --- a/scripts/playwright/tests/columnSingleSelect.spec.ts +++ b/scripts/playwright/tests/columnSingleSelect.spec.ts @@ -18,7 +18,7 @@ test.describe('Single select', () => { await grid.addNewRow({ index: 0, value: 'Row 0' }); }); - test('Select and clear options and rename options', async () => { + test.only('Select and clear options and rename options', async () => { await grid.cell.selectOption.select({ index: 0, columnHeader: 'SingleSelect', option: 'Option 1' }); await grid.cell.selectOption.verify({ index: 0, columnHeader: 'SingleSelect', option: 'Option 1' });