Merge pull request #296 from gristlabs/external-tests

Adding a dedicated folder for external tests
This commit is contained in:
jarek 2022-09-30 20:01:11 +02:00 committed by GitHub
commit b30a9e2f93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 19 additions and 2 deletions

View File

@ -13,6 +13,7 @@
"build:prod": "buildtools/build.sh", "build:prod": "buildtools/build.sh",
"start:prod": "sandbox/run.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_TESTS:-''} _build/test/common/*.js _build/test/client/*.js _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/common/*.js _build/test/client/*.js _build/test/nbrowser/*.js _build/test/server/**/*.js _build/test/gen-server/**/*.js",
"test:nbrowser": "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:-''} --slow 6000 _build/test/nbrowser/**/*.js",
"test:client": "GRIST_SESSION_COOKIE=grist_test_cookie NODE_PATH=_build:_build/stubs:_build/ext mocha _build/test/client/**/*.js", "test:client": "GRIST_SESSION_COOKIE=grist_test_cookie NODE_PATH=_build:_build/stubs:_build/ext mocha _build/test/client/**/*.js",
"test:common": "GRIST_SESSION_COOKIE=grist_test_cookie NODE_PATH=_build:_build/stubs:_build/ext mocha _build/test/common/**/*.js", "test:common": "GRIST_SESSION_COOKIE=grist_test_cookie NODE_PATH=_build:_build/stubs:_build/ext mocha _build/test/common/**/*.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:server": "GRIST_SESSION_COOKIE=grist_test_cookie NODE_PATH=_build:_build/stubs:_build/ext mocha _build/test/server/**/*.js _build/test/gen-server/**/*.js",

View File

@ -0,0 +1 @@
import "test/nbrowser/ActionLog";

View File

@ -0,0 +1 @@
import "test/nbrowser/ChoiceList";

View File

@ -0,0 +1 @@
import "test/nbrowser/DuplicateDocument";

1
test/deployment/Fork.ts Normal file
View File

@ -0,0 +1 @@
import "test/nbrowser/Fork";

View File

@ -0,0 +1 @@
import "test/nbrowser/HomeIntro";

1
test/deployment/Pages.ts Normal file
View File

@ -0,0 +1 @@
import "test/nbrowser/Pages";

View File

@ -0,0 +1,4 @@
# Deployment tests
Link or import here all tests that can be run against an external server or
a docker container (i.e: tests that don't rely on in-memory TestServer).

View File

@ -0,0 +1 @@
import "test/nbrowser/ReferenceColumns";

View File

@ -0,0 +1 @@
import "test/nbrowser/ReferenceList";

1
test/deployment/Smoke.ts Normal file
View File

@ -0,0 +1 @@
import "test/nbrowser/Smoke";

View File

@ -117,7 +117,10 @@ describe("Localization", function() {
}); });
}); });
it("breaks the server if something is wrong with resource files", async () => { it("breaks the server if something is wrong with resource files", async function() {
if (server.isExternalServer()) {
this.skip();
}
const oldEnv = new testUtils.EnvironmentSnapshot(); const oldEnv = new testUtils.EnvironmentSnapshot();
try { try {
// Wrong path to locales. // Wrong path to locales.

View File

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