Browse Source

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
pull/3848/head
Muhammed Mustafa 2 years ago committed by Muhammed Mustafa
parent
commit
4518b95154
  1. 8
      .github/workflows/ci-cd.yml
  2. 3
      scripts/playwright/playwright.config.ts
  3. 2
      scripts/playwright/tests/columnSingleSelect.spec.ts

8
.github/workflows/ci-cd.yml

@ -1554,7 +1554,15 @@ jobs:
- name: Run backend - name: Run backend
working-directory: ./packages/nocodb working-directory: ./packages/nocodb
run: npm run watch:run:playwright > mysql_test_backend.log & 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 - name: Install dependencies
if: steps.playwright-cache.outputs.cache-hit != 'true'
working-directory: ./scripts/playwright working-directory: ./scripts/playwright
run: npm install run: npm install
- name: Install Playwright Browsers - name: Install Playwright Browsers

3
scripts/playwright/playwright.config.ts

@ -24,7 +24,8 @@ const config: PlaywrightTestConfig = {
/* Run tests in files in parallel */ /* Run tests in files in parallel */
fullyParallel: true, fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */ /* 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 */ /* Retry on CI only */
retries: process.env.CI ? 2 : 0, retries: process.env.CI ? 2 : 0,
/* Opt out of parallel tests on CI. */ /* Opt out of parallel tests on CI. */

2
scripts/playwright/tests/columnSingleSelect.spec.ts

@ -18,7 +18,7 @@ test.describe('Single select', () => {
await grid.addNewRow({ index: 0, value: 'Row 0' }); 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.select({ index: 0, columnHeader: 'SingleSelect', option: 'Option 1' });
await grid.cell.selectOption.verify({ index: 0, columnHeader: 'SingleSelect', option: 'Option 1' }); await grid.cell.selectOption.verify({ index: 0, columnHeader: 'SingleSelect', option: 'Option 1' });

Loading…
Cancel
Save