fix(client): prevent load from local storage (#44440)

This commit is contained in:
Oliver Eyton-Williams
2021-12-09 16:08:03 +01:00
committed by GitHub
parent bf2b4caf12
commit fca626fc5e
2 changed files with 17 additions and 14 deletions

View File

@ -19,17 +19,18 @@ describe('Challenge with editor', function () {
cy.get('@editor', { timeout: 10000 }).contains(editorContents);
});
it('renders code from localStorage after "Ctrl + S"', () => {
const editorContents = `<h1>Hello</h1>`;
cy.get(selectors.editor).as('editor').contains(editorContents);
cy.get('@editor')
.click()
.focused()
.type(`{movetoend}<h1>Hello World</h1>{ctrl+s}`);
cy.contains("Saved! Your code was saved to your browser's local storage.");
cy.reload();
cy.get('@editor', { timeout: 10000 }).contains(
'<h1>Hello</h1><h1>Hello World</h1>'
);
});
// DISABLED until we update the local storage UI
// it('renders code from localStorage after "Ctrl + S"', () => {
// const editorContents = `<h1>Hello</h1>`;
// cy.get(selectors.editor).as('editor').contains(editorContents);
// cy.get('@editor')
// .click()
// .focused()
// .type(`{movetoend}<h1>Hello World</h1>{ctrl+s}`);
// cy.contains("Saved! Your code was saved to your browser's local storage.");
// cy.reload();
// cy.get('@editor', { timeout: 10000 }).contains(
// '<h1>Hello</h1><h1>Hello World</h1>'
// );
// });
});