Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tdt4242-base
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
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Kristoffer Håkon Håkonsen
tdt4242-base
Commits
2a72b074
Commit
2a72b074
authored
4 years ago
by
Pernille Nødtvedt Welle-Watne
Browse files
Options
Downloads
Plain Diff
Merge branch 'e2e-bug-fix' into 'master'
delete suggest workout after test See merge request
!12
parents
985e72af
ce17009d
No related branches found
Branches containing commit
No related tags found
1 merge request
!12
delete suggest workout after test
Pipeline
#116562
passed
4 years ago
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/cypress/integration/suggestedWorkout_spec.js
+27
-7
27 additions, 7 deletions
frontend/cypress/integration/suggestedWorkout_spec.js
with
27 additions
and
7 deletions
frontend/cypress/integration/suggestedWorkout_spec.js
+
27
−
7
View file @
2a72b074
...
...
@@ -23,8 +23,6 @@ describe('The Home Page', () => {
cy
.
get
(
'
input[name="username"]
'
).
type
(
"
coach
"
);
cy
.
get
(
'
input[name="password"]
'
).
type
(
"
12345678
"
)
cy
.
get
(
'
#rememberMe
'
).
check
();
cy
.
get
(
"
#btn-login
"
).
click
();
cy
.
url
().
should
(
'
include
'
,
'
/workouts.html
'
);
...
...
@@ -46,7 +44,19 @@ describe('The Home Page', () => {
cy
.
url
().
should
(
'
include
'
,
'
/workouts.html
'
);
cy
.
contains
(
"
Suggest workout test
"
);
cy
.
contains
(
"
test
"
);
cy
.
get
(
"
#btn-suggest-workout
"
).
click
();
cy
.
get
(
'
input[name="name"]
'
).
type
(
"
Suggest workout test - to decline
"
).
should
(
"
have.value
"
,
"
Suggest workout test - to decline
"
);
cy
.
get
(
'
textarea[name="notes"]
'
).
type
(
"
Suggest workout test notes
"
).
should
(
"
have.value
"
,
"
Suggest workout test notes
"
);
cy
.
get
(
'
select[name="athlete"]
'
).
select
(
"
athlete
"
);
cy
.
get
(
"
#btn-ok-workout
"
).
click
();
cy
.
url
().
should
(
'
include
'
,
'
/workouts.html
'
);
cy
.
contains
(
"
Suggest workout test - to decline
"
);
});
...
...
@@ -94,6 +104,10 @@ describe('The Home Page', () => {
cy
.
get
(
'
textarea[name="notes"]
'
).
clear
().
type
(
"
Suggest workout test notes edit
"
).
should
(
"
have.value
"
,
"
Suggest workout test notes edit
"
);
cy
.
get
(
"
#btn-ok-workout
"
).
click
();
cy
.
get
(
'
#nav-workouts
'
).
click
({
force
:
true
});
cy
.
contains
(
"
Suggest workout test - edit
"
);
});
it
(
'
should be shown in "Suggested Workouts To Athletes"
'
,
function
()
{
...
...
@@ -115,7 +129,6 @@ describe('The Home Page', () => {
it
(
'
should be shown in "Suggested Workouts From Coach"
'
,
function
()
{
cy
.
visit
(
"
/login.html
"
);
cy
.
get
(
'
input[name="username"]
'
).
type
(
"
athlete
"
);
...
...
@@ -166,6 +179,14 @@ describe('The Home Page', () => {
cy
.
contains
(
"
Owner: athlete
"
);
cy
.
contains
(
"
Suggest workout test - accept
"
).
click
();
cy
.
get
(
"
#btn-edit-workout
"
).
click
();
cy
.
get
(
"
#btn-delete-workout
"
).
click
();
});
it
(
'
should decline a suggested workout from coach
'
,
function
()
{
...
...
@@ -178,7 +199,7 @@ describe('The Home Page', () => {
cy
.
get
(
"
#btn-login
"
).
click
();
cy
.
contains
(
"
Suggest
ed W
orkout
Seed
"
).
click
({
force
:
true
});
cy
.
contains
(
"
Suggest
w
orkout
test - to decline
"
).
click
({
force
:
true
});
cy
.
contains
(
"
Suggested Workout from Coach
"
);
...
...
@@ -186,8 +207,7 @@ describe('The Home Page', () => {
cy
.
url
().
should
(
'
include
'
,
'
/workouts.html
'
);
cy
.
contains
(
"
Suggested Workout Seed
"
).
should
(
'
not.exist
'
);
cy
.
contains
(
"
Suggest workout test - to decline
"
).
should
(
'
not.exist
'
);
});
...
...
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