Update cpyress tests so create and delete app helpers work again
This commit is contained in:
parent
cb803b1abf
commit
e7089a26cd
|
@ -40,21 +40,30 @@ Cypress.Commands.add("createApp", name => {
|
|||
}
|
||||
})
|
||||
.then(() => {
|
||||
cy.get("input[name=applicationName]")
|
||||
cy.get(".spectrum-Modal")
|
||||
.within(() => {
|
||||
cy.get("input")
|
||||
.eq(0)
|
||||
.type(name)
|
||||
.should("have.value", name)
|
||||
.blur()
|
||||
cy.contains("Next").click()
|
||||
cy.get("input[name=email]")
|
||||
.click()
|
||||
cy.get("input")
|
||||
.eq(1)
|
||||
.type("test@test.com")
|
||||
cy.get("input[name=password]")
|
||||
.click()
|
||||
.blur()
|
||||
cy.get("input")
|
||||
.eq(2)
|
||||
.type("test")
|
||||
.blur()
|
||||
cy.contains("Submit").click()
|
||||
})
|
||||
.then(() => {
|
||||
cy.get("[data-cy=new-table]", {
|
||||
timeout: 20000,
|
||||
}).should("be.visible")
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Cypress.Commands.add("deleteApp", name => {
|
||||
|
@ -62,11 +71,15 @@ Cypress.Commands.add("deleteApp", name => {
|
|||
cy.get(".apps").then($apps => {
|
||||
cy.wait(1000)
|
||||
if ($apps.find(`[data-cy="app-${name}"]`).length) {
|
||||
cy.get(`[data-cy="app-${name}"] a`).click()
|
||||
cy.get(`[data-cy="app-${name}"]`)
|
||||
.contains("Open")
|
||||
.click()
|
||||
cy.get("[data-cy=settings-icon]").click()
|
||||
cy.get(".modal-content").within(() => {
|
||||
cy.get(".spectrum-Dialog").within(() => {
|
||||
cy.contains("Danger Zone").click()
|
||||
cy.get("input").type("DELETE")
|
||||
cy.get("input")
|
||||
.type("DELETE")
|
||||
.blur()
|
||||
cy.contains("Delete Entire App").click()
|
||||
})
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script>
|
||||
import SettingsModal from "./SettingsModal.svelte"
|
||||
import { Modal } from "@budibase/bbui"
|
||||
import { Modal, Icon } from "@budibase/bbui"
|
||||
|
||||
let modal
|
||||
</script>
|
||||
|
@ -9,7 +9,7 @@
|
|||
class="topnavitemright settings"
|
||||
data-cy="settings-icon"
|
||||
on:click={modal.show}>
|
||||
<i class="ri-settings-3-line" />
|
||||
<Icon hoverable name="Settings" />
|
||||
</div>
|
||||
<Modal bind:this={modal} width="600px">
|
||||
<SettingsModal />
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
</Tabs>
|
||||
<div
|
||||
class="add-button"
|
||||
data-cy={`new-${selected === 'External' ? 'datasource' : 'tabel'}`}>
|
||||
data-cy={`new-${selected === 'External' ? 'datasource' : 'table'}`}>
|
||||
<Icon hoverable name="AddCircle" on:click={modal.show} />
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue