options.js 930 B

123456789101112131415161718192021222324252627
  1. module.exports = (theme = '') => {
  2. const baseUrl = require('./utils')(theme, 'options')
  3. describe('Welcome Test', () => {
  4. it('Test Custom AJAX', () => {
  5. cy.visit(`${baseUrl}table-ajax.html`)
  6. .get('.fixed-table-pagination >.pagination-detail').should('have.length', 1)
  7. .get('.fixed-table-pagination > .pagination').should('have.length', 1)
  8. .get('span.pagination-info').should('contain', '800')
  9. })
  10. it('Test AJAX Options', () => {
  11. cy.visit(`${baseUrl}ajax-options.html`)
  12. .intercept('GET', '**/json/data1.json').as('ajax')
  13. .wait('@ajax')
  14. .should(({ request }) => {
  15. expect(request.headers).to.have.property('custom-auth-token')
  16. .and.eq('custom-auth-token')
  17. })
  18. })
  19. it('Test Basic Columns', () => {
  20. cy.visit(`${baseUrl}basic-columns.html`)
  21. .get('.fixed-table-toolbar .columns').should('exist')
  22. })
  23. })
  24. }