diff --git a/.gitignore b/.gitignore index 9420617..bab06fa 100644 --- a/.gitignore +++ b/.gitignore @@ -90,6 +90,6 @@ sw.* *.swp # Cypress generated screen and videos files -cypress/screenshot/ -cypress/videos/ +cypress/screenshot/* +cypress/videos/* *.cy.ts.mp4 \ No newline at end of file diff --git a/cypress/e2e/full-course.cy.ts b/cypress/e2e/full-course.cy.ts index 08b7078..0f0ac72 100644 --- a/cypress/e2e/full-course.cy.ts +++ b/cypress/e2e/full-course.cy.ts @@ -1,12 +1,14 @@ 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.fixture('login').then((loginData) => { cy.get('#username').type('elysee') cy.get('#password').type('my password') - cy.contains(uploadData.textLinkLogin).click() + cy.contains(loginData.textLinkLogin).click() cy.visit('/') - cy.contains(uploadData.textLinkUpload).click() + }) + cy.fixture('full-course').then((fullCourseData) => { + cy.contains(fullCourseData.uploadLink).click() }) cy.get('.input-file').selectFile( [ @@ -23,7 +25,6 @@ describe('Testing the full user course', () => { cy.contains(fullCourseData.userName).click() cy.contains(fullCourseData.myPicturesLink).click() cy.contains(sequenceTitle).click() - cy.contains(fullCourseData.deleteSequence).click() }) }) }) diff --git a/cypress/e2e/login.cy.ts b/cypress/e2e/login.cy.ts index e40b214..db4f05b 100644 --- a/cypress/e2e/login.cy.ts +++ b/cypress/e2e/login.cy.ts @@ -14,8 +14,8 @@ describe('In the login page', () => { cy.contains(loginData.textLinkRegister).click() cy.get('#firstName').type('Tom') cy.get('#lastName').type('Tom') - cy.get('#email').type('test@testss.com') - cy.get('#username').type('Elysee124') + cy.get('#email').type('test@test123.com') + cy.get('#username').type('Elysee12445') cy.get('#password').type('my password1') cy.get('#password-confirm').type('my password1') cy.get('form').submit() diff --git a/cypress/e2e/upload.cy.ts b/cypress/e2e/upload.cy.ts deleted file mode 100644 index dc236f0..0000000 --- a/cypress/e2e/upload.cy.ts +++ /dev/null @@ -1,24 +0,0 @@ -describe('In upload page', () => { - it('upload some pictures', () => { - 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('button[type=button]').click() - }) -}) - -export {} diff --git a/cypress/fixtures/full-course.json b/cypress/fixtures/full-course.json index 7e87373..4773460 100644 --- a/cypress/fixtures/full-course.json +++ b/cypress/fixtures/full-course.json @@ -1,4 +1,5 @@ { + "uploadLink": "Contribuer", "userName": "E", "myPicturesLink": "Mes photos", "deleteSequence": "Supprimer" diff --git a/cypress/fixtures/home.json b/cypress/fixtures/home.json index bd0d152..a3851a9 100644 --- a/cypress/fixtures/home.json +++ b/cypress/fixtures/home.json @@ -1,5 +1,5 @@ { "textLinkAbout": "À propos", "textLinkUpload": "Contribuer", - "textLinkLogin": "Sign In" + "textLinkLogin": "Connexion" } diff --git a/cypress/fixtures/login.json b/cypress/fixtures/login.json index 2f21a99..2332fad 100644 --- a/cypress/fixtures/login.json +++ b/cypress/fixtures/login.json @@ -1,3 +1,4 @@ { - "textLinkRegister": "Enregistrement" + "textLinkRegister": "Register", + "textLinkLogin": "Sign In" } diff --git a/cypress/fixtures/upload.json b/cypress/fixtures/upload.json deleted file mode 100644 index f2fb63b..0000000 --- a/cypress/fixtures/upload.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "textLinkLogin": "Sign In", - "textLinkUpload": "Contribuer", - "textButtonUpload": "Déposez des photos dans la zone ou" -} diff --git a/cypress/screenshots/about.cy.ts/In the about page -- go to the cli page (failed).png b/cypress/screenshots/about.cy.ts/In the about page -- go to the cli page (failed).png deleted file mode 100644 index 1b8cd32..0000000 Binary files a/cypress/screenshots/about.cy.ts/In the about page -- go to the cli page (failed).png and /dev/null differ diff --git a/cypress/screenshots/about.cy.ts/In the about page -- go to the login page (failed) (1).png b/cypress/screenshots/about.cy.ts/In the about page -- go to the login page (failed) (1).png deleted file mode 100644 index 52f6d10..0000000 Binary files a/cypress/screenshots/about.cy.ts/In the about page -- go to the login page (failed) (1).png and /dev/null differ diff --git a/cypress/screenshots/about.cy.ts/In the about page -- go to the login page (failed).png b/cypress/screenshots/about.cy.ts/In the about page -- go to the login page (failed).png deleted file mode 100644 index 2d46e44..0000000 Binary files a/cypress/screenshots/about.cy.ts/In the about page -- go to the login page (failed).png and /dev/null differ diff --git a/cypress/screenshots/full-course.cy.ts/Testing the full user course -- should access to the uploaded sequence and delete it -- before each hook (failed).png b/cypress/screenshots/full-course.cy.ts/Testing the full user course -- should access to the uploaded sequence and delete it -- before each hook (failed).png deleted file mode 100644 index 9935f9e..0000000 Binary files a/cypress/screenshots/full-course.cy.ts/Testing the full user course -- should access to the uploaded sequence and delete it -- before each hook (failed).png and /dev/null differ diff --git a/cypress/screenshots/home.cy.ts/In the home page -- click on the link in the header to go to the About page (failed).png b/cypress/screenshots/home.cy.ts/In the home page -- click on the link in the header to go to the About page (failed).png deleted file mode 100644 index 7291732..0000000 Binary files a/cypress/screenshots/home.cy.ts/In the home page -- click on the link in the header to go to the About page (failed).png and /dev/null differ diff --git a/cypress/screenshots/home.cy.ts/In the home page -- click on the link in the header to go to the Login page (failed).png b/cypress/screenshots/home.cy.ts/In the home page -- click on the link in the header to go to the Login page (failed).png deleted file mode 100644 index 13ee75c..0000000 Binary files a/cypress/screenshots/home.cy.ts/In the home page -- click on the link in the header to go to the Login page (failed).png and /dev/null differ diff --git a/cypress/screenshots/login.cy.ts/In the login page -- go to the register form and create an account (failed).png b/cypress/screenshots/login.cy.ts/In the login page -- go to the register form and create an account (failed).png deleted file mode 100644 index 3e41813..0000000 Binary files a/cypress/screenshots/login.cy.ts/In the login page -- go to the register form and create an account (failed).png and /dev/null differ diff --git a/cypress/screenshots/login.cy.ts/In the login page -- type in the form to login (failed).png b/cypress/screenshots/login.cy.ts/In the login page -- type in the form to login (failed).png deleted file mode 100644 index 60c36c0..0000000 Binary files a/cypress/screenshots/login.cy.ts/In the login page -- type in the form to login (failed).png and /dev/null differ