2022-01-21 13:43:27 +01:00
|
|
|
import filterTests from "../support/filterTests"
|
2022-06-02 14:03:47 +02:00
|
|
|
const interact = require('../support/interact')
|
2020-09-14 14:29:32 +02:00
|
|
|
|
2022-01-21 13:43:27 +01:00
|
|
|
filterTests(['smoke', 'all'], () => {
|
2022-02-17 15:06:17 +01:00
|
|
|
context("Create a automation", () => {
|
2022-01-21 13:43:27 +01:00
|
|
|
before(() => {
|
|
|
|
cy.login()
|
|
|
|
cy.createTestApp()
|
2020-10-05 12:13:09 +02:00
|
|
|
})
|
2020-09-14 14:29:32 +02:00
|
|
|
|
2022-01-21 13:43:27 +01:00
|
|
|
it("should create a automation", () => {
|
|
|
|
cy.createTestTableWithData()
|
|
|
|
cy.wait(2000)
|
|
|
|
cy.contains("Automate").click()
|
2022-06-02 14:03:47 +02:00
|
|
|
cy.get(interact.ADD_BUTTON_SPECTRUM).click()
|
|
|
|
cy.get(interact.MODAL_INNER_WRAPPER).within(() => {
|
2022-01-21 13:43:27 +01:00
|
|
|
cy.get("input").type("Add Row")
|
|
|
|
cy.contains("Row Created").click({ force: true })
|
2022-06-17 18:41:07 +02:00
|
|
|
cy.get(interact.SPECTRUM_BUTTON_CTA, { timeout: 500 }).click()
|
2022-01-21 13:43:27 +01:00
|
|
|
})
|
2021-09-15 17:55:17 +02:00
|
|
|
|
2022-01-21 13:43:27 +01:00
|
|
|
// Setup trigger
|
2022-06-02 14:03:47 +02:00
|
|
|
cy.get(interact.SPECTRUM_PICKER_LABEL).click()
|
2022-01-21 13:43:27 +01:00
|
|
|
cy.wait(500)
|
|
|
|
cy.contains("dog").click()
|
|
|
|
// Create action
|
2022-06-17 18:41:07 +02:00
|
|
|
cy.get('[aria-label="AddCircle"]', { timeout: 2000 }).eq(1).click()
|
2022-06-02 14:03:47 +02:00
|
|
|
cy.get(interact.MODAL_INNER_WRAPPER).within(() => {
|
2022-01-21 13:43:27 +01:00
|
|
|
cy.wait(1000)
|
|
|
|
cy.contains("Create Row").trigger('mouseover').click().click()
|
2022-06-02 14:03:47 +02:00
|
|
|
cy.get(interact.SPECTRUM_BUTTON_CTA).click()
|
2022-01-21 13:43:27 +01:00
|
|
|
})
|
2022-06-02 14:03:47 +02:00
|
|
|
cy.get(interact.SPECTRUM_PICKER_LABEL).eq(1).click()
|
2021-05-25 16:57:38 +02:00
|
|
|
cy.contains("dog").click()
|
2022-06-02 14:03:47 +02:00
|
|
|
cy.get(interact.SPECTRUM_TEXTFIELD_INPUT)
|
2022-04-12 10:15:40 +02:00
|
|
|
.first()
|
|
|
|
.type("{{ trigger.row.name }}", { parseSpecialCharSequences: false })
|
2022-06-02 14:03:47 +02:00
|
|
|
cy.get(interact.SPECTRUM_TEXTFIELD_INPUT)
|
2021-02-23 15:28:05 +01:00
|
|
|
.eq(1)
|
|
|
|
.type("11")
|
2022-01-21 13:43:27 +01:00
|
|
|
cy.contains("Finish and test automation").click()
|
|
|
|
|
2022-06-02 14:03:47 +02:00
|
|
|
cy.get(interact.MODAL_INNER_WRAPPER).within(() => {
|
2022-06-17 18:41:07 +02:00
|
|
|
cy.get(interact.SPECTRUM_PICKER_LABEL, { timeout: 1000 }).click()
|
2022-01-21 13:43:27 +01:00
|
|
|
cy.contains("dog").click()
|
2022-06-17 18:41:07 +02:00
|
|
|
cy.get(interact.SPECTRUM_TEXTFIELD_INPUT, { timeout: 1000 })
|
2022-01-21 13:43:27 +01:00
|
|
|
.first()
|
|
|
|
.type("automationGoodboy")
|
2022-06-02 14:03:47 +02:00
|
|
|
cy.get(interact.SPECTRUM_TEXTFIELD_INPUT)
|
2022-01-21 13:43:27 +01:00
|
|
|
.eq(1)
|
|
|
|
.type("11")
|
2022-06-02 14:03:47 +02:00
|
|
|
cy.get(interact.SPECTRUM_TEXTFIELD_INPUT)
|
2022-01-21 13:43:27 +01:00
|
|
|
.eq(2)
|
|
|
|
.type("123456")
|
2022-06-02 14:03:47 +02:00
|
|
|
cy.get(interact.SPECTRUM_TEXTFIELD_INPUT)
|
2022-01-21 13:43:27 +01:00
|
|
|
.eq(3)
|
|
|
|
.type("123456")
|
|
|
|
cy.contains("Test").click()
|
|
|
|
})
|
|
|
|
cy.contains("Data").click()
|
|
|
|
cy.contains("automationGoodboy")
|
2020-09-18 17:13:42 +02:00
|
|
|
})
|
2020-09-14 14:29:32 +02:00
|
|
|
})
|
|
|
|
})
|