Merge pull request #243 from gristlabs/skip-external-tests

Skipping tests that can't be run on external server.
This commit is contained in:
jarek 2022-08-12 20:28:54 +02:00 committed by GitHub
commit e90f48c551
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 2 deletions

View File

@ -12,7 +12,7 @@
"install:python3": "buildtools/prepare_python3.sh",
"build:prod": "buildtools/build.sh",
"start:prod": "sandbox/run.sh",
"test": "GRIST_SESSION_COOKIE=grist_test_cookie GRIST_TEST_LOGIN=1 TEST_SUPPORT_API_KEY=api_key_for_support TEST_CLEAN_DATABASE=true NODE_PATH=_build:_build/stubs:_build/ext mocha -g ${GREP_TEST:-''} _build/test/nbrowser/*.js _build/test/server/**/*.js _build/test/gen-server/**/*.js",
"test": "GRIST_SESSION_COOKIE=grist_test_cookie GRIST_TEST_LOGIN=1 TEST_SUPPORT_API_KEY=api_key_for_support TEST_CLEAN_DATABASE=true NODE_PATH=_build:_build/stubs:_build/ext mocha -g ${GREP_TESTS:-''} _build/test/nbrowser/*.js _build/test/server/**/*.js _build/test/gen-server/**/*.js",
"test:server": "GRIST_SESSION_COOKIE=grist_test_cookie NODE_PATH=_build:_build/stubs:_build/ext mocha _build/test/server/**/*.js _build/test/gen-server/**/*.js",
"test:smoke": "NODE_PATH=_build:_build/stubs:_build/ext mocha _build/test/nbrowser/Smoke.js",
"test:docker": "./test/test_under_docker.sh",

View File

@ -70,6 +70,9 @@ describe('ReferenceColumns', function() {
});
it('should allow entering numeric id before target table is loaded', async function() {
if (server.isExternalServer()) {
this.skip();
}
// Refresh the document.
await driver.navigate().refresh();
await gu.waitForDocToLoad();

View File

@ -298,6 +298,9 @@ describe('ReferenceList', function() {
});
it('should allow entering numeric id before target table is loaded', async function() {
if (server.isExternalServer()) {
this.skip();
}
// Refresh the document.
await driver.navigate().refresh();
await gu.waitForDocToLoad();

View File

@ -176,6 +176,9 @@ export class TestServerMerged implements IMochaServer {
* request takes a long time.
*/
public async pauseUntil(callback: () => Promise<void>) {
if (this.isExternalServer()) {
throw new Error("Can't pause external server");
}
log.info("Pausing node server");
this._server.kill('SIGSTOP');
try {

View File

@ -64,4 +64,4 @@ TEST_ADD_SAMPLES=1 TEST_ACCOUNT_PASSWORD=not-needed \
GRIST_SESSION_COOKIE=grist_test_cookie \
GRIST_TEST_LOGIN=1 \
NODE_PATH=_build:_build/stubs \
$MOCHA _build/test/nbrowser/*.js "$@"
$MOCHA _build/test/nbrowser/*.js -g ${GREP_TESTS:-''} "$@"