1
0
Fork 0
mirror of synced 2024-07-06 23:10:57 +12:00
budibase/packages/builder/cypress/integration/createModel.spec.js

24 lines
632 B
JavaScript

context('Create a Model', () => {
before(() => {
Cypress.Cookies.preserveOnce('builder:token')
cy.visit('localhost:4001/_builder')
// https://on.cypress.io/type
cy.createApp('Model App', 'Model App Description')
})
// https://on.cypress.io/interacting-with-elements
it('should create a new model', () => {
cy.createModel('dog', 'name', 'age')
// Check if model exists
cy.get('.title').should('have.text', 'dog')
})
it('should add a record', () => {
cy.addRecord('bob', '15')
cy.contains('bob').should('have.text', 'bob')
})
})