1
0
Fork 0
mirror of synced 2024-07-15 11:15:59 +12:00

Update createApp.spec.js

resolve conflict
This commit is contained in:
MihailHadzhiev2022 2022-05-17 11:02:24 +03:00
parent 1b7be97016
commit a3d5213384

View file

@ -64,7 +64,10 @@ filterTests(['smoke', 'all'], () => {
const appName = "Cypress Tests"
cy.get(interact.SPECTRUM_MODAL).within(() => {
cy.get(interact.APP_NAME_INPUT).eq(0).should('have.focus')
//Auto fill
cy.get(interact.APP_NAME_INPUT).eq(0).clear()
cy.get(interact.APP_NAME_INPUT).eq(0).type(appName).should("have.value", appName).blur()
cy.get(interact.APP_NAME_INPUT).eq(1).should("have.value", "/cypress-tests")
cy.get(interact.SPECTRUM_BUTTON_GROUP).contains("Create app").should('not.be.disabled')
@ -98,6 +101,75 @@ filterTests(['smoke', 'all'], () => {
cy.deleteApp(appName)
})
it("should create the first application from scratch with a default name", () => {
cy.createApp()
cy.visit(`${Cypress.config().baseUrl}/builder`)
cy.wait(1000)
cy.applicationInAppTable("My app")
cy.deleteApp("My app")
})
it("should create the first application from scratch, using the users first name as the default app name", () => {
cy.visit(`${Cypress.config().baseUrl}/builder`)
cy.updateUserInformation("Ted", "Userman")
cy.createApp()
cy.visit(`${Cypress.config().baseUrl}/builder`)
cy.wait(1000)
cy.applicationInAppTable("Teds app")
cy.deleteApp("Teds app")
//Accomodate names that end in 'S'
cy.updateUserInformation("Chris", "Userman")
cy.createApp()
cy.visit(`${Cypress.config().baseUrl}/builder`)
cy.wait(1000)
cy.applicationInAppTable("Chris app")
cy.deleteApp("Chris app")
cy.updateUserInformation("", "")
})
it("should create an application from an export", () => {
const exportedApp = 'cypress/fixtures/exported-app.txt'
cy.importApp(exportedApp, "")
cy.visit(`${Cypress.config().baseUrl}/builder`)
cy.applicationInAppTable("My app")
cy.get(".appTable .name").eq(0).click()
cy.deleteApp("My app")
})
it("should create an application from an export, using the users first name as the default app name", () => {
const exportedApp = 'cypress/fixtures/exported-app.txt'
cy.updateUserInformation("Ted", "Userman")
cy.importApp(exportedApp, "")
cy.visit(`${Cypress.config().baseUrl}/builder`)
cy.applicationInAppTable("Teds app")
cy.get(".appTable .name").eq(0).click()
cy.deleteApp("Teds app")
cy.updateUserInformation("", "")
})
it("should generate the first application from a template", () => {
cy.visit(`${Cypress.config().baseUrl}/builder`)
cy.wait(500)