2020-09-21 14:49:34 +02:00
|
|
|
context("Create a automation", () => {
|
2020-09-14 14:29:32 +02:00
|
|
|
before(() => {
|
2021-04-15 19:29:11 +02:00
|
|
|
cy.login()
|
2021-03-05 15:36:38 +01:00
|
|
|
cy.createTestApp()
|
2020-09-14 14:29:32 +02:00
|
|
|
})
|
|
|
|
|
2022-01-19 16:19:02 +01:00
|
|
|
// https://on.cypress.io/interacting-with-elements
|
2020-09-21 14:49:34 +02:00
|
|
|
it("should create a automation", () => {
|
2020-09-14 14:29:32 +02:00
|
|
|
cy.createTestTableWithData()
|
2021-09-15 17:55:17 +02:00
|
|
|
cy.wait(2000)
|
2021-05-25 16:57:38 +02:00
|
|
|
cy.contains("Automate").click()
|
|
|
|
cy.get("[data-cy='new-screen'] > .spectrum-Icon").click()
|
2021-09-15 17:55:17 +02:00
|
|
|
cy.get(".modal-inner-wrapper").within(() => {
|
2020-10-09 20:10:28 +02:00
|
|
|
cy.get("input").type("Add Row")
|
2021-11-26 11:42:37 +01:00
|
|
|
cy.contains("Row Created").click({ force: true })
|
2021-09-15 17:55:17 +02:00
|
|
|
cy.wait(500)
|
2021-05-25 16:57:38 +02:00
|
|
|
cy.get(".spectrum-Button--cta").click()
|
2020-10-05 12:13:09 +02:00
|
|
|
})
|
2020-09-14 14:29:32 +02:00
|
|
|
|
2021-09-15 17:55:17 +02:00
|
|
|
// Setup trigger
|
|
|
|
cy.contains("Setup").click()
|
|
|
|
cy.get(".spectrum-Picker-label").click()
|
|
|
|
cy.wait(500)
|
|
|
|
cy.contains("dog").click()
|
2021-11-22 10:43:57 +01:00
|
|
|
cy.wait(2000)
|
2020-09-14 14:29:32 +02:00
|
|
|
// Create action
|
2022-01-19 16:19:02 +01:00
|
|
|
cy.get(".block > .spectrum-Icon").click()
|
2021-09-15 17:55:17 +02:00
|
|
|
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()
|
2021-12-08 12:32:28 +01:00
|
|
|
.type("{{ trigger.row.name }}", { parseSpecialCharSequences: false })
|
2021-09-15 17:55:17 +02:00
|
|
|
cy.get(".spectrum-Textfield-input")
|
|
|
|
.eq(1)
|
|
|
|
.type("11")
|
2021-12-08 12:32:28 +01:00
|
|
|
cy.contains("Finish and test automation").click()
|
2021-09-15 17:55:17 +02:00
|
|
|
|
|
|
|
cy.get(".modal-inner-wrapper").within(() => {
|
|
|
|
cy.wait(1000)
|
2021-05-25 16:57:38 +02:00
|
|
|
cy.get(".spectrum-Picker-label").click()
|
|
|
|
cy.contains("dog").click()
|
2021-12-08 12:32:28 +01:00
|
|
|
cy.wait(1000)
|
2021-07-27 23:48:06 +02:00
|
|
|
cy.get(".spectrum-Textfield-input")
|
2021-02-23 15:28:05 +01:00
|
|
|
.first()
|
2021-12-08 12:32:28 +01:00
|
|
|
.type("automationGoodboy")
|
2021-07-27 23:48:06 +02:00
|
|
|
cy.get(".spectrum-Textfield-input")
|
2021-02-23 15:28:05 +01:00
|
|
|
.eq(1)
|
|
|
|
.type("11")
|
2021-09-15 17:55:17 +02:00
|
|
|
cy.get(".spectrum-Textfield-input")
|
|
|
|
.eq(2)
|
|
|
|
.type("123456")
|
|
|
|
cy.get(".spectrum-Textfield-input")
|
|
|
|
.eq(3)
|
|
|
|
.type("123456")
|
2021-12-08 12:32:28 +01:00
|
|
|
cy.contains("Test").click()
|
2020-09-18 17:13:42 +02:00
|
|
|
})
|
2021-12-08 12:32:28 +01:00
|
|
|
cy.contains("Data").click()
|
|
|
|
cy.contains("automationGoodboy")
|
2020-09-14 14:29:32 +02:00
|
|
|
})
|
|
|
|
})
|