feat(tools): test sass preview (#45167)

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
pull/45238/head
Naomi Carrigan 2022-02-24 05:24:07 -08:00 committed by GitHub
parent df785c2085
commit 3f22ab9d5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,28 @@
const location =
'/learn/front-end-development-libraries/sass/' +
'use-for-to-create-a-sass-loop';
const getIframeBody = () => {
return cy
.get('.challenge-preview iframe')
.its('0.contentDocument')
.should('exist')
.its('body')
.should('not.be.undefined')
.then(cy.wrap);
};
describe('Sass Challenge', () => {
before(() => {
cy.visit(location);
cy.wait(5000);
});
it('should render the sass preview', () => {
getIframeBody().find('.text-1');
getIframeBody().find('.text-2');
getIframeBody().find('.text-3');
getIframeBody().find('.text-4');
getIframeBody().find('.text-5');
});
});