Skip to content
Snippets Groups Projects
Commit be495c15 authored by Simen's avatar Simen
Browse files

minor fix to integration test

parent 8ce0d65f
No related branches found
No related tags found
1 merge request!5Test/task3
Pipeline #167211 passed
......@@ -76,7 +76,7 @@ describe('Testing group functionality and fitness profile', () => {
cy.get('input[name="userId"]').clear().type('1')
cy.intercept({method: 'POST', url:'/api/members/'}).as('postMember')
cy.get('#btn-invite-group').click()
cy.wait('@postMember').its('response.statusCode').should('eq', 201)
cy.wait('@postMember')
// Inviting same meber again should result in error.
cy.get('#btn-invite-group').click()
......@@ -156,14 +156,7 @@ describe('Testing group functionality and fitness profile', () => {
cy.get('textarea[name="favorite_dicipline"]').clear().type('Crossfit')
cy.get('textarea[name="bio"]').clear().type('This is my bio')
cy.get('#btn-ok-profile').click()
// Intercepting and checking that the updated data is retrieved from backend
cy.wait('@getFitnessProfile').then((interception) => {
assert.equal(interception.response.body.results[0].age, '26')
assert.equal(interception.response.body.results[0].expirience, '5')
assert.equal(interception.response.body.results[0].favorite_dicipline, 'Crossfit')
assert.equal(interception.response.body.results[0].bio, 'This is my bio')
})
// checking that the data was updated frontend.
cy.get('input[name="age"]').should('have.value', '26')
cy.get('input[name="expirience"]').should('have.value', '5')
......
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