fix(client): prevent load from local storage (#44440)
This commit is contained in:
committed by
GitHub
parent
bf2b4caf12
commit
fca626fc5e
@ -121,6 +121,8 @@ function saveCodeEpic(action$, state$) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Ignored temporarily while we update the code storage UI
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
function loadCodeEpic(action$, state$) {
|
function loadCodeEpic(action$, state$) {
|
||||||
return action$.pipe(
|
return action$.pipe(
|
||||||
ofType(actionTypes.challengeMounted),
|
ofType(actionTypes.challengeMounted),
|
||||||
@ -173,4 +175,4 @@ function loadCodeEpic(action$, state$) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default combineEpics(saveCodeEpic, loadCodeEpic, clearCodeEpic);
|
export default combineEpics(saveCodeEpic, clearCodeEpic);
|
||||||
|
@ -19,17 +19,18 @@ describe('Challenge with editor', function () {
|
|||||||
cy.get('@editor', { timeout: 10000 }).contains(editorContents);
|
cy.get('@editor', { timeout: 10000 }).contains(editorContents);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('renders code from localStorage after "Ctrl + S"', () => {
|
// DISABLED until we update the local storage UI
|
||||||
const editorContents = `<h1>Hello</h1>`;
|
// it('renders code from localStorage after "Ctrl + S"', () => {
|
||||||
cy.get(selectors.editor).as('editor').contains(editorContents);
|
// const editorContents = `<h1>Hello</h1>`;
|
||||||
cy.get('@editor')
|
// cy.get(selectors.editor).as('editor').contains(editorContents);
|
||||||
.click()
|
// cy.get('@editor')
|
||||||
.focused()
|
// .click()
|
||||||
.type(`{movetoend}<h1>Hello World</h1>{ctrl+s}`);
|
// .focused()
|
||||||
cy.contains("Saved! Your code was saved to your browser's local storage.");
|
// .type(`{movetoend}<h1>Hello World</h1>{ctrl+s}`);
|
||||||
cy.reload();
|
// cy.contains("Saved! Your code was saved to your browser's local storage.");
|
||||||
cy.get('@editor', { timeout: 10000 }).contains(
|
// cy.reload();
|
||||||
'<h1>Hello</h1><h1>Hello World</h1>'
|
// cy.get('@editor', { timeout: 10000 }).contains(
|
||||||
);
|
// '<h1>Hello</h1><h1>Hello World</h1>'
|
||||||
});
|
// );
|
||||||
|
// });
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user