From 038a2945cc6b4d75d9b6b8a90af4694f6682afe1 Mon Sep 17 00:00:00 2001 From: Tomas Martykan Date: Mon, 5 Aug 2024 23:09:15 +0200 Subject: [PATCH] test(connect-popup): run methods test on mobile --- docker/docker-compose.connect-popup-ci.yml | 1 + docker/docker-compose.connect-popup-test.yml | 1 + docker/docker-connect-popup-ci.sh | 1 + docker/docker-connect-popup-test.sh | 1 + packages/connect-popup/e2e/playwright.config.ts | 2 +- 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docker/docker-compose.connect-popup-ci.yml b/docker/docker-compose.connect-popup-ci.yml index daed8d3104c8..46855730793a 100644 --- a/docker/docker-compose.connect-popup-ci.yml +++ b/docker/docker-compose.connect-popup-ci.yml @@ -23,6 +23,7 @@ services: - TEST_FILE=$TEST_FILE - IS_WEBEXTENSION=$IS_WEBEXTENSION - CORE_IN_POPUP=$CORE_IN_POPUP + - MOBILE=$MOBILE - TREZOR_CONNECT_SRC=$TREZOR_CONNECT_SRC working_dir: /e2e command: bash -c "npx playwright install && yarn workspace @trezor/connect-popup test:e2e $TEST_FILE" diff --git a/docker/docker-compose.connect-popup-test.yml b/docker/docker-compose.connect-popup-test.yml index ed96e165b8a1..e876a237e0bd 100644 --- a/docker/docker-compose.connect-popup-test.yml +++ b/docker/docker-compose.connect-popup-test.yml @@ -34,6 +34,7 @@ services: - TEST_FILE=$TEST_FILE - IS_WEBEXTENSION=$IS_WEBEXTENSION - CORE_IN_POPUP=$CORE_IN_POPUP + - MOBILE=$MOBILE - TREZOR_CONNECT_SRC=$TREZOR_CONNECT_SRC working_dir: /trezor-suite command: bash -c "docker/wait-for-200.sh http://localhost:8088/index.html && yarn workspace @trezor/connect-popup test:e2e $TEST_FILE" diff --git a/docker/docker-connect-popup-ci.sh b/docker/docker-connect-popup-ci.sh index fc50d9d366a0..d0801e24172b 100755 --- a/docker/docker-connect-popup-ci.sh +++ b/docker/docker-connect-popup-ci.sh @@ -8,5 +8,6 @@ export URL=$URL export TREZOR_CONNECT_SRC=$TREZOR_CONNECT_SRC export CORE_IN_POPUP=$CORE_IN_POPUP export IS_WEBEXTENSION=$IS_WEBEXTENSION +export MOBILE=$MOBILE docker compose -f ./docker/docker-compose.connect-popup-ci.yml up --build --abort-on-container-exit diff --git a/docker/docker-connect-popup-test.sh b/docker/docker-connect-popup-test.sh index a1105f6979fc..f2ffc19fad1f 100755 --- a/docker/docker-connect-popup-test.sh +++ b/docker/docker-connect-popup-test.sh @@ -8,5 +8,6 @@ export TEST_FILE=$1 export TREZOR_CONNECT_SRC=http://localhost:8088/ export CORE_IN_POPUP=$CORE_IN_POPUP export IS_WEBEXTENSION=$IS_WEBEXTENSION +export MOBILE=$MOBILE docker compose -f ./docker/docker-compose.connect-popup-test.yml up --build --abort-on-container-exit diff --git a/packages/connect-popup/e2e/playwright.config.ts b/packages/connect-popup/e2e/playwright.config.ts index 56edfaf4197d..e3379a05507d 100644 --- a/packages/connect-popup/e2e/playwright.config.ts +++ b/packages/connect-popup/e2e/playwright.config.ts @@ -9,7 +9,7 @@ const config: PlaywrightTestConfig = { headless: process.env.HEADLESS === 'true', ignoreHTTPSErrors: true, trace: 'retain-on-failure', - ...devices['Desktop Chrome'], + ...devices[process.env.MOBILE ? 'Pixel 7' : 'Desktop Chrome'], }, }; export default config;