adding locators for PublishWorkFlow test
This commit is contained in:
parent
25e1696008
commit
c387863923
|
@ -15,7 +15,7 @@ filterTests(['all'], () => {
|
|||
cy.get(interact.APP_TABLE_STATUS).eq(0)
|
||||
.within(() => {
|
||||
cy.contains("Unpublished")
|
||||
cy.get("svg[aria-label='GlobeStrike']").should("exist")
|
||||
cy.get(interact.GLOBESTRIKE).should("exist")
|
||||
})
|
||||
|
||||
cy.get(interact.APP_TABLE_ROW_ACTION).eq(0)
|
||||
|
@ -32,34 +32,34 @@ filterTests(['all'], () => {
|
|||
//Assuming the previous test was run and the unpublished app is open in edit mode.
|
||||
cy.get(interact.TOPRIGHTNAV_BUTTON_SPECTRUM).contains("Publish").click({ force : true })
|
||||
|
||||
cy.get(".spectrum-Modal [data-cy='deploy-app-modal']").should("be.visible")
|
||||
cy.get(interact.DEPLOY_APP_MODAL).should("be.visible")
|
||||
.within(() => {
|
||||
cy.get(interact.SPECTRUM_BUTTON_TEMPLATE).contains("Publish").click({ force : true })
|
||||
cy.get(interact.SPECTRUM_BUTTON).contains("Publish").click({ force : true })
|
||||
cy.wait(1000)
|
||||
});
|
||||
|
||||
//Verify that the app url is presented correctly to the user
|
||||
cy.get(".spectrum-Modal [data-cy='deploy-app-success-modal']")
|
||||
cy.get(interact.DEPLOY_APP_MODAL)
|
||||
.should("be.visible")
|
||||
.within(() => {
|
||||
let appUrl = Cypress.config().baseUrl + '/app/cypress-tests'
|
||||
cy.get("[data-cy='deployed-app-url'] input").should('have.value', appUrl)
|
||||
cy.get(interact.SPECTRUM_BUTTON_TEMPLATE).contains("Done").click({ force: true })
|
||||
cy.get(interact.DEPLOY_APP_URL_INPUT).should('have.value', appUrl)
|
||||
cy.get(interact.SPECTRUM_BUTTON).contains("Done").click({ force: true })
|
||||
})
|
||||
|
||||
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
||||
cy.wait(1000)
|
||||
|
||||
cy.get(".appTable .app-status").eq(0)
|
||||
cy.get(interact.APP_TABLE_STATUS).eq(0)
|
||||
.within(() => {
|
||||
cy.contains("Published")
|
||||
cy.get("svg[aria-label='Globe']").should("exist")
|
||||
cy.get(interact.GLOBE).should("exist")
|
||||
})
|
||||
|
||||
cy.get(".appTable .app-row-actions").eq(0)
|
||||
cy.get(interact.APP_TABLE_ROW_ACTION).eq(0)
|
||||
.within(() => {
|
||||
cy.get(".spectrum-Button").contains("View")
|
||||
cy.get(".spectrum-Button").contains("Edit").click({ force: true })
|
||||
cy.get(interact.SPECTRUM_BUTTON).contains("View")
|
||||
cy.get(interact.SPECTRUM_BUTTON).contains("Edit").click({ force: true })
|
||||
})
|
||||
|
||||
cy.get(interact.DEPLOYMENT_TOP_GLOBE).should("exist").click({ force: true })
|
||||
|
@ -83,30 +83,30 @@ filterTests(['all'], () => {
|
|||
cy.get("svg[aria-label='Globe']").should("exist")
|
||||
})
|
||||
|
||||
cy.get(".appTable .app-row-actions").eq(0)
|
||||
cy.get(interact.APP_TABLE_ROW_ACTION).eq(0)
|
||||
.within(() => {
|
||||
cy.get(interact.SPECTRUM_BUTTON).contains("View app")
|
||||
cy.get(interact.SPECTRUM_BUTTON).contains("Edit").click({ force: true })
|
||||
})
|
||||
|
||||
//The published status
|
||||
cy.get(".deployment-top-nav svg[aria-label='Globe']").should("exist")
|
||||
cy.get(interact.DEPLOYMENT_TOP_GLOBE).should("exist")
|
||||
.click({ force: true })
|
||||
|
||||
cy.get("[data-cy='publish-popover-menu']").should("be.visible")
|
||||
cy.get(interact.PUBLISH_POPOVER_MENU).should("be.visible")
|
||||
cy.get("[data-cy='publish-popover-menu'] [data-cy='publish-popover-action']")
|
||||
.click({ force : true })
|
||||
|
||||
cy.get("[data-cy='unpublish-modal']").should("be.visible")
|
||||
cy.get(interact.UNPUBLISH_MODAL).should("be.visible")
|
||||
.within(() => {
|
||||
cy.get(".confirm-wrap button").click({ force: true }
|
||||
cy.get(interact.CONFIRM_WRAP_BUTTON).click({ force: true }
|
||||
)})
|
||||
|
||||
cy.get(".deployment-top-nav svg[aria-label='GlobeStrike']").should("exist")
|
||||
cy.get(interact.DEPLOYMENT_TOP_NAV_GLOBESTRIKE).should("exist")
|
||||
|
||||
cy.visit(`${Cypress.config().baseUrl}/builder`)
|
||||
|
||||
cy.get(".appTable .app-status").eq(0).contains("Unpublished")
|
||||
cy.get(interact.APP_TABLE_STATUS).eq(0).contains("Unpublished")
|
||||
|
||||
})
|
||||
})
|
||||
|
|
|
@ -30,7 +30,7 @@ filterTests(['smoke', 'all'], () => {
|
|||
.its("body")
|
||||
.then(val => {
|
||||
if (val.length > 0) {
|
||||
cy.get(interact.SPECTRUM_BUTTON_TEMPLATE).contains("Templates").click({force: true})
|
||||
cy.get(interact.SPECTRUM_BUTTON).contains("Templates").click({force: true})
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
@ -50,3 +50,11 @@ export const ITEM_DISABLED = ".item.disabled"
|
|||
export const CONFIRM_WRAP_SPE_BUTTON = ".confirm-wrap .spectrum-Button"
|
||||
export const DATA_SOURCE_ENTRY = ".data-source-entry"
|
||||
export const NAV_ITEMS_CONTAINER = ".nav-items-container"
|
||||
|
||||
//publishWorkFlow
|
||||
export const DEPLOY_APP_MODAL = ".spectrum-Modal [data-cy=deploy-app-modal]"
|
||||
export const DEPLOY_APP_URL_INPUT = "[data-cy=deployed-app-url] input"
|
||||
export const GLOBESTRIKE = "svg[aria-label=GlobeStrike]"
|
||||
export const GLOBE = "svg[aria-label=Globe]"
|
||||
export const UNPUBLISH_MODAL = "[data-cy=unpublish-modal]"
|
||||
export const CONFIRM_WRAP_BUTTON = ".confirm-wrap button"
|
||||
|
|
Loading…
Reference in New Issue