test(e2e): re-enable output tests (#41897)
This time visiting the page in the 'before' stage, which seems to help with the ChunkLoadErrorpull/41942/head
parent
0296abbea6
commit
ebe8f99345
|
@ -18,55 +18,47 @@ const defaultOutput = `
|
|||
* Your test output will go here
|
||||
*/`;
|
||||
|
||||
// Disabled for https://github.com/freeCodeCamp/freeCodeCamp/issues/41009
|
||||
|
||||
// const runningOutput = '// running tests';
|
||||
// const finishedOutput = '// tests completed';
|
||||
const runningOutput = '// running tests';
|
||||
const finishedOutput = '// tests completed';
|
||||
|
||||
describe('Classic challenge', function () {
|
||||
it('renders', () => {
|
||||
before(() => {
|
||||
cy.visit(locations.index);
|
||||
});
|
||||
|
||||
it('renders the default output text', () => {
|
||||
cy.title().should(
|
||||
'eq',
|
||||
'Learn Basic HTML and HTML5: Say Hello to HTML Elements |' +
|
||||
' freeCodeCamp.org'
|
||||
);
|
||||
});
|
||||
|
||||
it('renders the default output text', () => {
|
||||
cy.visit(locations.index);
|
||||
cy.get(selectors.defaultOutput).contains(defaultOutput);
|
||||
});
|
||||
|
||||
// Disabled for https://github.com/freeCodeCamp/freeCodeCamp/issues/41009
|
||||
it('shows test output when the tests are run', () => {
|
||||
// first wait for the editor to load
|
||||
cy.get(selectors.editor, { timeout: 15000 });
|
||||
cy.get(selectors.runTestsButton)
|
||||
.click()
|
||||
.then(() => {
|
||||
cy.get(selectors.defaultOutput)
|
||||
.contains(runningOutput)
|
||||
.contains(finishedOutput);
|
||||
});
|
||||
});
|
||||
|
||||
// it('shows test output when the tests are run', () => {
|
||||
// cy.visit(locations.index);
|
||||
// // first wait for the editor to load
|
||||
// cy.get(selectors.editor, { timeout: 15000 });
|
||||
// cy.get(selectors.runTestsButton)
|
||||
// .click()
|
||||
// .then(() => {
|
||||
// cy.get(selectors.defaultOutput)
|
||||
// .contains(runningOutput)
|
||||
// .contains(finishedOutput);
|
||||
// });
|
||||
// });
|
||||
|
||||
// it('shows test output when the tests are triggered by the keyboard', () => {
|
||||
// cy.visit(locations.index);
|
||||
// // first wait for the editor to load
|
||||
// cy.get(selectors.editor, {
|
||||
// timeout: 15000
|
||||
// });
|
||||
// cy.get(selectors.hotkeys)
|
||||
// .focus()
|
||||
// .type('{ctrl}{enter}')
|
||||
// .then(() => {
|
||||
// cy.get(selectors.defaultOutput)
|
||||
// .contains(runningOutput)
|
||||
// .contains(finishedOutput);
|
||||
// });
|
||||
// });
|
||||
it('shows test output when the tests are triggered by the keyboard', () => {
|
||||
// first wait for the editor to load
|
||||
cy.get(selectors.editor, {
|
||||
timeout: 15000
|
||||
});
|
||||
cy.get(selectors.hotkeys)
|
||||
.focus()
|
||||
.type('{ctrl}{enter}')
|
||||
.then(() => {
|
||||
cy.get(selectors.defaultOutput)
|
||||
.contains(runningOutput)
|
||||
.contains(finishedOutput);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue