feat: add progress bar to lower jaw (#50167)

Co-authored-by: IsmailTlemcani <ismail.tlemcani@gmail.com>
Co-authored-by: ahmad abdolsaheb <ahmad.abdolsaheb@gmail.com>
This commit is contained in:
Sem Bauke
2023-06-06 14:59:40 +03:00
committed by GitHub
co-authored by IsmailTlemcani ahmad abdolsaheb
parent 30419c2e20
commit d18414fa2d
3 changed files with 103 additions and 16 deletions
@@ -5,7 +5,7 @@ describe('progress bar', () => {
});
it(
'Should show the progress bar showing the completed percent',
'Should show the progress bar showing the completed percent on legacy challenges',
{ browser: 'electron' },
() => {
cy.visit(
@@ -22,4 +22,64 @@ describe('progress bar', () => {
cy.get('.progress-bar-container').contains('1% complete');
}
);
it(
'Should show the progress bar showing the completed percent on modern challenges',
{ browser: 'electron' },
() => {
cy.visit(
'/learn/2022/responsive-web-design/learn-html-by-building-a-cat-photo-app/step-2'
);
cy.get(`${'.react-monaco-editor-container'} textarea`, { timeout: 16000 })
.click()
.focused()
.type('{ctrl}a')
.clear()
.type(`<h1>CatPhotoApp</h1>\n<h2>Cat Photos</h2>`);
cy.contains('Check Your Code (Ctrl + Enter)').click({ force: true });
cy.contains('Submit and go to next challenge');
cy.get('.progress-bar-container').contains('1% complete');
}
);
it(
'Should show the progress bar showing the completed percent on modern challenges',
{ browser: 'electron' },
() => {
cy.visit(
'/learn/2022/responsive-web-design/learn-html-by-building-a-cat-photo-app/step-3'
);
cy.get(`${'.react-monaco-editor-container'} textarea`, { timeout: 16000 })
.click()
.focused()
.type('{ctrl}a')
.clear()
.type(
`<h2>Cat Photos</h2>\n<p>See more cat photos in our gallery.</p>`
);
cy.contains('Check Your Code (Ctrl + Enter)').click({ force: true });
cy.contains('Submit and go to next challenge');
cy.get('.progress-bar-container').contains('1% complete');
}
);
it(
'Should show the progress bar showing the completed percent on modern challenges',
{ browser: 'electron' },
() => {
cy.visit(
'/learn/2022/responsive-web-design/learn-html-by-building-a-cat-photo-app/step-4'
);
cy.get(`${'.react-monaco-editor-container'} textarea`, { timeout: 16000 })
.click()
.focused()
.type('{ctrl}a')
.clear()
.type(
`<!-- TODO: Add link to cat photos -->\n<p>See more cat photos in our gallery.</p>`
);
cy.contains('Check Your Code (Ctrl + Enter)').click({ force: true });
cy.contains('Submit and go to next challenge');
cy.get('.progress-bar-container').contains('3% complete');
}
);
});