Skip to content
Snippets Groups Projects
Commit 5b92108e authored by s87777's avatar s87777
Browse files

NewImage + Test29

parent 2cfebc34
No related branches found
No related tags found
No related merge requests found
Pipeline #50309 failed
......@@ -5,10 +5,10 @@ REACT_APP_API_SERVER_URL=http://127.0.0.1:80
# related to proxy-setting in package.json
DANGEROUSLY_DISABLE_HOST_CHECK=true
APP_TESTS_REMOTE_WEB_DRIVER_URL=selenium__standalone-chrome
#APP_TESTS_REMOTE_WEB_DRIVER_URL=selenium__standalone-chrome
#variables selenium
SL_TEST_BROWSER_NAME=firefox
SL_TEST_USE_REMOTE=0
BROWSER_NAME=firefox
USE_REMOTE=0
SL_TEST_REMOTE_URL=http://selenium-hub:4444/wd/hub
SL_TEST_BASE_URL=http://localhost:3000
\ No newline at end of file
......@@ -21,9 +21,9 @@ test-job:
FF_NETWORK_PER_BUILD: 1
REACT_APP_API_SERVER_URL: "http://backend:80"
SL_TEST_BASE_URL: "http://frontend:3000"
SL_TEST_USE_REMOTE: "1"
USE_REMOTE: "1"
SL_TEST_REMOTE_URL: "http://selenium:4444/wd/hub"
SL_TEST_BROWSER_NAME: "firefox"
BROWSER_NAME: "firefox"
services:
- name: registry.bht-berlin.de:443/s87777/profwebbackend:latest
alias: backend
......
......@@ -9,7 +9,7 @@ dotenv.config() // read ".env"
describe("Login Test", function () {
let driver:WebDriver;
const BROWSER_NAME = process.env.BROWSER_NAME!;
const SL_TEST_USE_REMOTE = process.env.SL_TEST_USE_REMOTE;
const USE_REMOTE = process.env.USE_REMOTE!;
const SL_TEST_REMOTE_URL = process.env.SL_TEST_REMOTE_URL!;
const SL_TEST_BASE_URL = process.env.SL_TEST_BASE_URL!;
......@@ -21,11 +21,11 @@ describe("Login Test", function () {
//await driver.get(`http://localhost:3000`);
//await driver.manage().window().maximize();
let builder = new Builder()
let builder = await new Builder()
.forBrowser(BROWSER_NAME)
.setChromeOptions(new ChromeOptions().windowSize({ width: 1280, height: 720 }).headless())
.setFirefoxOptions(new FirefoxOptions().windowSize({ width: 1280, height: 720 }).headless());
if (SL_TEST_USE_REMOTE === "1") {
if (USE_REMOTE === "1") {
builder = builder.usingServer(SL_TEST_REMOTE_URL);
}
driver = await builder.build();
......
......@@ -9,22 +9,24 @@ dotenv.config() // read ".env"
describe("User Management Test", function () {
let driver: WebDriver;
const BROWSER_NAME = process.env.BROWSER_NAME!;
const SL_TEST_USE_REMOTE = process.env.SL_TEST_USE_REMOTE;
const USE_REMOTE = process.env.USE_REMOTE!;
const SL_TEST_REMOTE_URL = process.env.SL_TEST_REMOTE_URL!;
const SL_TEST_BASE_URL = process.env.SL_TEST_BASE_URL!;
beforeEach(async function () {
//console.log("Selenium Testing Server: " + process.env.APP_TESTS_REMOTE_WEB_DRIVER_URL);
//console.log("React-Rest Anbindung: " + process.env.REACT_APP_API_SERVER_URL)
console.log("Browser: " + BROWSER_NAME);
console.log("Use Server: " + USE_REMOTE);
console.log("Selenium Testing Server: " + SL_TEST_REMOTE_URL);
console.log("React-Rest Anbindung: " + process.env.REACT_APP_API_SERVER_URL)
//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();
let builder = new Builder()
let builder = await new Builder()
.forBrowser(BROWSER_NAME)
.setChromeOptions(new ChromeOptions().windowSize({ width: 1280, height: 720 }).headless())
.setFirefoxOptions(new FirefoxOptions().windowSize({ width: 1280, height: 720 }).headless());
if (SL_TEST_USE_REMOTE === "1") {
if (USE_REMOTE === "1") {
builder = builder.usingServer(SL_TEST_REMOTE_URL);
}
driver = await builder.build();
......
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