1
0
Fork 0
mirror of synced 2024-07-20 21:55:54 +12:00
budibase/packages/builder/cypress/integration/createModel.spec.js

23 lines
578 B
JavaScript
Raw Normal View History

2020-06-11 23:20:13 +12:00
context('Create a Model', () => {
2020-06-10 01:40:14 +12:00
before(() => {
2020-06-10 01:40:14 +12:00
cy.visit('localhost:4001/_builder')
// https://on.cypress.io/type
cy.createApp('Model App', 'Model App Description')
2020-06-10 01:40:14 +12:00
})
// https://on.cypress.io/interacting-with-elements
it('should create a new model', () => {
cy.createModel('dog', 'name', 'age')
2020-06-10 01:40:14 +12:00
// Check if model exists
2020-06-10 01:40:14 +12:00
cy.get('.title').should('have.text', 'dog')
})
it('should add a record', () => {
cy.addRecord('bob', '15')
2020-06-10 01:40:14 +12:00
cy.contains('bob').should('have.text', 'bob')
})
})