Advertisement
Guest User

Untitled

a guest
Jan 15th, 2019
402
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* eslint-env mocha */
  2. /* global cy */
  3. describe('Date component sample', () => {
  4.   before(() => {
  5.     cy.visit('https://github-ylq5q4.stackblitz.io');
  6.   });
  7.   context('Calendar', () => {
  8.     it('Auto closes the calendar', () => {
  9.       const day = 5;
  10.       cy.get('[data-context="container"]', { timeout: 20000 }).within(() => {
  11.         cy.get('input').click();
  12.       });
  13.  
  14.       cy.get('.owl-dt-popup').within(() => {
  15.         cy.get('.owl-dt-calendar-cell-content')
  16.           .contains(new RegExp(`^\\b${day}\\b$`))
  17.           .click({ force: true });
  18.         cy.wait(2000);
  19.       });
  20.       cy.get('.owl-dt-popup').should('.not.exist');
  21.     });
  22.   });
  23. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement