Skip to content
Snippets Groups Projects
Commit 0e71ca37 authored by s87777's avatar s87777
Browse files

Test23

parent 1355a0d5
No related branches found
No related tags found
No related merge requests found
Pipeline #50068 failed
...@@ -5,4 +5,4 @@ REACT_APP_API_SERVER_URL=http://127.0.0.1:80 ...@@ -5,4 +5,4 @@ REACT_APP_API_SERVER_URL=http://127.0.0.1:80
# related to proxy-setting in package.json # related to proxy-setting in package.json
DANGEROUSLY_DISABLE_HOST_CHECK=true DANGEROUSLY_DISABLE_HOST_CHECK=true
SELENIUM_HOST = selenium__standalone-chrome APP_TESTS_REMOTE_WEB_DRIVER_URL = selenium__standalone-chrome
\ No newline at end of file \ No newline at end of file
...@@ -14,7 +14,7 @@ build_test_frontend: ...@@ -14,7 +14,7 @@ build_test_frontend:
alias: chrome alias: chrome
variables: variables:
SELENIUM_HOST: chrome APP_TESTS_REMOTE_WEB_DRIVER_URL: "http://chrome:4444"
script: script:
- echo "install npm" - echo "install npm"
...@@ -31,7 +31,7 @@ build_test_frontend: ...@@ -31,7 +31,7 @@ build_test_frontend:
- echo "docker commands success" - echo "docker commands success"
- npm start & - npm start &
- echo "start test" - echo "start test"
- npm test --host=selenium__standalone-chrome - npm test --host=$SELENIUM_HOST
- echo "Testing finshed" - echo "Testing finshed"
tags: tags:
......
...@@ -6,7 +6,7 @@ describe("Login Test", function () { ...@@ -6,7 +6,7 @@ describe("Login Test", function () {
let driver:WebDriver; let driver:WebDriver;
beforeEach(async function () { beforeEach(async function () {
driver = await new Builder().forBrowser("chrome").usingServer(`http://${process.env.SELENIUM_HOST}:4444`).setChromeOptions(new chrome.Options().headless().windowSize({width: 1920, height: 1080})).build(); driver = await new Builder().forBrowser("chrome").usingServer(`${process.env.APP_TESTS_REMOTE_WEB_DRIVER_URL}`).setChromeOptions(new chrome.Options().headless().windowSize({width: 1920, height: 1080})).build();
//driver = await new Builder().forBrowser("chrome").setChromeOptions(new chrome.Options().headless()).build(); //driver = await new Builder().forBrowser("chrome").setChromeOptions(new chrome.Options().headless()).build();
//navigate to the application //navigate to the application
await driver.get(`http://localhost:3000`); await driver.get(`http://localhost:3000`);
......
...@@ -6,7 +6,7 @@ describe("User Management Test", function () { ...@@ -6,7 +6,7 @@ describe("User Management Test", function () {
let driver: WebDriver; let driver: WebDriver;
beforeEach(async function () { beforeEach(async function () {
driver = await new Builder().forBrowser("chrome").usingServer(`http://${process.env.SELENIUM_HOST}:4444`).setChromeOptions(new chrome.Options().headless().windowSize({width: 1920, height: 1080})).build(); driver = await new Builder().forBrowser("chrome").usingServer(`${process.env.APP_TESTS_REMOTE_WEB_DRIVER_URL}`).setChromeOptions(new chrome.Options().headless().windowSize({width: 1920, height: 1080})).build();
await driver.get(`http://localhost:3000`); await driver.get(`http://localhost:3000`);
//await driver.manage().window().maximize(); //await driver.manage().window().maximize();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment