Browse Source

fix(test): Fixed issues with playwright folder change

pull/4278/head
Muhammed Mustafa 2 years ago
parent
commit
7d1500f85a
  1. 2
      .github/workflows/playwright-test-workflow.yml
  2. 2
      packages/nc-gui/tests/playwright/scripts/docker-compose-mysql-playwright.yml
  3. 2
      packages/nc-gui/tests/playwright/scripts/docker-compose-pg-pw-quick.yml
  4. 2
      packages/nc-gui/tests/playwright/scripts/docker-compose-pg.yml
  5. 2
      packages/nc-gui/tests/playwright/setup/db.ts

2
.github/workflows/playwright-test-workflow.yml

@ -57,7 +57,7 @@ jobs:
- name: setup mysql - name: setup mysql
if: ${{ inputs.db == 'mysql' }} if: ${{ inputs.db == 'mysql' }}
working-directory: ./ working-directory: ./
run: docker-compose -f ./packages/nc-gui/tests/playwright/scripts/docker-compose-playwright.yml up -d & run: docker-compose -f ./packages/nc-gui/tests/playwright/scripts/docker-compose-mysql-playwright.yml up -d &
- name: setup pg - name: setup pg
if: ${{ inputs.db == 'pg' }} if: ${{ inputs.db == 'pg' }}
working-directory: ./ working-directory: ./

2
packages/nc-gui/tests/playwright/scripts/docker-compose-playwright.yml → packages/nc-gui/tests/playwright/scripts/docker-compose-mysql-playwright.yml

@ -11,4 +11,4 @@ services:
environment: environment:
MYSQL_ROOT_PASSWORD: password MYSQL_ROOT_PASSWORD: password
volumes: volumes:
- ../../../../packages/nocodb/tests/mysql-sakila-db:/docker-entrypoint-initdb.d - ../../../../../packages/nocodb/tests/mysql-sakila-db:/docker-entrypoint-initdb.d

2
packages/nc-gui/tests/playwright/scripts/docker-compose-pg-pw-quick.yml

@ -9,7 +9,7 @@ services:
ports: ports:
- 5432:5432 - 5432:5432
volumes: volumes:
- ../../../../packages/nocodb/tests/pg-cy-quick:/docker-entrypoint-initdb.d - ../../../../../packages/nocodb/tests/pg-cy-quick:/docker-entrypoint-initdb.d
healthcheck: healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"] test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s interval: 10s

2
packages/nc-gui/tests/playwright/scripts/docker-compose-pg.yml

@ -9,7 +9,7 @@ services:
ports: ports:
- 5432:5432 - 5432:5432
volumes: volumes:
- ../../../packages/nocodb/tests/pg-sakila-db:/docker-entrypoint-initdb.d - ../../../../../packages/nocodb/tests/pg-sakila-db:/docker-entrypoint-initdb.d
healthcheck: healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"] test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s interval: 10s

2
packages/nc-gui/tests/playwright/setup/db.ts

@ -53,7 +53,7 @@ const mysqlExec = async query => {
async function sqliteExec(query) { async function sqliteExec(query) {
const parallelIndex = process.env.TEST_PARALLEL_INDEX; const parallelIndex = process.env.TEST_PARALLEL_INDEX;
const rootProjectDir = __dirname.replace('/scripts/playwright/setup', ''); const rootProjectDir = __dirname.replace('/packages/nc-gui/tests/playwright/setup', '');
await sqliteDb.open(`${rootProjectDir}/packages/nocodb/test_sakila_${parallelIndex}.db`); await sqliteDb.open(`${rootProjectDir}/packages/nocodb/test_sakila_${parallelIndex}.db`);
await sqliteDb.run(query); await sqliteDb.run(query);

Loading…
Cancel
Save