Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CHORE, TESTING] Test code can run form the front-end in all languages #3822

Merged
merged 16 commits into from
Mar 23, 2023
Merged
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 7 additions & 13 deletions tests/cypress/e2e/hedy_page/editor_box.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,12 @@ import {goToHedyPage} from "../tools/navigation/nav";
describe('Is able to type in the editor box', () => {
it('Passes', () => {
goToHedyPage();

cy.get('#editor > .ace_scroller > .ace_content').type('\nask What is your name\necho hello');
cy.get('#editor > .ace_scroller > .ace_content .ace_line').each((element, index) => {
if(index == 0) {
cy.get(element).should('have.text', 'print hello world!');
}
if(index == 1) {
cy.get(element).should('have.text', 'ask What is your name');
}
if(index == 2) {
cy.get(element).should('have.text', 'echo hello');
}
})
// click on textaread to get focus
Felienne marked this conversation as resolved.
Show resolved Hide resolved
Felienne marked this conversation as resolved.
Show resolved Hide resolved
cy.get('#editor > .ace_scroller > .ace_content').click();
// empty textarea
cy.focused().clear()
cy.get('#editor').type('ask What is your name?\necho hello');
cy.get('#editor > .ace_scroller > .ace_content').should('contain.text', 'ask What is your name?');
cy.get('#editor > .ace_scroller > .ace_content').should('contain.text', 'echo hello');
})
})