Skip to content
Snippets Groups Projects
Commit 82727f40 authored by jvfpw18's avatar jvfpw18
Browse files

Last Version

parent 7e2ca56f
No related branches found
No related tags found
No related merge requests found
{
"baseUrl": "http://simcaq.c3sl.ufpr.br/",
"integrationFolder": "./tests",
"execTimeout": 80000,
"taskTimeout": 80000,
"defaultCommandTimeout": 40000,
"execTimeout": 100000,
"taskTimeout": 100000,
"defaultCommandTimeout": 60000,
"pageLoadTimeout": 400000,
"responseTimeout": 100000,
"requestTimeout": 100000
"responseTimeout": 120000,
"requestTimeout": 120000
}
......@@ -28,7 +28,7 @@ describe('1 - CAQ', function () {
cy.route({ url: 'api/v1/**', method: 'GET' }).as('getApi')
cy.get('.edit-mode' ).click()
let apiGetCalls = [0, 3, 1, 1, 0, 4, 2, 0, 4, 0, 0, 0, 7, 3, 0, 0, 0, 0, 0, 0] // Quantidade de get's da api por tela
let apiGetCalls = [0, 3, 2, 1, 0, 4, 1, 0, 4, 0, 0, 0, 7, 3, 0, 0, 0, 0, 0, 0] // Quantidade de get's da api por tela
for (let i = 0; i < 19; i++) {
cy.wait(300)
if (apiGetCalls[i] > 0)
......@@ -80,7 +80,7 @@ describe('2 - Orçamento educacional', function () {
cy.get('.block-ui-spinner' ).should('not.be.visible')
cy.contains('4').click()
let apiGetCalls = [0, 1, 2, 0, 1, 0, 3, 1, 1, 0, 4, 2, 0, 4, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0] // Quantidade de get's da api por tela
let apiGetCalls = [0, 1, 2, 0, 1, 0, 3, 2, 1, 0, 4, 0, 0, 4, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0] // Quantidade de get's da api por tela
for (let i = 0; i < 24; i++) {
cy.wait(300)
if (apiGetCalls[i] > 0)
......@@ -93,7 +93,10 @@ describe('2 - Orçamento educacional', function () {
cy.get('.block-ui-spinner' ).should('not.be.visible')
cy.get('.btn-primary.step.next').click()
}
cy.wait(Array(3).fill('@getApi') )
cy.wait(Array(8).fill('@getApi') )
cy.wait(1000)
cy.wait('@postApi')
cy.wait(300)
cy.get('.block-ui-spinner' ).should('not.visible').then(() => { return cy.get('.finalize').click() })
})
......@@ -132,12 +135,12 @@ describe('2 - Orçamento educacional', function () {
cy.wait(300)
cy.contains('4').click()
let apiGetCalls = [0, 1, 2, 0, 1, 0, 3, 1, 1, 0, 4, 2, 0, 4, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0] // Quantidade de get's da api por tela
for (let i = 0; i < 25; i++) {
let apiGetCalls = [0, 1, 2, 0, 1, 0, 3, 2, 1, 0, 4, 2, 0, 4, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0] // Quantidade de get's da api por tela
for (let i = 0; i < 24; i++) {
cy.wait(300)
if (apiGetCalls[i] > 0)
cy.wait(Array(apiGetCalls[i]).fill('@getApi') )
if (i == 10 || i == 19) { // Telas que contêm um post.
if (i == 10 || i == 18) { // Telas que contêm um post.
cy.wait(500)
cy.wait('@postApi' )
}
......@@ -145,52 +148,55 @@ describe('2 - Orçamento educacional', function () {
cy.get('.btn-primary.step.next').click()
}
cy.wait(Array(3).fill('@getApi') )
cy.get('.block-ui-spinner' ).should('not.visible').then(() => { return cy.get('.finalize').click() })
})
})
describe('3 - Fundo de manutenção', function () {
it('successfully loads', function () {
cy.clearLocalStorage()
cy.clearCookies()
cy.server()
cy.route({ url: 'api/v1/enrollment**', method: 'GET' }).as('getEnrollment')
cy.route({ url: 'api/v1/classroom_count**', method: 'POST' }).as('postApi')
cy.visit('http://simcaq.c3sl.ufpr.br/', {
auth: {
username: 'simcaq',
password: 'simcaqeducacao'
}
})
cy.wait(1000)
cy.get('.financing').contains('Consultar').click()
cy.wait(Array(5).fill('@getEnrollment') )
cy.wait(1000)
cy.wait('@postApi' )
cy.wait(1500)
cy.route({ url: 'api/v1/**', method: 'GET' }).as('getApi')
cy.route({ url: 'api/v1/classroom_count**', method: 'POST' }).as('postApi')
cy.get('.block-ui-spinner' ).should('not.be.visible')
cy.get('.edit-mode').click()
let apiGetCalls = [1, 1, 0, 1, 0, 3, 1, 1, 0, 4, 2, 0, 4, 0, 0, 0, 7, 3, 0, 0, 0, 0, 0] // Quantidade de get's da api por tela
for (let i = 0; i < 23; i++) {
cy.wait(300)
if (apiGetCalls[i] > 0)
cy.wait(Array(apiGetCalls[i]).fill('@getApi') )
if (i == 9 || i == 17) { // Telas que contêm um post.
cy.wait(500)
cy.wait('@postApi' )
}
cy.get('.block-ui-spinner' ).should('not.be.visible')
cy.get('.btn-primary.step.next').click()
}
cy.wait(Array(3).fill('@getApi') )
cy.get('.block-ui-spinner' ).should('not.visible').then(() => { return cy.get('.finalize').click() })
})
})
// Tela 3 está desativada no momento.
// describe('3 - Fundo de manutenção', function () {
// it('successfully loads', function () {
// cy.clearLocalStorage()
// cy.clearCookies()
// cy.server()
// cy.route({ url: 'api/v1/enrollment**', method: 'GET' }).as('getEnrollment')
// cy.route({ url: 'api/v1/classroom_count**', method: 'POST' }).as('postApi')
// cy.visit('http://simcaq.c3sl.ufpr.br/', {
// auth: {
// username: 'simcaq',
// password: 'simcaqeducacao'
// }
// })
// cy.wait(1000)
// cy.get('.financing').contains('Consultar').click()
// cy.wait(Array(5).fill('@getEnrollment') )
// cy.wait(1000)
// cy.wait('@postApi' )
// cy.wait(1500)
// cy.route({ url: 'api/v1/**', method: 'GET' }).as('getApi')
// cy.route({ url: 'api/v1/classroom_count**', method: 'POST' }).as('postApi')
// cy.get('.block-ui-spinner' ).should('not.be.visible')
// cy.get('.edit-mode').click()
// let apiGetCalls = [1, 1, 0, 1, 0, 3, 1, 1, 0, 4, 2, 0, 4, 0, 0, 0, 7, 3, 0, 0, 0, 0, 0] // Quantidade de get's da api por tela
// for (let i = 0; i < 23; i++) {
// cy.wait(300)
// if (apiGetCalls[i] > 0)
// cy.wait(Array(apiGetCalls[i]).fill('@getApi') )
// if (i == 9 || i == 17) { // Telas que contêm um post.
// cy.wait(500)
// cy.wait('@postApi' )
// }
// cy.get('.block-ui-spinner' ).should('not.be.visible')
// cy.get('.btn-primary.step.next').click()
// }
// cy.wait(Array(3).fill('@getApi') )
// cy.get('.block-ui-spinner' ).should('not.visible').then(() => { return cy.get('.finalize').click() })
// })
// })
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment