Updated createApp.spec.js

The test 'should provide filterable templates' was failing on the smoke build.

Updated to check existence of apps and act accordingly
This commit is contained in:
Mitch-Budibase 2022-04-12 17:24:15 +01:00
parent d775fd7d5f
commit eba7df7255
1 changed files with 7 additions and 3 deletions

View File

@ -25,9 +25,13 @@ filterTests(['smoke', 'all'], () => {
cy.visit(`${Cypress.config().baseUrl}/builder`)
cy.wait(500)
if (Cypress.env("TEST_ENV")) {
cy.request(`${Cypress.config().baseUrl}/api/applications?status=all`)
.its("body")
.then(val => {
if (val.length > 0) {
cy.get(".spectrum-Button").contains("Templates").click({force: true})
}
})
cy.get(".template-category-filters").should("exist")
cy.get(".template-categories").should("exist")