Changeset View
Changeset View
Standalone View
Standalone View
cypress/utils/index.js
Show All 39 Lines | cy.get('code') | ||||
.should('be.visible') | .should('be.visible') | ||||
.and('have.class', 'hljs') | .and('have.class', 'hljs') | ||||
.and('have.class', language) | .and('have.class', language) | ||||
.and('not.be.empty') | .and('not.be.empty') | ||||
.find('table.hljs-ln') | .find('table.hljs-ln') | ||||
.should('be.visible') | .should('be.visible') | ||||
.and('not.be.empty'); | .and('not.be.empty'); | ||||
} | } | ||||
export function random(start, end) { | |||||
const range = end - start; | |||||
return Math.floor(Math.random() * range) + start; | |||||
} |