Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
profwebfrontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
s87777
profwebfrontend
Commits
5b92108e
Commit
5b92108e
authored
1 year ago
by
s87777
Browse files
Options
Downloads
Patches
Plain Diff
NewImage + Test29
parent
2cfebc34
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#50309
failed
1 year ago
Stage: test
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.env
+3
-3
3 additions, 3 deletions
.env
.gitlab-ci.yml
+2
-2
2 additions, 2 deletions
.gitlab-ci.yml
src/test/LoginTest.test.ts
+3
-3
3 additions, 3 deletions
src/test/LoginTest.test.ts
src/test/UserManagement.test.ts
+7
-5
7 additions, 5 deletions
src/test/UserManagement.test.ts
with
15 additions
and
13 deletions
.env
+
3
−
3
View file @
5b92108e
...
@@ -5,10 +5,10 @@ REACT_APP_API_SERVER_URL=http://127.0.0.1:80
...
@@ -5,10 +5,10 @@ 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
APP_TESTS_REMOTE_WEB_DRIVER_URL=selenium__standalone-chrome
#
APP_TESTS_REMOTE_WEB_DRIVER_URL=selenium__standalone-chrome
#variables selenium
#variables selenium
SL_TEST_
BROWSER_NAME=firefox
BROWSER_NAME=firefox
SL_TEST_
USE_REMOTE=0
USE_REMOTE=0
SL_TEST_REMOTE_URL=http://selenium-hub:4444/wd/hub
SL_TEST_REMOTE_URL=http://selenium-hub:4444/wd/hub
SL_TEST_BASE_URL=http://localhost:3000
SL_TEST_BASE_URL=http://localhost:3000
\ No newline at end of file
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml
+
2
−
2
View file @
5b92108e
...
@@ -21,9 +21,9 @@ test-job:
...
@@ -21,9 +21,9 @@ test-job:
FF_NETWORK_PER_BUILD
:
1
FF_NETWORK_PER_BUILD
:
1
REACT_APP_API_SERVER_URL
:
"
http://backend:80"
REACT_APP_API_SERVER_URL
:
"
http://backend:80"
SL_TEST_BASE_URL
:
"
http://frontend:3000"
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_REMOTE_URL
:
"
http://selenium:4444/wd/hub"
SL_TEST_
BROWSER_NAME
:
"
firefox"
BROWSER_NAME
:
"
firefox"
services
:
services
:
-
name
:
registry.bht-berlin.de:443/s87777/profwebbackend:latest
-
name
:
registry.bht-berlin.de:443/s87777/profwebbackend:latest
alias
:
backend
alias
:
backend
...
...
This diff is collapsed.
Click to expand it.
src/test/LoginTest.test.ts
+
3
−
3
View file @
5b92108e
...
@@ -9,7 +9,7 @@ dotenv.config() // read ".env"
...
@@ -9,7 +9,7 @@ dotenv.config() // read ".env"
describe
(
"
Login Test
"
,
function
()
{
describe
(
"
Login Test
"
,
function
()
{
let
driver
:
WebDriver
;
let
driver
:
WebDriver
;
const
BROWSER_NAME
=
process
.
env
.
BROWSER_NAME
!
;
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_REMOTE_URL
=
process
.
env
.
SL_TEST_REMOTE_URL
!
;
const
SL_TEST_BASE_URL
=
process
.
env
.
SL_TEST_BASE_URL
!
;
const
SL_TEST_BASE_URL
=
process
.
env
.
SL_TEST_BASE_URL
!
;
...
@@ -21,11 +21,11 @@ describe("Login Test", function () {
...
@@ -21,11 +21,11 @@ describe("Login Test", function () {
//await driver.get(`http://localhost:3000`);
//await driver.get(`http://localhost:3000`);
//await driver.manage().window().maximize();
//await driver.manage().window().maximize();
let
builder
=
new
Builder
()
let
builder
=
await
new
Builder
()
.
forBrowser
(
BROWSER_NAME
)
.
forBrowser
(
BROWSER_NAME
)
.
setChromeOptions
(
new
ChromeOptions
().
windowSize
({
width
:
1280
,
height
:
720
}).
headless
())
.
setChromeOptions
(
new
ChromeOptions
().
windowSize
({
width
:
1280
,
height
:
720
}).
headless
())
.
setFirefoxOptions
(
new
FirefoxOptions
().
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
);
builder
=
builder
.
usingServer
(
SL_TEST_REMOTE_URL
);
}
}
driver
=
await
builder
.
build
();
driver
=
await
builder
.
build
();
...
...
This diff is collapsed.
Click to expand it.
src/test/UserManagement.test.ts
+
7
−
5
View file @
5b92108e
...
@@ -9,22 +9,24 @@ dotenv.config() // read ".env"
...
@@ -9,22 +9,24 @@ dotenv.config() // read ".env"
describe
(
"
User Management Test
"
,
function
()
{
describe
(
"
User Management Test
"
,
function
()
{
let
driver
:
WebDriver
;
let
driver
:
WebDriver
;
const
BROWSER_NAME
=
process
.
env
.
BROWSER_NAME
!
;
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_REMOTE_URL
=
process
.
env
.
SL_TEST_REMOTE_URL
!
;
const
SL_TEST_BASE_URL
=
process
.
env
.
SL_TEST_BASE_URL
!
;
const
SL_TEST_BASE_URL
=
process
.
env
.
SL_TEST_BASE_URL
!
;
beforeEach
(
async
function
()
{
beforeEach
(
async
function
()
{
//console.log("Selenium Testing Server: " + process.env.APP_TESTS_REMOTE_WEB_DRIVER_URL);
console
.
log
(
"
Browser:
"
+
BROWSER_NAME
);
//console.log("React-Rest Anbindung: " + process.env.REACT_APP_API_SERVER_URL)
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();
//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();
let
builder
=
new
Builder
()
let
builder
=
await
new
Builder
()
.
forBrowser
(
BROWSER_NAME
)
.
forBrowser
(
BROWSER_NAME
)
.
setChromeOptions
(
new
ChromeOptions
().
windowSize
({
width
:
1280
,
height
:
720
}).
headless
())
.
setChromeOptions
(
new
ChromeOptions
().
windowSize
({
width
:
1280
,
height
:
720
}).
headless
())
.
setFirefoxOptions
(
new
FirefoxOptions
().
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
);
builder
=
builder
.
usingServer
(
SL_TEST_REMOTE_URL
);
}
}
driver
=
await
builder
.
build
();
driver
=
await
builder
.
build
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment