* cypress test setup * running cypress in CI * fixing tests after first time setup wizard * bb api key * API Key in right place * adding env in cypress.json * env var in setup * lint * API key not working * fill in API key form if present * allow more time for creation * cypress server for debug * video recording, better debugging * Adding debug logs * set node env * cypress env * cancel irrelevant test
44 lines
No EOL
1.3 KiB
JavaScript
44 lines
No EOL
1.3 KiB
JavaScript
xcontext('Create a workflow', () => {
|
|
|
|
before(() => {
|
|
cy.server()
|
|
cy.visit('localhost:4001/_builder')
|
|
|
|
cy.createApp('Workflow Test App', 'This app is used to test that workflows do in fact work!')
|
|
})
|
|
|
|
// https://on.cypress.io/interacting-with-elements
|
|
it('should create a workflow', () => {
|
|
cy.createModel('dog', 'name', 'age')
|
|
|
|
cy.contains('workflow').click()
|
|
cy.contains('Create New Workflow').click()
|
|
cy.get('input').type('Add Record')
|
|
cy.contains('Save').click()
|
|
|
|
// Add trigger
|
|
cy.get('[data-cy=add-workflow-component]').click()
|
|
cy.get('[data-cy=RECORD_SAVED]').click()
|
|
cy.get('.budibase__input').select('dog')
|
|
|
|
// Create action
|
|
cy.get('[data-cy=SAVE_RECORD]').click()
|
|
cy.get(':nth-child(2) > .budibase__input').type('goodboy')
|
|
cy.get(':nth-child(3) > .budibase__input').type('11')
|
|
|
|
// Save
|
|
cy.contains('Save Workflow').click()
|
|
|
|
// Activate Workflow
|
|
cy.get('[data-cy=activate-workflow]').click()
|
|
|
|
})
|
|
xit('should add record when a new record is added', () => {
|
|
cy.contains('backend').click()
|
|
|
|
cy.addRecord('bob', '15')
|
|
|
|
cy.contains('goodboy').should('have.text', 'goodboy')
|
|
|
|
})
|
|
}) |