From 9fba64b520b59bcb6d8dbce827e4f6a403930eaa Mon Sep 17 00:00:00 2001 From: Edwin Takahashi Date: Mon, 13 Sep 2021 13:56:09 -0700 Subject: [PATCH 1/4] Export headless env var --- .teamcity/_self/projects/WebApp.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.teamcity/_self/projects/WebApp.kt b/.teamcity/_self/projects/WebApp.kt index dd4f65b41d69e6..eff071fb4c794a 100644 --- a/.teamcity/_self/projects/WebApp.kt +++ b/.teamcity/_self/projects/WebApp.kt @@ -627,6 +627,7 @@ fun playwrightPrBuildType( targetDevice: String, buildUuid: String ): BuildType export NODE_CONFIG_ENV=test export PLAYWRIGHT_BROWSERS_PATH=0 export TEAMCITY_VERSION=2021 + export HEADLESS=1 # Decrypt config openssl aes-256-cbc -md sha1 -d -in ./config/encrypted.enc -out ./config/local-test.json -k "%CONFIG_E2E_ENCRYPTION_KEY%" @@ -637,7 +638,7 @@ fun playwrightPrBuildType( targetDevice: String, buildUuid: String ): BuildType export NODE_CONFIG="{\"calypsoBaseURL\":\"${'$'}{URL%/}\"}" export DEBUG=pw:api - xvfb-run yarn jest --reporters=jest-teamcity --reporters=default --maxWorkers=%E2E_WORKERS% --group=calypso-pr + yarn jest --reporters=jest-teamcity --reporters=default --maxWorkers=%E2E_WORKERS% --group=calypso-pr """.trimIndent() dockerImage = "%docker_image_e2e%" } @@ -751,11 +752,12 @@ object PreReleaseE2ETests : BuildType({ export LOCALE=en export NODE_CONFIG="{\"calypsoBaseURL\":\"${'$'}{URL%/}\"}" export DEBUG=pw:api + export HEADLESS=1 # Decrypt config openssl aes-256-cbc -md sha1 -d -in ./config/encrypted.enc -out ./config/local-test.json -k "%CONFIG_E2E_ENCRYPTION_KEY%" - xvfb-run yarn jest --reporters=jest-teamcity --reporters=default --maxWorkers=%E2E_WORKERS% --group=calypso-release + yarn jest --reporters=jest-teamcity --reporters=default --maxWorkers=%E2E_WORKERS% --group=calypso-release """.trimIndent() dockerImage = "%docker_image_e2e%" } From 6924297a09e684ff1888bfa8242ba28325786fbe Mon Sep 17 00:00:00 2001 From: Edwin Takahashi Date: Wed, 29 Sep 2021 17:00:41 -0700 Subject: [PATCH 2/4] Fix HEADLESS env var. Re-add xvfb-run. --- .teamcity/_self/projects/WebApp.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.teamcity/_self/projects/WebApp.kt b/.teamcity/_self/projects/WebApp.kt index eff071fb4c794a..95a37b57c9e815 100644 --- a/.teamcity/_self/projects/WebApp.kt +++ b/.teamcity/_self/projects/WebApp.kt @@ -627,7 +627,7 @@ fun playwrightPrBuildType( targetDevice: String, buildUuid: String ): BuildType export NODE_CONFIG_ENV=test export PLAYWRIGHT_BROWSERS_PATH=0 export TEAMCITY_VERSION=2021 - export HEADLESS=1 + export HEADLESS=true # Decrypt config openssl aes-256-cbc -md sha1 -d -in ./config/encrypted.enc -out ./config/local-test.json -k "%CONFIG_E2E_ENCRYPTION_KEY%" @@ -638,7 +638,7 @@ fun playwrightPrBuildType( targetDevice: String, buildUuid: String ): BuildType export NODE_CONFIG="{\"calypsoBaseURL\":\"${'$'}{URL%/}\"}" export DEBUG=pw:api - yarn jest --reporters=jest-teamcity --reporters=default --maxWorkers=%E2E_WORKERS% --group=calypso-pr + xvfb-run yarn jest --reporters=jest-teamcity --reporters=default --maxWorkers=%E2E_WORKERS% --group=calypso-pr """.trimIndent() dockerImage = "%docker_image_e2e%" } @@ -752,12 +752,12 @@ object PreReleaseE2ETests : BuildType({ export LOCALE=en export NODE_CONFIG="{\"calypsoBaseURL\":\"${'$'}{URL%/}\"}" export DEBUG=pw:api - export HEADLESS=1 + export HEADLESS=true # Decrypt config openssl aes-256-cbc -md sha1 -d -in ./config/encrypted.enc -out ./config/local-test.json -k "%CONFIG_E2E_ENCRYPTION_KEY%" - yarn jest --reporters=jest-teamcity --reporters=default --maxWorkers=%E2E_WORKERS% --group=calypso-release + xvfb-run yarn jest --reporters=jest-teamcity --reporters=default --maxWorkers=%E2E_WORKERS% --group=calypso-release """.trimIndent() dockerImage = "%docker_image_e2e%" } From 879fcea01502148c333cb89568ba8724119380ba Mon Sep 17 00:00:00 2001 From: Edwin Takahashi Date: Thu, 30 Sep 2021 13:24:03 -0700 Subject: [PATCH 3/4] Try dropping xvfb-run --- .teamcity/_self/projects/WebApp.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.teamcity/_self/projects/WebApp.kt b/.teamcity/_self/projects/WebApp.kt index 95a37b57c9e815..c6f52f9c7d24e5 100644 --- a/.teamcity/_self/projects/WebApp.kt +++ b/.teamcity/_self/projects/WebApp.kt @@ -638,7 +638,7 @@ fun playwrightPrBuildType( targetDevice: String, buildUuid: String ): BuildType export NODE_CONFIG="{\"calypsoBaseURL\":\"${'$'}{URL%/}\"}" export DEBUG=pw:api - xvfb-run yarn jest --reporters=jest-teamcity --reporters=default --maxWorkers=%E2E_WORKERS% --group=calypso-pr + yarn jest --reporters=jest-teamcity --reporters=default --maxWorkers=%E2E_WORKERS% specs/specs-playwright/wp-stats """.trimIndent() dockerImage = "%docker_image_e2e%" } From d175f01715bad5bb1deac27d7fed4d08bfd191a7 Mon Sep 17 00:00:00 2001 From: Edwin Takahashi Date: Thu, 30 Sep 2021 14:34:54 -0700 Subject: [PATCH 4/4] Enable all tests --- .teamcity/_self/projects/WebApp.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.teamcity/_self/projects/WebApp.kt b/.teamcity/_self/projects/WebApp.kt index c6f52f9c7d24e5..510394bbf64bd7 100644 --- a/.teamcity/_self/projects/WebApp.kt +++ b/.teamcity/_self/projects/WebApp.kt @@ -638,7 +638,7 @@ fun playwrightPrBuildType( targetDevice: String, buildUuid: String ): BuildType export NODE_CONFIG="{\"calypsoBaseURL\":\"${'$'}{URL%/}\"}" export DEBUG=pw:api - yarn jest --reporters=jest-teamcity --reporters=default --maxWorkers=%E2E_WORKERS% specs/specs-playwright/wp-stats + yarn jest --reporters=jest-teamcity --reporters=default --maxWorkers=%E2E_WORKERS% --group=calypso-pr """.trimIndent() dockerImage = "%docker_image_e2e%" } @@ -757,7 +757,7 @@ object PreReleaseE2ETests : BuildType({ # Decrypt config openssl aes-256-cbc -md sha1 -d -in ./config/encrypted.enc -out ./config/local-test.json -k "%CONFIG_E2E_ENCRYPTION_KEY%" - xvfb-run yarn jest --reporters=jest-teamcity --reporters=default --maxWorkers=%E2E_WORKERS% --group=calypso-release + yarn jest --reporters=jest-teamcity --reporters=default --maxWorkers=%E2E_WORKERS% --group=calypso-release """.trimIndent() dockerImage = "%docker_image_e2e%" }