mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-02-25 14:01:29 -05:00
* feat: add stripe donate page test for non donors * fix: revert changes to see if ev is passed correctly * feat: download artifacts * fix: add quotations for spec args with global patterns * fix: remove firefox from cypress donation tests * fix: trigger action on main push * Apply suggestions from code review Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com> * feat: remove matrix and simplify Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
30 lines
741 B
JavaScript
30 lines
741 B
JavaScript
const selectors = {
|
|
editor: '.monaco-editor'
|
|
};
|
|
|
|
describe('Editor Shortcuts', () => {
|
|
it('Should handle Alt+Enter', () => {
|
|
cy.visit(
|
|
'learn/responsive-web-design/basic-html-and-html5/say-hello-to-html-elements'
|
|
);
|
|
cy.get(selectors.editor, { timeout: 15000 })
|
|
.first()
|
|
.click()
|
|
.focused()
|
|
.type('{alt}{enter}')
|
|
.should('have.value', '<h1>Hello</h1>\n');
|
|
});
|
|
|
|
it('Should ignore Ctrl+Enter', () => {
|
|
cy.visit(
|
|
'learn/responsive-web-design/basic-html-and-html5/say-hello-to-html-elements'
|
|
);
|
|
cy.get(selectors.editor, { timeout: 15000 })
|
|
.first()
|
|
.click()
|
|
.focused()
|
|
.type('{ctrl}{enter}')
|
|
.should('have.value', '<h1>Hello</h1>');
|
|
});
|
|
});
|