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
# related to proxy-setting in package.json
DANGEROUSLY_DISABLE_HOST_CHECK=true
SELENIUM_HOST = selenium__standalone-chrome
\ No newline at end of file
APP_TESTS_REMOTE_WEB_DRIVER_URL = selenium__standalone-chrome
\ No newline at end of file
......@@ -14,7 +14,7 @@ build_test_frontend:
alias: chrome
variables:
SELENIUM_HOST: chrome
APP_TESTS_REMOTE_WEB_DRIVER_URL: "http://chrome:4444"
script:
- echo "install npm"
......@@ -31,7 +31,7 @@ build_test_frontend:
- echo "docker commands success"
- npm start &
- echo "start test"
- npm test --host=selenium__standalone-chrome
- npm test --host=$SELENIUM_HOST
- echo "Testing finshed"
tags:
......
......@@ -6,7 +6,7 @@ describe("Login Test", function () {
let driver:WebDriver;
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();
//navigate to the application
await driver.get(`http://localhost:3000`);
......
......@@ -6,7 +6,7 @@ describe("User Management Test", function () {
let driver: WebDriver;
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.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