fix e2e test
4
.gitignore
vendored
@@ -90,6 +90,6 @@ sw.*
|
||||
*.swp
|
||||
|
||||
# Cypress generated screen and videos files
|
||||
cypress/screenshot/
|
||||
cypress/videos/
|
||||
cypress/screenshot/*
|
||||
cypress/videos/*
|
||||
*.cy.ts.mp4
|
||||
@@ -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()
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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 {}
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"uploadLink": "Contribuer",
|
||||
"userName": "E",
|
||||
"myPicturesLink": "Mes photos",
|
||||
"deleteSequence": "Supprimer"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"textLinkAbout": "À propos",
|
||||
"textLinkUpload": "Contribuer",
|
||||
"textLinkLogin": "Sign In"
|
||||
"textLinkLogin": "Connexion"
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{
|
||||
"textLinkRegister": "Enregistrement"
|
||||
"textLinkRegister": "Register",
|
||||
"textLinkLogin": "Sign In"
|
||||
}
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"textLinkLogin": "Sign In",
|
||||
"textLinkUpload": "Contribuer",
|
||||
"textButtonUpload": "Déposez des photos dans la zone ou"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 108 KiB |
|
Before Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 63 KiB |
|
Before Width: | Height: | Size: 105 KiB |
|
Before Width: | Height: | Size: 110 KiB |