Merge branch 'feature/automation-redesign' of github.com:Budibase/budibase into feature/automation-query
This commit is contained in:
commit
ed71f6bf75
|
@ -7,26 +7,42 @@ context("Create a automation", () => {
|
|||
// https://on.cypress.io/interacting-with-elements
|
||||
it("should create a automation", () => {
|
||||
cy.createTestTableWithData()
|
||||
|
||||
cy.wait(2000)
|
||||
cy.contains("Automate").click()
|
||||
cy.get("[data-cy='new-screen'] > .spectrum-Icon").click()
|
||||
cy.get(".spectrum-Dialog-grid").within(() => {
|
||||
cy.get(".modal-inner-wrapper").within(() => {
|
||||
cy.get("input").type("Add Row")
|
||||
cy.contains("Row Created").click()
|
||||
cy.wait(500)
|
||||
cy.get(".spectrum-Button--cta").click()
|
||||
})
|
||||
|
||||
// Add trigger
|
||||
cy.contains("Trigger").click()
|
||||
cy.contains("Row Created").click()
|
||||
cy.get(".setup").within(() => {
|
||||
cy.get(".spectrum-Picker-label").click()
|
||||
cy.contains("dog").click()
|
||||
})
|
||||
// Setup trigger
|
||||
cy.contains("Setup").click()
|
||||
cy.get(".spectrum-Picker-label").click()
|
||||
cy.wait(500)
|
||||
cy.contains("dog").click()
|
||||
|
||||
// Create action
|
||||
cy.contains("Internal").click()
|
||||
cy.contains("Create Row").click()
|
||||
cy.get(".setup").within(() => {
|
||||
cy.contains("Add Action").click()
|
||||
cy.get(".modal-inner-wrapper").within(() => {
|
||||
cy.wait(1000)
|
||||
cy.contains("Create Row").trigger('mouseover').click().click()
|
||||
cy.get(".spectrum-Button--cta").click()
|
||||
})
|
||||
cy.contains("Setup").click()
|
||||
cy.get(".spectrum-Picker-label").click()
|
||||
cy.contains("dog").click()
|
||||
cy.get(".spectrum-Textfield-input")
|
||||
.first()
|
||||
.type("goodboy")
|
||||
cy.get(".spectrum-Textfield-input")
|
||||
.eq(1)
|
||||
.type("11")
|
||||
|
||||
cy.contains("Run test").click()
|
||||
cy.get(".modal-inner-wrapper").within(() => {
|
||||
cy.wait(1000)
|
||||
cy.get(".spectrum-Picker-label").click()
|
||||
cy.contains("dog").click()
|
||||
cy.get(".spectrum-Textfield-input")
|
||||
|
@ -35,19 +51,12 @@ context("Create a automation", () => {
|
|||
cy.get(".spectrum-Textfield-input")
|
||||
.eq(1)
|
||||
.type("11")
|
||||
cy.get(".spectrum-Textfield-input")
|
||||
.eq(2)
|
||||
.type("123456")
|
||||
cy.get(".spectrum-Textfield-input")
|
||||
.eq(3)
|
||||
.type("123456")
|
||||
})
|
||||
|
||||
// Save
|
||||
cy.contains("Save Automation").click()
|
||||
|
||||
// Activate Automation
|
||||
cy.get("[data-cy=activate-automation]").click()
|
||||
})
|
||||
|
||||
it("should add row when a new row is added", () => {
|
||||
cy.contains("Data").click()
|
||||
cy.addRow(["Rover", 15])
|
||||
cy.reload()
|
||||
cy.contains("goodboy").should("have.text", "goodboy")
|
||||
})
|
||||
})
|
||||
|
|
|
@ -93,7 +93,11 @@
|
|||
</svg>
|
||||
{/if}
|
||||
<div class="iconAlign">
|
||||
<Body size="XS">When this happens:</Body>
|
||||
{#if isTrigger}
|
||||
<Body size="XS">When this happens:</Body>
|
||||
{:else}
|
||||
<Body size="XS">Do this:</Body>
|
||||
{/if}
|
||||
|
||||
<Detail size="S">{block?.name?.toUpperCase() || ""}</Detail>
|
||||
</div>
|
||||
|
|
|
@ -18,13 +18,12 @@
|
|||
// get the outputs so we can define the fields
|
||||
|
||||
// check to see if there is existing test data in the store
|
||||
$: testData = $automationStore.selectedAutomation.automation.testData
|
||||
let testData = $automationStore.selectedAutomation.automation.testData
|
||||
|
||||
// Checj the schema to see if required fields have been entered
|
||||
// Check the schema to see if required fields have been entered
|
||||
$: isError = !trigger.schema.outputs.required.every(
|
||||
required => testData[required]
|
||||
)
|
||||
|
||||
function parseTestJSON(e) {
|
||||
try {
|
||||
const obj = JSON.parse(e.detail)
|
||||
|
|
Loading…
Reference in New Issue