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
7ab8556e
Commit
7ab8556e
authored
1 year ago
by
s87777
Browse files
Options
Downloads
Patches
Plain Diff
PLS
parent
6b8735b2
No related branches found
No related tags found
No related merge requests found
Pipeline
#50543
failed
1 year ago
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+10
-0
10 additions, 0 deletions
.gitlab-ci.yml
src/test/LoginTest.test.ts
+5
-5
5 additions, 5 deletions
src/test/LoginTest.test.ts
src/test/UserManagement.test.ts
+7
-7
7 additions, 7 deletions
src/test/UserManagement.test.ts
with
22 additions
and
12 deletions
.gitlab-ci.yml
+
10
−
0
View file @
7ab8556e
...
...
@@ -5,6 +5,16 @@ services:
stages
:
-
test
build-job
:
stage
:
test
script
:
-
echo $CI_REGISTRY_PASSWORD | docker login $CI_REGISTRY -u $CI_REGISTRY_USER --password-stdin
-
docker build -t registry.bht-berlin.de:443/s87777/profwebfrontend:latest .
-
docker push registry.bht-berlin.de:443/s87777/profwebfrontend
tags
:
-
docker-privileged
test-job
:
stage
:
test
image
:
node:latest
...
...
This diff is collapsed.
Click to expand it.
src/test/LoginTest.test.ts
+
5
−
5
View file @
7ab8556e
...
...
@@ -12,7 +12,7 @@ describe("Login Test", function () {
const
BROWSER_NAME
=
process
.
env
.
BROWSER_NAME
!
;
const
USE_REMOTE
=
process
.
env
.
USE_REMOTE
!
;
const
REMOTE_URL
=
process
.
env
.
REMOTE_URL
!
;
const
BASE_URL
=
process
.
env
.
BASE_URL
!
;
const
BASE_URL
=
process
.
env
.
BASE_URL
!
;
beforeEach
(
async
function
()
{
...
...
@@ -35,7 +35,7 @@ describe("Login Test", function () {
await
driver
.
get
(
BASE_URL
);
driver
.
manage
().
window
().
maximize
();
}
},
1
0
000
);
},
1
5
000
);
afterEach
(
async
function
()
{
await
driver
.
quit
();
...
...
@@ -62,7 +62,7 @@ describe("Login Test", function () {
const
isLogoutButtonOpen
=
await
driver
.
findElement
(
By
.
id
(
"
logoutButton
"
)).
isDisplayed
();
assert
.
strictEqual
(
isLogoutButtonOpen
,
true
,
"
Der Logout Button wird nicht angezeigt.
"
);
},
1
0
000
);
},
1
5
000
);
it
(
"
test login with wrong credentials
"
,
async
function
()
{
// test
...
...
@@ -88,7 +88,7 @@ describe("Login Test", function () {
// Überprüfen, ob eine Fehlermeldung oder ein Verhalten für falsche Anmeldeinformationen angezeigt wird
const
isErrorMessageVisible
=
await
driver
.
findElement
(
By
.
id
(
"
errorMessage
"
)).
isDisplayed
();
assert
.
strictEqual
(
isErrorMessageVisible
,
true
,
"
Falsche Anmeldeinformationen werden nicht erkannt.
"
);
},
1
0
000
);
},
1
5
000
);
it
(
"
user cant see user management
"
,
async
function
()
{
const
loginButton
=
await
driver
.
findElement
(
By
.
id
(
"
loginButton
"
));
...
...
@@ -115,5 +115,5 @@ describe("Login Test", function () {
//dont show user management
const
UserManagmentLink
=
await
driver
.
findElements
(
By
.
linkText
(
"
UserManagment
"
));
assert
.
strictEqual
(
UserManagmentLink
.
length
,
0
,
"
Der Link zu UserManagment sollte nicht sichtbar sein.
"
);
},
1
0
000
)
},
1
5
000
)
});
This diff is collapsed.
Click to expand it.
src/test/UserManagement.test.ts
+
7
−
7
View file @
7ab8556e
...
...
@@ -67,7 +67,7 @@ describe("User Management Test", function () {
await
driver
.
wait
(
until
.
elementLocated
(
By
.
id
(
"
listUsers
"
)),
5000
);
const
listUsers
=
await
driver
.
findElement
(
By
.
id
(
"
listUsers
"
)).
isDisplayed
();
assert
.
strictEqual
(
listUsers
,
true
,
"
Der Dialog wurde nicht geöffnet.
"
);
},
1
0
000
);
},
1
5
000
);
afterEach
(
async
function
()
{
await
driver
.
quit
();
...
...
@@ -98,7 +98,7 @@ describe("User Management Test", function () {
await
driver
.
wait
(
until
.
elementLocated
(
By
.
id
(
"
user-Max
"
)),
5000
);
const
userMax
=
await
driver
.
findElement
(
By
.
id
(
"
user-Max
"
)).
isDisplayed
();
assert
.
strictEqual
(
userMax
,
true
,
"
Der User Max wurde nicht gefunden.
"
);
},
1
0
000
);
},
1
5
000
);
it
(
"
edit user
"
,
async
function
()
{
const
editButton
=
driver
.
findElement
(
By
.
id
(
"
editButton-Flo
"
));
...
...
@@ -118,7 +118,7 @@ describe("User Management Test", function () {
await
driver
.
wait
(
until
.
elementLocated
(
By
.
id
(
"
user-Florian
"
)),
5000
);
const
userFlorianAdmin
=
await
driver
.
findElement
(
By
.
id
(
"
user-Florian
"
)).
isDisplayed
();
assert
.
strictEqual
(
userFlorianAdmin
,
true
,
"
Der User Florian wurde nicht gefunden.
"
);
},
1
0
000
);
},
1
5
000
);
it
(
"
delete user
"
,
async
function
()
{
const
deleteButton
=
await
driver
.
findElement
(
By
.
id
(
"
deleteButton-Max
"
));
...
...
@@ -135,7 +135,7 @@ describe("User Management Test", function () {
);
await
driver
.
sleep
(
1000
);
assert
.
strictEqual
(
isMaxDeleted
,
true
,
"
Der Benutzer 'Max' wurde nicht gelöscht.
"
);
},
1
0
000
);
},
1
5
000
);
it
(
"
login with new account
"
,
async
function
()
{
const
addButton
=
driver
.
findElement
(
By
.
id
(
"
addUserButton
"
));
...
...
@@ -180,7 +180,7 @@ describe("User Management Test", function () {
await
driver
.
wait
(
until
.
elementLocated
(
By
.
id
(
"
logoutButton
"
)),
5000
);
const
isLogoutButtonOpenMax
=
await
driver
.
findElement
(
By
.
id
(
"
logoutButton
"
)).
isDisplayed
();
assert
.
strictEqual
(
isLogoutButtonOpenMax
,
true
,
"
Der Logout Button Max wird nicht angezeigt.
"
);
},
1
0
000
);
},
1
5
000
);
it
(
"
create User without password ERROR!
"
,
async
function
()
{
const
addUserButton
=
driver
.
findElement
(
By
.
id
(
"
addUserButton
"
));
...
...
@@ -200,7 +200,7 @@ describe("User Management Test", function () {
await
driver
.
wait
(
until
.
elementLocated
(
By
.
id
(
"
warningMessage
"
)),
5000
);
const
warningMessage
=
await
driver
.
findElement
(
By
.
id
(
"
warningMessage
"
)).
isDisplayed
();
assert
.
strictEqual
(
warningMessage
,
true
,
"
Die Fehlermeldung wurde nicht gefunden.
"
);
},
1
0
000
);
},
1
5
000
);
it
(
"
clean up test
"
,
async
function
()
{
console
.
log
(
"
Start afterAll
"
);
...
...
@@ -227,5 +227,5 @@ describe("User Management Test", function () {
await
driver
.
wait
(
until
.
elementLocated
(
By
.
id
(
"
user-Flo
"
)),
5000
);
const
userFlorianAdmin
=
await
driver
.
findElement
(
By
.
id
(
"
user-Flo
"
)).
isDisplayed
();
assert
.
strictEqual
(
userFlorianAdmin
,
true
,
"
Der User Flo wurde nicht gefunden.
"
);
},
1
0
000
);
},
1
5
000
);
});
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