Reinstate all react tests

This commit is contained in:
Tom Coleman 2022-07-19 16:48:40 +10:00
parent 8985d42448
commit 2740d17e1d

View File

@ -8,28 +8,22 @@ describe('addon-docs', () => {
skipOn('vue3', () => { skipOn('vue3', () => {
skipOn('html', () => { skipOn('html', () => {
skipOn('react', () => { it('should provide source snippet', () => {
skipOn('cra', () => { cy.getDocsElement()
skipOn('react_legacy_root_api', () => { .find('.docblock-code-toggle')
it('should provide source snippet', () => { .each(($div) => {
cy.getDocsElement() cy.wrap($div)
.find('.docblock-code-toggle') .should('contain.text', 'Show code')
.each(($div) => { // use force click so cypress does not automatically scroll, making the source block visible on this step
cy.wrap($div) .click({ force: true });
.should('contain.text', 'Show code') });
// use force click so cypress does not automatically scroll, making the source block visible on this step
.click({ force: true }); cy.getDocsElement()
}); .find('pre.prismjs')
.each(($div) => {
cy.getDocsElement() const text = $div.text();
.find('pre.prismjs') expect(text).not.match(/^\(args\) => /);
.each(($div) => {
const text = $div.text();
expect(text).not.match(/^\(args\) => /);
});
});
}); });
});
}); });
}); });
}); });