Skip to content
Snippets Groups Projects
Commit 5e66972b authored by jvfpw18's avatar jvfpw18
Browse files

Working with last simcaq version

parent 89e18c33
No related branches found
No related tags found
No related merge requests found
{
"baseUrl": "http://simcaq.c3sl.ufpr.br/",
"integrationFolder": "./tests"
"integrationFolder": "./tests",
"execTimeout": 60000,
"taskTimeout": 60000,
"defaultCommandTimeout": 20000,
"pageLoadTimeout": 200000,
"responseTimeout": 50000,
"requestTimeout": 50000
}
log2.txt 0 → 100644
[0mGET /api/v1/user/me
[0mGET /api/v1/simulation/pqr [
[0mGET /api/v1/enrollment/years [
[0mGET /api/v1/school/years
[0mGET /api/v1/teacher/years [
[0mGET /api/v1/classroom/years [
[0mGET /api/v1/pibpercapita/years
[0mGET /api/v1/population/years [
[0mGET /api/v1/idhm/years
[0mGET /api/v1/siope/years
[0mGET /api/v1/infrastructure/years
[0mGET /api/v1/class/years
[0mGET /api/v1/cub/years [
[0mGET /api/v1/employees/years
[0mGET /api/v1/transport/years
[0mGET /api/v1/financial/years [
[0mGET /api/v1/daily_charge_amount/years [
[0mGET /api/v1/cub/years_months [
[0mGET /api/v1/enrollment/source
[0mGET /api/v1/school/source [
[0mGET /api/v1/teacher/source
[0mGET /api/v1/classroom/source [
[0mGET /api/v1/pibpercapita/source
[0mGET /api/v1/idhm/source
[0mGET /api/v1/infrastructure/source
[0mGET /api/v1/class/source [
[0mGET /api/v1/employees/source [
[0mGET /api/v1/transport/source
[0mGET /api/v1/daily_charge_amount/source [
[0mGET /api/v1/enrollment/adm_dependency_detailed [
[0mGET /api/v1/enrollment/location [
[0mGET /api/v1/education_years [
[0mGET /api/v1/enrollment?dims=school_year&filter=min_year:%222018%22,max_year:%222018%22
[0mGET /api/v1/enrollment?dims=school_year,adm_dependency_detailed&filter=min_year:%222018%22,max_year:%222018%22 [
[0mGET /api/v1/enrollment?dims=school_year,location&filter=min_year:%222018%22,max_year:%222018%22 [
[0mGET /api/v1/enrollment_projection?filter=min_year:%222018%22,max_year:%222018%22 [
[0mGET /api/v1/enrollment/education_level_short [
[0mGET /api/v1/teacher?dims=education_type&filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B%221%22,%222%22,%223%22%5D,education_type:%5B%222%22,%223%22,%224%22,%225%22,%226%22,%227%22,%228%22%5D [
[0mGET /api/v1/enrollment/location
[0mPOST /api/v1/classroom_count?filter=min_year:%222018%22,max_year:%222018%22 [32m
[0mGET /api/v1/enrollment?dims=school,location&filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B%221%22,%222%22,%223%22%5D [
[0mGET /api/v1/daily_charge_amount?dims=education_level_short&filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B%221%22,%222%22,%223%22%5D,education_level_mod:%5B%221%22,%222%22,%224%22,%225%22,%226%22,%228%22,%229%22%5D,integral_time:%5B%221%22%5D [
[0mGET /api/v1/daily_charge_amount?dims=education_level_short&filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B%221%22,%222%22,%223%22%5D,education_level_mod:%5B%221%22,%222%22,%224%22,%225%22,%226%22,%228%22,%229%22%5D,integral_time:%5B%220%22%5D,period:%5B%223%22%5D [
[0mGET /api/v1/daily_charge_amount?dims=education_level_short&filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B%221%22,%222%22,%223%22%5D,education_level_mod:%5B%221%22,%222%22,%224%22,%225%22,%226%22,%228%22,%229%22%5D,integral_time:%5B%220%22%5D,period:%5B%221%22,%222%22%5D [3
[0mGET /api/v1/enrollment?dims=education_level_short&filter=min_year:%222018%22,max_year:%222018%22,integral_time:%221%22,education_level_short:%5B%221%22,%222%22,%223%22,%224%22,%225%22,%226%22%5D,adm_dependency:%5B%221%22,%222%22,%223%22%5D [
[0mGET /api/v1/class_count/count?dims=education_level_short,location&filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B%221%22,%222%22,%223%22%5D,education_level_short:%5B%221%22,%222%22,%223%22,%224%22,%225%22,%226%22%5D [3
[0mGET /api/v1/teacher?filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B1,2,3%5D [
[0mGET /api/v1/auxiliar?filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B%221%22,%222%22,%223%22%5D,education_level_mod:%5B%221%22,%222%22,%224%22,%225%22,%226%22,%228%22,%229%22%5D
[0mGET /api/v1/teacher?dims=education_type&filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B%221%22,%222%22,%223%22%5D,education_type:%5B%222%22,%223%22,%224%22,%225%22,%226%22,%227%22,%228%22%5D
[0mGET /api/v1/enrollment/education_level_short
[0mGET /api/v1/employees?filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B%221%22,%222%22,%223%22%5D [
[0mGET /api/v1/school/count?filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B1,2,3%5D,school_building:true
[0mGET /api/v1/school/count?dims=location&filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B1,2,3%5D,school_building:true
[0mGET /api/v1/school/count?filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B1,2,3%5D,school_building:false [
[0mGET /api/v1/school_infrastructure?dims=location&filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B1,2,3%5D [
[0mGET /api/v1/cub?filter=min_year:%222018%22,max_year:%222018%22,min_month:%2210%22,max_month%2210%22 [
[0mGET /api/v1/enrollment/years
[0mGET /api/v1/population/years
[0mGET /api/v1/pibpercapita/source [
[0mGET /api/v1/infrastructure/source [
[0mGET /api/v1/class/source
[0mGET /api/v1/state
[0mGET /api/v1/population?filter=min_year:%222016%22,max_year:%222016%22 [
[0mGET /api/v1/pibpercapita?filter=min_year:%222014%22,max_year:%222014%22 [
[0mGET /api/v1/pibpercapita?filter=min_year:%222014%22,max_year:%222014%22&dims=income_level [
[0mGET /api/v1/school/count?filter=min_year:%222018%22,max_year:%222018%22&dims=adm_dependency_detailed,location [
[0mGET /api/v1/enrollment?filter=min_year:%222018%22,max_year:%222018%22&dims=adm_dependency_detailed,location [
[0mGET /api/v1/school/count?filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B1,2,3%5D,school_building:false
[0mGET /api/v1/class?filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B%221%22,%222%22,%223%22%5D [
[0mGET /api/v1/employees?filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B%221%22,%222%22,%223%22%5D
[0mGET /api/v1/teacher?filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B%221%22,%222%22,%223%22%5D
[0mGET /api/v1/cub?dims=state&filter=min_year:%222018%22,max_year:%222018%22,min_month:%2210%22,max_month%2210%22 [
[0mGET /api/v1/classroom?filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B%221%22,%222%22,%223%22%5D [
[0mPOST /api/v1/classroom_count?filter=min_year:%222018%22,max_year:%222018%22&dims=state [32m
[0mGET /api/v1/school_infrastructure?dims=state,location&filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B1,2,3%5D [
[0mGET /api/v1/financial?filter=min_year:%222018%22,max_year:%222018%22,financial_data:%5B%221%22,%223%22%5D [3
[0mGET /api/v1/out_of_school/simcaq?filter=min_year:%222018%22,max_year:%222018%22,state:%220%22&dims=pfe,state
[0mGET /api/v1/out_of_school/simcaq?filter=min_year:%222018%22,max_year:%222018%22,state:%220%22&dims=pfe,state [
[0mGET /api/v1/auxiliar?filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B%221%22,%222%22,%223%22%5D,education_level_mod:%5B%221%22,%222%22,%224%22,%225%22,%226%22,%228%22,%229%22%5D [
[0mGET /api/v1/user/me [
[0mGET /api/v1/school/years [
[0mGET /api/v1/teacher/years
[0mGET /api/v1/idhm/source [
[0mGET /api/v1/employees/source
[0mGET /api/v1/transport/source [
[0mGET /api/v1/state [
[0mGET /api/v1/city?filter=state:%2243%22 [
[0mGET /api/v1/population?dims=state&filter=min_year:%222016%22,max_year:%222016%22,state:%2243%22
[0mGET /api/v1/pibpercapita?dims=state&filter=min_year:%222014%22,max_year:%222014%22,state:%2243%22
[0mGET /api/v1/pibpercapita?dims=income_level&filter=min_year:%222014%22,max_year:%222014%22,state:%2243%22
[0mGET /api/v1/idhm?dims=state&filter=min_year:%222010%22,max_year:%222010%22,state:%2243%22 [
[0mGET /api/v1/idhm?dims=idhm_level&filter=min_year:%222010%22,max_year:%222010%22,state:%2243%22
[0mGET /api/v1/school/count?dims=adm_dependency_detailed,location&filter=min_year:%222018%22,max_year:%222018%22,state:%2243%22
[0mGET /api/v1/enrollment?dims=adm_dependency_detailed,location&filter=min_year:%222018%22,max_year:%222018%22,state:%2243%22
[0mGET /api/v1/enrollment/adm_dependency_detailed
[0mGET /api/v1/education_years
[0mGET /api/v1/enrollment?dims=school_year&filter=min_year:%222018%22,max_year:%222018%22,state:%2243%22 [32
[0mGET /api/v1/enrollment?dims=school_year,adm_dependency_detailed&filter=min_year:%222018%22,max_year:%222018%22,state:%2243%22 [32
[0mGET /api/v1/enrollment?dims=school_year,location&filter=min_year:%222018%22,max_year:%222018%22,state:%2243%22 [32
[0mGET /api/v1/enrollment_projection?filter=min_year:%222018%22,max_year:%222018%22,state:%2243%22 [
[0mGET /api/v1/teacher?dims=education_type&filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B%221%22,%222%22,%223%22%5D,education_type:%5B%222%22,%223%22,%224%22,%225%22,%226%22,%227%22,%228%22%5D,state:%2243%22 [
[0mGET /api/v1/school/count?dims=location&filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B1,2,3%5D,state:%2243%22,school_building:true [
[0mGET /api/v1/school/count?filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B1,2,3%5D,state:%2243%22,school_building:true [
[0mGET /api/v1/school/count?filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B1,2,3%5D,state:%2243%22,school_building:false [
[0mGET /api/v1/school_infrastructure?dims=location&filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B1,2,3%5D,state:%2243%22 [3
[0mGET /api/v1/cub?filter=min_year:%222018%22,max_year:%222018%22,min_month:%2210%22,max_month%2210%22,state:%2243%22 [
[0mPOST /api/v1/classroom_count?filter=min_year:%222018%22,max_year:%222018%22,state:%2243%22&dims=state [3
[0mGET /api/v1/class?filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B%221%22,%222%22,%223%22%5D,state:%2243%22 [
[0mGET /api/v1/classroom?filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B%221%22,%222%22,%223%22%5D,state:%2243%22
[0mGET /api/v1/employees?filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B%221%22,%222%22,%223%22%5D,state:%2243%22 [3
[0mGET /api/v1/teacher?filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B%221%22,%222%22,%223%22%5D,state:%2243%22 [32
[0mGET /api/v1/enrollment?dims=school,location&filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B%221%22,%222%22,%223%22%5D,state:%2243%22 [32
[0mGET /api/v1/financial?filter=min_year:%222018%22,max_year:%222018%22,financial_data:%5B%221%22,%223%22%5D,state:%2243%22 [
[0mGET /api/v1/out_of_school/simcaq?filter=min_year:%222018%22,max_year:%222018%22,state:%2243%22&dims=pfe,state [
[0mGET /api/v1/daily_charge_amount?dims=education_level_short&filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B%221%22,%222%22,%223%22%5D,education_level_mod:%5B%221%22,%222%22,%224%22,%225%22,%226%22,%228%22,%229%22%5D,integral_time:%5B%221%22%5D,state:%2243%22 [
[0mGET /api/v1/daily_charge_amount?dims=education_level_short&filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B%221%22,%222%22,%223%22%5D,education_level_mod:%5B%221%22,%222%22,%224%22,%225%22,%226%22,%228%22,%229%22%5D,integral_time:%5B%220%22%5D,period:%5B%223%22%5D,state:%2243%22 [
[0mGET /api/v1/daily_charge_amount?dims=education_level_short&filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B%221%22,%222%22,%223%22%5D,education_level_mod:%5B%221%22,%222%22,%224%22,%225%22,%226%22,%228%22,%229%22%5D,integral_time:%5B%220%22%5D,period:%5B%221%22,%222%22%5D,state:%2243%22 [3
[0mGET /api/v1/enrollment?dims=education_level_short&filter=min_year:%222018%22,max_year:%222018%22,integral_time:%221%22,education_level_short:%5B%221%22,%222%22,%223%22,%224%22,%225%22,%226%22%5D,adm_dependency:%5B%221%22,%222%22,%223%22%5D,state:%2243%22
[0mGET /api/v1/class_count/count?dims=education_level_short,location&filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B%221%22,%222%22,%223%22%5D,education_level_short:%5B%221%22,%222%22,%223%22,%224%22,%225%22,%226%22%5D,state:%2243%22 [
[0mGET /api/v1/teacher?filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B1,2,3%5D,state:%2243%22 [32
[0mGET /api/v1/auxiliar?filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B%221%22,%222%22,%223%22%5D,education_level_mod:%5B%221%22,%222%22,%224%22,%225%22,%226%22,%228%22,%229%22%5D,state:%2243%22
[0mGET /api/v1/teacher?dims=education_type&filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B%221%22,%222%22,%223%22%5D,education_type:%5B%222%22,%223%22,%224%22,%225%22,%226%22,%227%22,%228%22%5D,state:%2243%22
[0mGET /api/v1/siope/years [
[0mGET /api/v1/employees/years [
[0mGET /api/v1/enrollment/source [
[0mGET /api/v1/enrollment?dims=school_year,adm_dependency_detailed&filter=min_year:%222018%22,max_year:%222018%22
[0mGET /api/v1/enrollment?dims=school_year,location&filter=min_year:%222018%22,max_year:%222018%22
[0mGET /api/v1/teacher?dims=state,education_type&filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B%221%22,%222%22,%223%22%5D,education_type:%5B%222%22,%223%22,%224%22,%225%22,%226%22,%227%22,%228%22%5D
[0mGET /api/v1/enrollment?dims=school,state,location&filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B%221%22,%222%22,%223%22%5D [
[0mGET /api/v1/financial?filter=min_year:%222018%22,max_year:%222018%22,financial_data:%5B%221%22,%222%22,%224%22%5D [3
[0mGET /api/v1/teacher?filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B1,2,3%5D
[0mGET /api/v1/school/count?filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B1,2,3%5D,school_building:true [
[0mGET /api/v1/school/count?dims=location&filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B1,2,3%5D,school_building:true [
[0mGET /api/v1/school_infrastructure?dims=location&filter=min_year:%222018%22,max_year:%222018%22,adm_dependency:%5B1,2,3%5D
{
"dependencies": {
"cypress": "^3.3.2"
"cypress": "3.3.2"
},
"scripts": {
"cypress": "cypress open",
"cy:run": "cypress run"
},
"devDependencies": {
"cypress": "^3.3.2"
"cypress": "3.3.2"
}
}
const TIMEOUT = { timeout: 140000 };
describe('1 - CAQ', function () {
it('successfully loads', function () {
......@@ -19,27 +19,30 @@ describe('1 - CAQ', function () {
cy.get('.caq').contains('Acessar').click()
cy.get('.block-ui-main').should('visible')
cy.wait(Array(5).fill('@getEnrollment'), TIMEOUT)
cy.wait(Array(5).fill('@getEnrollment') )
cy.wait(1000)
cy.wait('@postApi', TIMEOUT)
cy.wait('@postApi' )
cy.wait(300)
cy.get('.block-ui-main' ).should('not.be.visible')
cy.route({ url: 'api/v1/**', method: 'GET' }).as('getApi')
cy.get('.edit-mode' ).click()
let apiGetCalls = [1, 1, 0, 1, 0, 3, 1, 1, 0, 4, 2, 0, 4, 0, 1, 0, 0, 7, 3, 0, 0, 0, 0, 0] // Quantidade de get's da api por tela
for (let i = 0; i < 24; i++) {
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
for (let i = 0; i < 19; i++) {
cy.wait(300)
if (apiGetCalls[i] > 0)
cy.wait(Array(apiGetCalls[i]).fill('@getApi'), TIMEOUT)
if (i == 9 || i == 18) { // Telas que contêm um post.
cy.wait(Array(apiGetCalls[i]).fill('@getApi') )
if (i == 5 || i == 13) { // Telas que contêm um post.
cy.wait(500)
cy.wait('@postApi', TIMEOUT)
cy.wait('@postApi' )
}
cy.get('.block-ui-main' ).should('not.be.visible')
cy.get('.btn-primary.step.next').click()
}
cy.wait(Array(3).fill('@getApi'), TIMEOUT)
cy.get('.block-ui-main', TIMEOUT).should('not.visible').then(() => { return cy.get('.finalize').click() })
cy.wait(Array(3).fill('@getApi') )
cy.get('.block-ui-main' ).should('not.visible').then(() => { return cy.get('.finalize').click() })
cy.server({enable: false})
})
})
......@@ -48,46 +51,50 @@ describe('2 - Orçamento educacional', 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.server()
cy.route({ url: '/api/v1/enrollment**', method: 'GET' }).as('getEnrollment')
cy.route({ url: 'api/v1/classroom_coun**', method: 'POST' }).as('postApi')
cy.wait(1000)
cy.get('.planning').contains('Simular').click()
cy.wait('@getEnrollment', TIMEOUT)
cy.wait('@getEnrollment' ).its('status').should('be', 200)
cy.wait(300)
cy.get('.block-ui-main' ).should('not.be.visible')
cy.contains('Simular').click()
cy.wait(Array(5).fill('@getEnrollment'), TIMEOUT)
cy.wait(Array(5).fill('@getEnrollment') ).its('status').should('be', 200)
cy.wait(1000)
cy.wait(['@postApi', '@postApi'] ).its('status').should('be', 200) // Classroom count chamada duas vezes seguidas
cy.wait(1000)
cy.wait(['@postApi', '@postApi'], TIMEOUT) // Classroom count chamada duas vezes seguidas
cy.wait(300)
cy.get('.block-ui-main' ).should('not.be.visible')
cy.get('.edit-mode').click()
cy.route({ url: 'api/v1/**', method: 'GET' }).as('getApi')
cy.wait(300)
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, 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, 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
for (let i = 0; i < 24; i++) {
cy.wait(300)
if (apiGetCalls[i] > 0)
cy.wait(Array(apiGetCalls[i]).fill('@getApi'), TIMEOUT)
if (i == 10 || i == 19) { // Telas que contêm um post.
cy.wait(Array(apiGetCalls[i]).fill('@getApi') )
if (i == 10 || i == 18) { // Telas que contêm um post.
cy.wait(500)
cy.wait('@postApi', TIMEOUT)
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'), TIMEOUT)
cy.get('.block-ui-main', TIMEOUT).should('not.visible').then(() => { return cy.get('.finalize').click() })
cy.wait(Array(3).fill('@getApi') )
cy.get('.block-ui-spinner' ).should('not.visible').then(() => { return cy.get('.finalize').click() })
})
it('successfully loads with RS selected', function () {
......@@ -106,17 +113,18 @@ describe('2 - Orçamento educacional', function () {
cy.wait(1000)
cy.get('.planning').contains('Simular').click()
cy.wait('@getEnrollment', TIMEOUT)
cy.wait('@getEnrollment' )
cy.wait(300)
cy.get('.block-ui-spinner' ).should('not.be.visible')
cy.get('.state-rs').click({ force: true })
cy.wait('@getEnrollment', TIMEOUT)
cy.wait('@getEnrollment' )
cy.wait(300)
cy.contains('Simular').click()
cy.wait(Array(5).fill('@getEnrollment'), TIMEOUT)
cy.wait(Array(5).fill('@getEnrollment') )
cy.wait(1000)
cy.wait(['@postApi', '@postApi'], TIMEOUT) // Classroom count chamada duas vezes seguidas
cy.wait(['@postApi', '@postApi'] ) // Classroom count chamada duas vezes seguidas
cy.wait(300)
cy.get('.edit-mode').click()
......@@ -128,16 +136,16 @@ describe('2 - Orçamento educacional', function () {
for (let i = 0; i < 25; i++) {
cy.wait(300)
if (apiGetCalls[i] > 0)
cy.wait(Array(apiGetCalls[i]).fill('@getApi'), TIMEOUT)
cy.wait(Array(apiGetCalls[i]).fill('@getApi') )
if (i == 10 || i == 19) { // Telas que contêm um post.
cy.wait(500)
cy.wait('@postApi', TIMEOUT)
cy.wait('@postApi' )
}
cy.get('.btn-primary.step.next').click()
}
cy.wait(Array(3).fill('@getApi'), TIMEOUT)
cy.get('.block-ui-main', TIMEOUT).should('not.visible').then(() => { return cy.get('.finalize').click() })
cy.wait(Array(3).fill('@getApi') )
cy.get('.block-ui-spinner' ).should('not.visible').then(() => { return cy.get('.finalize').click() })
})
})
......@@ -158,29 +166,31 @@ describe('3 - Fundo de manutenção', function () {
cy.wait(1000)
cy.get('.financing').contains('Consultar').click()
cy.wait(Array(5).fill('@getEnrollment'), TIMEOUT)
cy.wait(Array(5).fill('@getEnrollment') )
cy.wait(1000)
cy.wait('@postApi', TIMEOUT)
cy.wait('@postApi' )
cy.wait(15000)
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, 1, 0, 0, 7, 3, 0, 0, 0, 0, 0] // Quantidade de get's da api por tela
for (let i = 0; i < 24; i++) {
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'), TIMEOUT)
if (i == 9 || i == 18) { // Telas que contêm um post.
cy.wait(Array(apiGetCalls[i]).fill('@getApi') )
if (i == 9 || i == 17) { // Telas que contêm um post.
cy.wait(500)
cy.wait('@postApi', TIMEOUT)
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'), TIMEOUT)
cy.get('.block-ui-main', TIMEOUT).should('not.visible').then(() => { return cy.get('.finalize').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