budibase/packages/builder/cypress/integration/createTable.spec.js

43 lines
999 B
JavaScript
Raw Normal View History

2020-08-07 19:31:40 +02:00
xcontext('Create a Table', () => {
before(() => {
cy.visit('localhost:4001/_builder')
// https://on.cypress.io/type
cy.createApp('Table App', 'Table App Description')
})
// https://on.cypress.io/interacting-with-elements
it('should create a new Table', () => {
cy.createTable('dog', 'name', 'age')
// Check if Table exists
cy.get('.title').should('have.text', 'dog')
})
it('adds a new column to the table', () => {
cy.addRecord('bob', '15')
cy.contains('bob').should('have.text', 'bob')
})
it('updates a column on the table', () => {
cy.addRecord('bob', '15')
cy.contains('bob').should('have.text', 'bob')
})
it('edits a record', () => {
cy.addRecord('bob', '15')
cy.contains('bob').should('have.text', 'bob')
})
it('deletes a record', () => {
cy.addRecord('bob', '15')
cy.contains('bob').should('have.text', 'bob')
})
})