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