Changeset View
Changeset View
Standalone View
Standalone View
cypress/utils/index.js
Show All 28 Lines | const time = { | ||||
monthName: date.toLocaleString('en', { month: 'long' }), | monthName: date.toLocaleString('en', { month: 'long' }), | ||||
year: date.getUTCFullYear(), | year: date.getUTCFullYear(), | ||||
hours: pad(date.getUTCHours()), | hours: pad(date.getUTCHours()), | ||||
minutes: pad(date.getUTCMinutes()) | minutes: pad(date.getUTCMinutes()) | ||||
}; | }; | ||||
return time; | return time; | ||||
} | } | ||||
export function checkLanguageHighlighting(language) { | |||||
cy.get('code') | |||||
.should('be.visible') | |||||
.and('have.class', 'hljs') | |||||
.and('have.class', language) | |||||
.and('not.be.empty') | |||||
.find('table.hljs-ln') | |||||
.should('be.visible') | |||||
.and('not.be.empty'); | |||||
} |