Cypress, Mocha ve Chai gibi çeşitli kütüphanelerden elde edilen birden fazla assertion türüne sahiptir.
Implicit Assertions
describe('Assertion Lesson',function () {it('Scenario 1',function (){// test step to launch a URLcy.visit("https://www.iddaa.com")// assertion to validate count of sub-elements and class attribute valuecy.get('.toc chapters').find('li').should('have.length',5).and('have.class','dropdown') });});
Explicit Assertions
describe('Tutorialspoint',function () {// it function to identify testit('Scenario 1',function (){// test step to launch a URLcy.visit("https://accounts.google.com")// identify elementcy.get('h1#headingText').find('span').then(function(e){constt=e.text()// assertion expectexpect(t).to.contains('Sign') }) })})