Skip to content

Commit

Permalink
ajaxTest
Browse files Browse the repository at this point in the history
  • Loading branch information
PeaceGusenga committed May 1, 2023
1 parent 8b6c170 commit 0b92e37
Showing 1 changed file with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/// <reference types="Cypress" />

import { IndexPage } from "../Pages/index_page"

var landingpage = new IndexPage ()

describe('Test to wait for an element to show up', () => {


it('should click a button, wait 15 seconds for ajax data', () => {
// Visit the page that contains the button
cy.visit('http://www.uitestingplayground.com/')
landingpage.clickAjaxData_Page()

// Find and click the button
cy.get('#ajaxButton').click();

// Wait for 15 seconds
cy.wait(15000);
})
it('verify new content loaded', () =>{
// Verify that new content has been loaded on the site
cy.get('#new-content').should('be.visible');
})
});

0 comments on commit 0b92e37

Please sign in to comment.