Commit c4076310 authored by Elias Larsen's avatar Elias Larsen
Browse files

test for f5

parent 41d11e28
Pipeline #115638 passed with stages
in 3 minutes and 2 seconds
describe("Functional test for workouts", () => {
beforeEach(() => {
cy.login();
Cypress.Cookies.preserveOnce("access", "refresh");
});
it('should test that public workout is visible for athlete', () => {
cy.visit('/workouts.html')
cy.contains("Public Workouts").click();
cy.get('#div-content').children().first().then((cont) => {
cy.get('#div-content').then((content)=>{
const id = content.children().first().attr('href').split("=")[1]
cy.intercept(`/api/workouts/${id}/`).as('workout')
cy.get('#div-content').children().first().click()
// Validate that the server responds with 200 OK
cy.wait('@workout').its('response.statusCode').should('eq',200)
cy.get('#inputName').should('exist')
cy.get('#inputDateTime').should('exist')
cy.get('#inputOwner').should('exist')
cy.get('#inputVisibility').should('exist')
cy.get('#inputNotes').should('exist')
cy.get('#uploaded-files').should('exist')
cy.get('#div-comment-row').should('exist')
})
})
})
});
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment