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