Browse Source

feat(test): Removed disabling of items in CI for testing

pull/4521/head
Muhammed Mustafa 2 years ago
parent
commit
5d7408c0c0
  1. 87
      .github/workflows/playwright-test-workflow.yml
  2. 14
      tests/playwright/tests/columnSingleSelect.spec.ts
  3. 1
      tests/playwright/tests/views.spec.ts

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

@ -94,62 +94,59 @@ jobs:
sleep 2 sleep 2
done done
# - name: Run Playwright tests - name: Run Playwright tests
# working-directory: ./tests/playwright working-directory: ./tests/playwright
# run: E2E_DB_TYPE=${{ inputs.db }} npm run ci:test:shard:${{ inputs.shard }} run: E2E_DB_TYPE=${{ inputs.db }} npm run ci:test:shard:${{ inputs.shard }}
# Stress test added/modified tests # Stress test added/modified tests
- name: Fetch develop branch - name: Fetch develop branch
working-directory: ./tests/playwright working-directory: ./tests/playwright
run: git fetch origin develop run: git fetch origin develop
# - name: Pull develop branch
# working-directory: ./tests/playwright
# run: git pull origin develop
- name: Stress test - name: Stress test
working-directory: ./tests/playwright working-directory: ./tests/playwright
run: E2E_DB_TYPE=${{ inputs.db }} node ./scripts/stressTestNewlyAddedTest.js run: E2E_DB_TYPE=${{ inputs.db }} node ./scripts/stressTestNewlyAddedTest.js
# Quick tests (pg on sqlite shard 0 and sqlite on sqlite shard 1) # Quick tests (pg on sqlite shard 0 and sqlite on sqlite shard 1)
# - name: Run quick server and tests (pg) - name: Run quick server and tests (pg)
# if: ${{ inputs.db == 'sqlite' && inputs.shard == '1' }} if: ${{ inputs.db == 'sqlite' && inputs.shard == '1' }}
# working-directory: ./packages/nocodb working-directory: ./packages/nocodb
# run: | run: |
# kill -9 $(lsof -t -i:8080) kill -9 $(lsof -t -i:8080)
# npm run watch:run:playwright:pg:cyquick & npm run watch:run:playwright:pg:cyquick &
# - name: Run quick server and tests (sqlite) - name: Run quick server and tests (sqlite)
# if: ${{ inputs.db == 'sqlite' && inputs.shard == '2' }} if: ${{ inputs.db == 'sqlite' && inputs.shard == '2' }}
# working-directory: ./packages/nocodb working-directory: ./packages/nocodb
# run: | run: |
# kill -9 $(lsof -t -i:8080) kill -9 $(lsof -t -i:8080)
# npm run watch:run:playwright:quick > quick_${{ inputs.shard }}_test_backend.log & npm run watch:run:playwright:quick > quick_${{ inputs.shard }}_test_backend.log &
# - name: Wait for backend & run quick tests - name: Wait for backend & run quick tests
# if: ${{ inputs.db == 'sqlite' }} if: ${{ inputs.db == 'sqlite' }}
# working-directory: ./tests/playwright working-directory: ./tests/playwright
# run: | run: |
# while ! curl --output /dev/null --silent --head --fail http://localhost:8080; do while ! curl --output /dev/null --silent --head --fail http://localhost:8080; do
# printf '.' printf '.'
# sleep 2 sleep 2
# done done
# PLAYWRIGHT_HTML_REPORT=playwright-report-quick npm run test:quick PLAYWRIGHT_HTML_REPORT=playwright-report-quick npm run test:quick
# - uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
# if: ${{ inputs.db == 'sqlite' }} if: ${{ inputs.db == 'sqlite' }}
# with: with:
# name: quick-backend-log-${{ inputs.shard }} name: quick-backend-log-${{ inputs.shard }}
# path: ./packages/nocodb/quick_${{ inputs.shard }}_test_backend.log path: ./packages/nocodb/quick_${{ inputs.shard }}_test_backend.log
# retention-days: 2 retention-days: 2
# - uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
# if: ${{ inputs.db == 'sqlite' }} if: ${{ inputs.db == 'sqlite' }}
# with: with:
# name: playwright-report-quick-${{ inputs.shard }} name: playwright-report-quick-${{ inputs.shard }}
# path: ./tests/playwright/playwright-report-quick/ path: ./tests/playwright/playwright-report-quick/
# retention-days: 2 retention-days: 2
# - uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
# if: always() if: always()
# with: with:
# name: playwright-report-${{ inputs.db }}-${{ inputs.shard }} name: playwright-report-${{ inputs.db }}-${{ inputs.shard }}
# path: ./tests/playwright/playwright-report/ path: ./tests/playwright/playwright-report/
# retention-days: 2 retention-days: 2
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
if: always() if: always()
with: with:

14
tests/playwright/tests/columnSingleSelect.spec.ts

@ -70,19 +70,7 @@ test.describe('Single select', () => {
await grid.column.delete({ title: 'SingleSelect' }); await grid.column.delete({ title: 'SingleSelect' });
}); });
test('Old Add new option directly from cell', async () => { test('Add new option directly from cell', async () => {
await grid.cell.selectOption.addNewOption({
index: 0,
columnHeader: 'SingleSelect',
option: 'Option added from cell',
});
await grid.cell.selectOption.verify({ index: 0, columnHeader: 'SingleSelect', option: 'Option added from cell' });
await grid.column.delete({ title: 'SingleSelect' });
});
test('New Add new option directly from cell', async () => {
await grid.cell.selectOption.addNewOption({ await grid.cell.selectOption.addNewOption({
index: 0, index: 0,
columnHeader: 'SingleSelect', columnHeader: 'SingleSelect',

1
tests/playwright/tests/views.spec.ts

@ -1,6 +1,5 @@
import { test } from '@playwright/test'; import { test } from '@playwright/test';
import { DashboardPage } from '../pages/Dashboard'; import { DashboardPage } from '../pages/Dashboard';
import setup from '../setup'; import setup from '../setup';
test.describe('Views CRUD Operations', () => { test.describe('Views CRUD Operations', () => {

Loading…
Cancel
Save