describe('Testing the full user course', () => {
  it('should access to the uploaded sequence and delete it', () => {
    cy.visit(`${Cypress.env('api_url')}api/auth/login`)
    cy.fixture('upload').then((uploadData) => {
      cy.get('#username').type('elysee')
      cy.get('#password').type('my password')
      cy.contains(uploadData.textLinkLogin).click()
      cy.visit('/')
      cy.contains(uploadData.textLinkUpload).click()
    })
    cy.get('.input-file').selectFile(
      [
        'cypress/fixtures/images/image1.JPG',
        'cypress/fixtures/images/image2.JPG',
        'cypress/fixtures/images/image3.JPG'
      ],
      { force: true }
    )
    cy.get('button[type=submit]').click()
    cy.get('.sequence-title').then(($span) => {
      const sequenceTitle = $span.text()
      cy.fixture('full-course').then((fullCourseData) => {
        cy.contains(fullCourseData.userName).click()
        cy.contains(fullCourseData.myPicturesLink).click()
        cy.contains(sequenceTitle).click()
        cy.contains(fullCourseData.deleteSequence).click()
      })
    })
  })
})

export { }