forked from Ivasoft/geovisio-website
fix test:e2e
This commit is contained in:
@@ -1,25 +0,0 @@
|
||||
describe('In the about page', () => {
|
||||
it('go to the login page', () => {
|
||||
cy.visit('partager-des-photos')
|
||||
cy.fixture('about').then((aboutData: aboutInterface) => {
|
||||
cy.contains(aboutData.textButtonAbout).click()
|
||||
})
|
||||
})
|
||||
it('go to the login page', () => {
|
||||
cy.visit('partager-des-photos')
|
||||
cy.fixture('about').then((aboutData: aboutInterface) => {
|
||||
cy.contains(aboutData.textButtonAbout).click()
|
||||
})
|
||||
})
|
||||
it('go to the cli page', () => {
|
||||
cy.visit('partager-des-photos')
|
||||
cy.fixture('about').then((aboutData: aboutInterface) => {
|
||||
cy.contains(aboutData.textButtonCli).click()
|
||||
})
|
||||
})
|
||||
})
|
||||
interface aboutInterface {
|
||||
textButtonAbout: string
|
||||
textButtonCli: string
|
||||
}
|
||||
export {}
|
||||
23
cypress/e2e/contribute.cy.ts
Normal file
23
cypress/e2e/contribute.cy.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
describe('In the contribute page', () => {
|
||||
it('go to the login page', () => {
|
||||
cy.visit('pourquoi-contribuer')
|
||||
cy.fixture('contribute').then((contributeData: contributeInterface) => {
|
||||
cy.contains(contributeData.textButtonContribute).click()
|
||||
})
|
||||
})
|
||||
it('go to the doc pages', () => {
|
||||
cy.visit('pourquoi-contribuer')
|
||||
cy.fixture('contribute').then((contributeData: contributeInterface) => {
|
||||
cy.contains(contributeData.textButtonDocCli).click()
|
||||
cy.contains(contributeData.textButtonDoc).click()
|
||||
cy.contains(contributeData.textButtonDocPython).click()
|
||||
cy.contains(contributeData.textButtonCli).click()
|
||||
cy.contains(contributeData.textButtonTiles).click()
|
||||
})
|
||||
})
|
||||
})
|
||||
interface contributeInterface {
|
||||
textButtonContribute: string
|
||||
textButtonCli: string
|
||||
}
|
||||
export {}
|
||||
@@ -1,33 +0,0 @@
|
||||
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('login').then((loginData) => {
|
||||
cy.get('#username').type('elysee')
|
||||
cy.get('#password').type('my password')
|
||||
cy.contains(loginData.textLinkLogin).click()
|
||||
cy.visit('/')
|
||||
})
|
||||
cy.fixture('full-course').then((fullCourseData) => {
|
||||
cy.contains(fullCourseData.uploadLink).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()
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
export {}
|
||||
@@ -3,7 +3,7 @@ describe('In the home page', () => {
|
||||
cy.visit('/')
|
||||
cy.fixture('home').then((homeData) => {
|
||||
cy.contains(homeData.textLinkAbout).click()
|
||||
cy.url().should('include', '/partager-des-photos')
|
||||
cy.url().should('include', '/pourquoi-contribuer')
|
||||
})
|
||||
})
|
||||
it('click on the link in the header to go to the Login page', () => {
|
||||
|
||||
@@ -3,10 +3,8 @@ describe('In the login page', () => {
|
||||
cy.visit(`${Cypress.env('api_url')}api/auth/login`)
|
||||
cy.get('#username').type('Elysee')
|
||||
cy.get('#password').type('my password')
|
||||
cy.fixture('upload').then((uploadData) => {
|
||||
cy.contains(uploadData.textLinkLogin).click()
|
||||
cy.visit('/')
|
||||
})
|
||||
cy.contains('Sign In').click()
|
||||
cy.visit('/')
|
||||
})
|
||||
it('go to the register form and create an account', () => {
|
||||
cy.visit(`${Cypress.env('api_url')}api/auth/login`)
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"textButtonAbout": "Créer un compte",
|
||||
"textButtonCli": "Accéder à l'outil"
|
||||
}
|
||||
8
cypress/fixtures/contribute.json
Normal file
8
cypress/fixtures/contribute.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"textButtonContribute": "+ Partager des images",
|
||||
"textButtonDocCli": "Voir la documentation",
|
||||
"textButtonDoc": "Retrouvez sa documentation ici",
|
||||
"textButtonDocPython": "de python (au moins la version 3.8)",
|
||||
"textButtonCli": "L'outil en ligne de commande",
|
||||
"textButtonTiles": "de tuiles vectorielles"
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"uploadLink": "Contribuer",
|
||||
"userName": "E",
|
||||
"myPicturesLink": "Mes photos",
|
||||
"deleteSequence": "Supprimer"
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"textLinkAbout": "À propos",
|
||||
"textLinkUpload": "Contribuer",
|
||||
"textLinkAbout": "Pourquoi contribuer ?",
|
||||
"textLinkUpload": "Pourquoi contribuer ?",
|
||||
"textLinkLogin": "Connexion"
|
||||
}
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"textLinkLogin": "Sign In",
|
||||
"textLinkUpload": "Contribuer",
|
||||
"textButtonUpload": "Déposez des photos dans la zone ou"
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 84 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 84 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 60 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 352 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 121 KiB |
Reference in New Issue
Block a user