From 3029fe000a6a9bf6add4cb8f7b4828e7b6e72b25 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Mon, 22 Jan 2024 11:54:32 +0100 Subject: [PATCH] Fixed CI --- .github/workflows/ui-test.yml | 7 +++++-- tests/UI/docker-compose.yml | 11 ++++++----- tests/UI/playwright.config.ts | 14 +++----------- 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ui-test.yml b/.github/workflows/ui-test.yml index 867dafa2..e435b15d 100644 --- a/.github/workflows/ui-test.yml +++ b/.github/workflows/ui-test.yml @@ -25,7 +25,10 @@ jobs: run: npm install && npm run build - name: Start containers - run: docker-compose -f "docker-compose.yml" up -d --build + run: | + docker-compose -f "docker-compose.yml" up -d --build + while ! nc -z localhost 8000; do sleep 1; done; + working-directory: tests/UI/ - name: Install dependencies run: npm ci @@ -43,5 +46,5 @@ jobs: if: always() with: name: playwright-report - path: playwright-report/ + path: tests/UI/reports/ retention-days: 30 \ No newline at end of file diff --git a/tests/UI/docker-compose.yml b/tests/UI/docker-compose.yml index 5dc6f371..a9549f84 100644 --- a/tests/UI/docker-compose.yml +++ b/tests/UI/docker-compose.yml @@ -1,12 +1,14 @@ +version: '3.7' + services: prestashop: image: prestashop/prestashop-flashlight:${PS_VERSION} container_name: prestashop - depends_on: - mysql: - condition: service_healthy + depends_on: + - mysql environment: - DEBUG_MODE=true + - PS_DOMAIN=localhost:8000 volumes: - type: bind # Local Path @@ -15,7 +17,6 @@ services: target: /var/www/html/modules/blockwishlist ports: - 8000:80 - mysql: image: mariadb:lts container_name: prestashop-mysql @@ -38,4 +39,4 @@ services: - MYSQL_PASSWORD=prestashop - MYSQL_ROOT_PASSWORD=prestashop - MYSQL_PORT=3306 - - MYSQL_DATABASE=prestashop \ No newline at end of file + - MYSQL_DATABASE=prestashop diff --git a/tests/UI/playwright.config.ts b/tests/UI/playwright.config.ts index 29e999c9..d523cd33 100644 --- a/tests/UI/playwright.config.ts +++ b/tests/UI/playwright.config.ts @@ -4,7 +4,7 @@ import path from 'path'; function loadGlobal(): void { global.FO = { - URL: process.env.URL_FO || 'http://localhost/prestashop/', + URL: process.env.URL_FO || 'http://localhost:8000/', }; /* @@ -14,8 +14,8 @@ function loadGlobal(): void { global.BO = { URL: process.env.URL_BO || `${global.FO.URL}admin-dev/`, - EMAIL: process.env.LOGIN || 'demo@prestashop.com', - PASSWD: process.env.PASSWD || 'Correct Horse Battery Staple', + EMAIL: process.env.LOGIN || 'admin@prestashop.com', + PASSWD: process.env.PASSWD || 'prestashop', FIRSTNAME: process.env.FIRSTNAME || 'Marc', LASTNAME: process.env.LASTNAME || 'Beier', }; @@ -64,14 +64,6 @@ function loadGlobal(): void { smtpServer: process.env.SMTP_SERVER || 'localhost', silent: true, }; - - global.keycloakConfig = { - keycloakExternalUrl: process.env.KEYCLOAK_URL_EXTERNAL || 'http://127.0.0.1:8003', - keycloakInternalUrl: process.env.KEYCLOAK_URL_INTERNAL || 'http://keycloak:8080', - keycloakAdminUser: process.env.KEYCLOAK_ADMIN_USER || 'admin', - keycloakAdminPass: process.env.KEYCLOAK_ADMIN_PASS || 'admin', - keycloakClientId: process.env.KEYCLOAK_CLIENT_ID || 'KEYCLOAK_CLIENT_ID', - }; } /**