From 51d839f082568333e3a8f545288b5a055bad3732 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaros=C5=82aw=20Sadzi=C5=84ski?= Date: Fri, 30 Sep 2022 16:45:28 +0200 Subject: [PATCH 1/2] Adding dedicated folder for external tests --- package.json | 1 + test/deployment/ActionLog.ts | 1 + test/deployment/ChoiceList.ts | 1 + test/deployment/DuplicateDocument.ts | 1 + test/deployment/Fork.ts | 1 + test/deployment/HomeIntro.ts | 1 + test/deployment/Pages.ts | 1 + test/deployment/README.md | 4 ++++ test/deployment/ReferenceColumns.ts | 1 + test/deployment/ReferenceList.ts | 1 + test/deployment/Smoke.ts | 1 + test/nbrowser/Localization.ts | 5 ++++- test/test_under_docker.sh | 2 +- 13 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 test/deployment/ActionLog.ts create mode 100644 test/deployment/ChoiceList.ts create mode 100644 test/deployment/DuplicateDocument.ts create mode 100644 test/deployment/Fork.ts create mode 100644 test/deployment/HomeIntro.ts create mode 100644 test/deployment/Pages.ts create mode 100644 test/deployment/README.md create mode 100644 test/deployment/ReferenceColumns.ts create mode 100644 test/deployment/ReferenceList.ts create mode 100644 test/deployment/Smoke.ts diff --git a/package.json b/package.json index a49ea86d..b7b1dd20 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "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_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: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", diff --git a/test/deployment/ActionLog.ts b/test/deployment/ActionLog.ts new file mode 100644 index 00000000..4b9ca975 --- /dev/null +++ b/test/deployment/ActionLog.ts @@ -0,0 +1 @@ +import "test/nbrowser/ActionLog"; \ No newline at end of file diff --git a/test/deployment/ChoiceList.ts b/test/deployment/ChoiceList.ts new file mode 100644 index 00000000..1f3af737 --- /dev/null +++ b/test/deployment/ChoiceList.ts @@ -0,0 +1 @@ +import "test/nbrowser/ChoiceList"; \ No newline at end of file diff --git a/test/deployment/DuplicateDocument.ts b/test/deployment/DuplicateDocument.ts new file mode 100644 index 00000000..39928a33 --- /dev/null +++ b/test/deployment/DuplicateDocument.ts @@ -0,0 +1 @@ +import "test/nbrowser/DuplicateDocument"; \ No newline at end of file diff --git a/test/deployment/Fork.ts b/test/deployment/Fork.ts new file mode 100644 index 00000000..604d4cba --- /dev/null +++ b/test/deployment/Fork.ts @@ -0,0 +1 @@ +import "test/nbrowser/Fork"; \ No newline at end of file diff --git a/test/deployment/HomeIntro.ts b/test/deployment/HomeIntro.ts new file mode 100644 index 00000000..8dcee9cb --- /dev/null +++ b/test/deployment/HomeIntro.ts @@ -0,0 +1 @@ +import "test/nbrowser/Pages"; \ No newline at end of file diff --git a/test/deployment/Pages.ts b/test/deployment/Pages.ts new file mode 100644 index 00000000..8dcee9cb --- /dev/null +++ b/test/deployment/Pages.ts @@ -0,0 +1 @@ +import "test/nbrowser/Pages"; \ No newline at end of file diff --git a/test/deployment/README.md b/test/deployment/README.md new file mode 100644 index 00000000..9ea68219 --- /dev/null +++ b/test/deployment/README.md @@ -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). \ No newline at end of file diff --git a/test/deployment/ReferenceColumns.ts b/test/deployment/ReferenceColumns.ts new file mode 100644 index 00000000..4f83cdb0 --- /dev/null +++ b/test/deployment/ReferenceColumns.ts @@ -0,0 +1 @@ +import "test/nbrowser/ReferenceColumns"; \ No newline at end of file diff --git a/test/deployment/ReferenceList.ts b/test/deployment/ReferenceList.ts new file mode 100644 index 00000000..1de64306 --- /dev/null +++ b/test/deployment/ReferenceList.ts @@ -0,0 +1 @@ +import "test/nbrowser/ReferenceList"; \ No newline at end of file diff --git a/test/deployment/Smoke.ts b/test/deployment/Smoke.ts new file mode 100644 index 00000000..e3146458 --- /dev/null +++ b/test/deployment/Smoke.ts @@ -0,0 +1 @@ +import "test/nbrowser/Smoke"; \ No newline at end of file diff --git a/test/nbrowser/Localization.ts b/test/nbrowser/Localization.ts index 6ab7d2bc..b1179186 100644 --- a/test/nbrowser/Localization.ts +++ b/test/nbrowser/Localization.ts @@ -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(); try { // Wrong path to locales. diff --git a/test/test_under_docker.sh b/test/test_under_docker.sh index e2db8131..73682fc7 100755 --- a/test/test_under_docker.sh +++ b/test/test_under_docker.sh @@ -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 -g ${GREP_TESTS:-''} "$@" + $MOCHA _build/test/deployment/*.js --slow 6000 -g ${GREP_TESTS:-''} "$@" From a8ead09fc539e6d46e9121e8e11b10cacb8d06ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaros=C5=82aw=20Sadzi=C5=84ski?= Date: Fri, 30 Sep 2022 17:00:38 +0200 Subject: [PATCH 2/2] Adding new lines at the end --- test/deployment/ActionLog.ts | 2 +- test/deployment/ChoiceList.ts | 2 +- test/deployment/DuplicateDocument.ts | 2 +- test/deployment/Fork.ts | 2 +- test/deployment/HomeIntro.ts | 2 +- test/deployment/Pages.ts | 2 +- test/deployment/README.md | 2 +- test/deployment/ReferenceColumns.ts | 2 +- test/deployment/ReferenceList.ts | 2 +- test/deployment/Smoke.ts | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/test/deployment/ActionLog.ts b/test/deployment/ActionLog.ts index 4b9ca975..4a9c7c52 100644 --- a/test/deployment/ActionLog.ts +++ b/test/deployment/ActionLog.ts @@ -1 +1 @@ -import "test/nbrowser/ActionLog"; \ No newline at end of file +import "test/nbrowser/ActionLog"; diff --git a/test/deployment/ChoiceList.ts b/test/deployment/ChoiceList.ts index 1f3af737..389d6c9a 100644 --- a/test/deployment/ChoiceList.ts +++ b/test/deployment/ChoiceList.ts @@ -1 +1 @@ -import "test/nbrowser/ChoiceList"; \ No newline at end of file +import "test/nbrowser/ChoiceList"; diff --git a/test/deployment/DuplicateDocument.ts b/test/deployment/DuplicateDocument.ts index 39928a33..993a1d80 100644 --- a/test/deployment/DuplicateDocument.ts +++ b/test/deployment/DuplicateDocument.ts @@ -1 +1 @@ -import "test/nbrowser/DuplicateDocument"; \ No newline at end of file +import "test/nbrowser/DuplicateDocument"; diff --git a/test/deployment/Fork.ts b/test/deployment/Fork.ts index 604d4cba..9f1da80e 100644 --- a/test/deployment/Fork.ts +++ b/test/deployment/Fork.ts @@ -1 +1 @@ -import "test/nbrowser/Fork"; \ No newline at end of file +import "test/nbrowser/Fork"; diff --git a/test/deployment/HomeIntro.ts b/test/deployment/HomeIntro.ts index 8dcee9cb..508a9e94 100644 --- a/test/deployment/HomeIntro.ts +++ b/test/deployment/HomeIntro.ts @@ -1 +1 @@ -import "test/nbrowser/Pages"; \ No newline at end of file +import "test/nbrowser/HomeIntro"; diff --git a/test/deployment/Pages.ts b/test/deployment/Pages.ts index 8dcee9cb..b510e64d 100644 --- a/test/deployment/Pages.ts +++ b/test/deployment/Pages.ts @@ -1 +1 @@ -import "test/nbrowser/Pages"; \ No newline at end of file +import "test/nbrowser/Pages"; diff --git a/test/deployment/README.md b/test/deployment/README.md index 9ea68219..f2163593 100644 --- a/test/deployment/README.md +++ b/test/deployment/README.md @@ -1,4 +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). \ No newline at end of file +a docker container (i.e: tests that don't rely on in-memory TestServer). diff --git a/test/deployment/ReferenceColumns.ts b/test/deployment/ReferenceColumns.ts index 4f83cdb0..48272984 100644 --- a/test/deployment/ReferenceColumns.ts +++ b/test/deployment/ReferenceColumns.ts @@ -1 +1 @@ -import "test/nbrowser/ReferenceColumns"; \ No newline at end of file +import "test/nbrowser/ReferenceColumns"; diff --git a/test/deployment/ReferenceList.ts b/test/deployment/ReferenceList.ts index 1de64306..47186612 100644 --- a/test/deployment/ReferenceList.ts +++ b/test/deployment/ReferenceList.ts @@ -1 +1 @@ -import "test/nbrowser/ReferenceList"; \ No newline at end of file +import "test/nbrowser/ReferenceList"; diff --git a/test/deployment/Smoke.ts b/test/deployment/Smoke.ts index e3146458..2e0bff89 100644 --- a/test/deployment/Smoke.ts +++ b/test/deployment/Smoke.ts @@ -1 +1 @@ -import "test/nbrowser/Smoke"; \ No newline at end of file +import "test/nbrowser/Smoke";