Browse Source

feat(testing): Enforced our npm script naming standards to playwrights npm scripts and minor cleanup

pull/3848/head
Muhammed Mustafa 2 years ago
parent
commit
0a4c43fb2a
  1. 1
      packages/nocodb/src/lib/meta/api/testApis.ts
  2. 23
      packages/nocodb/src/run/testDocker.ts
  3. 8
      scripts/playwright/package.json

1
packages/nocodb/src/lib/meta/api/testApis.ts

@ -4,7 +4,6 @@ import { Request, Router } from 'express';
import { TestResetService } from '../../services/test/TestResetService'; import { TestResetService } from '../../services/test/TestResetService';
export async function reset(req: Request<any, any>, res) { export async function reset(req: Request<any, any>, res) {
console.log('resetting id', req.body);
const service = new TestResetService({ const service = new TestResetService({
parallelId: req.body.parallelId, parallelId: req.body.parallelId,
dbType: req.body.dbType, dbType: req.body.dbType,

23
packages/nocodb/src/run/testDocker.ts

@ -40,26 +40,3 @@ process.env[`DEBUG`] = 'xc*';
console.log(response.data); console.log(response.data);
} }
})().catch((e) => console.log(e)); })().catch((e) => console.log(e));
/**
* @copyright Copyright (c) 2021, Xgene Cloud Ltd
*
* @author Naveen MR <oof1lab@gmail.com>
* @author Pranav C Balan <pranavxc@gmail.com>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

8
scripts/playwright/package.json

@ -6,10 +6,10 @@
"scripts": { "scripts": {
"test": "TRACE=true npx playwright test --workers=4", "test": "TRACE=true npx playwright test --workers=4",
"test:repeat": "TRACE=true npx playwright test --workers=4 --repeat-each=10", "test:repeat": "TRACE=true npx playwright test --workers=4 --repeat-each=10",
"quick-test": "TRACE=true PW_QUICK_TEST=1 npx playwright test --workers=4", "test:quick": "TRACE=true PW_QUICK_TEST=1 npx playwright test --workers=4",
"test-debug": "./startPlayWrightServer.sh; PW_TEST_REUSE_CONTEXT=1 PW_TEST_CONNECT_WS_ENDPOINT=ws://127.0.0.1:31000/ PWDEBUG=console npx playwright test -c playwright.config.ts --headed --project=chromium --retries 0 --timeout 0 --workers 1 --max-failures=1", "test:debug": "./startPlayWrightServer.sh; PW_TEST_REUSE_CONTEXT=1 PW_TEST_CONNECT_WS_ENDPOINT=ws://127.0.0.1:31000/ PWDEBUG=console npx playwright test -c playwright.config.ts --headed --project=chromium --retries 0 --timeout 0 --workers 1 --max-failures=1",
"test-debug-quick-sqlite": "./startPlayWrightServer.sh; PW_QUICK_TEST=1 PW_TEST_REUSE_CONTEXT=1 PW_TEST_CONNECT_WS_ENDPOINT=ws://127.0.0.1:31000/ PWDEBUG=console npx playwright test -c playwright.config.ts --headed --project=chromium --retries 0 --timeout 5 --workers 1 --max-failures=1", "test:debug:quick:sqlite": "./startPlayWrightServer.sh; PW_QUICK_TEST=1 PW_TEST_REUSE_CONTEXT=1 PW_TEST_CONNECT_WS_ENDPOINT=ws://127.0.0.1:31000/ PWDEBUG=console npx playwright test -c playwright.config.ts --headed --project=chromium --retries 0 --timeout 5 --workers 1 --max-failures=1",
"ci-test-mysql": "E2E_DB_TYPE=mysql npx playwright test --workers=2" "ci:test:mysql": "E2E_DB_TYPE=mysql npx playwright test --workers=2"
}, },
"keywords": [], "keywords": [],
"author": "", "author": "",

Loading…
Cancel
Save