Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tdt4242-ex2
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Wiki
Code
Merge requests
0
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
Jørgen Hollum
tdt4242-ex2
Commits
97bbb7ec
Commit
97bbb7ec
authored
2 years ago
by
Jørgen Hollum
Browse files
Options
Downloads
Patches
Plain Diff
removed unnecessary comment
parent
d8d51f97
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#169450
passed with stages
Stage:
Stage:
in 1 minute and 59 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/cypress/support/index.js
+0
-96
0 additions, 96 deletions
frontend/cypress/support/index.js
with
0 additions
and
96 deletions
frontend/cypress/support/index.js
+
0
−
96
View file @
97bbb7ec
...
...
@@ -112,99 +112,3 @@ beforeEach(() => {
cy
.
wrap
(
athleteUser
).
as
(
'
athleteUser
'
)
cy
.
wrap
(
login
).
as
(
'
login
'
)
})
/*
import './commands'
import './commands'
var coachUser = {
username: "coachUser",
password: "123",
email: 'coach@example.com',
phone_number: '12345678',
street_address: 'Roadstreet 1',
city: 'Citytown',
country: 'Countryland',
main_gym: "SiT Moholt",
favourite_exercise: "Bench press"
}
var athleteUser = {
username: "athleteUser",
password: "123",
email: 'athlete@example.com',
phone_number: '98765432',
street_address: 'Streetroad 2',
city: 'Towncity',
country: 'Landcountry',
main_gym: "SiT Moholt",
favourite_exercise: "Bench press"
}
var baseUrl = "localhost:9090"
function registerUser(user) {
cy.visit(`${baseUrl}/index.html`)
cy.contains('Welcome to SecFit!')
cy.get('#btn-register').click()
cy.url().should('include', 'register.html')
cy.get('input[name="username"]').type(user.username)
cy.get('input[name="email"]').type(user.email)
cy.get('input[name="password"]').type(user.password)
cy.get('input[name="password1"]').type(user.password)
cy.get('input[name="phone_number"]').type(user.phone_number)
cy.get('input[name="country"]').type(user.country)
cy.get('input[name="city"]').type(user.city)
cy.get('input[name="street_address"]').type(user.street_address)
cy.get('input[name="main_gym"]').type(user.main_gym)
cy.get('input[name="favourite_exercise"]').type(user.favourite_exercise)
cy.get('#btn-create-account').click()
cy.url().should('include', 'workouts.html')
// cy.log("Waiting 1.5 seconds to allow request to go through. Should probably be replaced with a register-watcher, but hey watcha gonna doooo")
// cy.wait(1500)
logout()
}
function login(user) {
cy.visit(`${baseUrl}/index.html`)
cy.contains('Welcome to SecFit!')
cy.get('#btn-login-nav').click()
cy.url().should('include', 'login.html')
cy.get('input[name="username"]').type(user.username)
cy.get('input[name="password"]').type(user.password)
cy.intercept({method: 'GET', url: '/workouts.html' }).as('loginRequest')
cy.get('#btn-login').click()
cy.wait('@loginRequest')
}
function logout() {
cy.get('#btn-logout', { timeout: 10000 }).click()
cy.url().should('include', 'index.html')
}
before(() => {
registerUser(coachUser)
registerUser(athleteUser)
cy.visit(`${baseUrl}/index.html`)
})
beforeEach(() => {
cy.wrap(coachUser).as('coachUser')
cy.wrap(athleteUser).as('athleteUser')
cy.wrap(login).as('login')
})
*/
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