window.spec.js 602 B

12345678910111213141516171819202122
  1. /// <reference types="cypress" />
  2. context('Window', () => {
  3. beforeEach(() => {
  4. cy.visit('https://example.cypress.io/commands/window')
  5. })
  6. it('cy.window() - get the global window object', () => {
  7. // https://on.cypress.io/window
  8. cy.window().should('have.property', 'top')
  9. })
  10. it('cy.document() - get the document object', () => {
  11. // https://on.cypress.io/document
  12. cy.document().should('have.property', 'charset').and('eq', 'UTF-8')
  13. })
  14. it('cy.title() - get the title', () => {
  15. // https://on.cypress.io/title
  16. cy.title().should('include', 'Kitchen Sink')
  17. })
  18. })