fix(learn): split and simplified learn map (#39154)
This commit is contained in:
committed by
Mrugesh Mohapatra
parent
48c97238fc
commit
ac3d762bb5
@ -41,7 +41,7 @@ describe('Learn Landing page (not logged in)', () => {
|
||||
it('Should render a curriculum map', () => {
|
||||
cy.document().then(document => {
|
||||
const superBlocks = document.querySelectorAll(
|
||||
`${selectors.challengeMap} > ul > li`
|
||||
`${selectors.challengeMap} > li > a`
|
||||
);
|
||||
expect(superBlocks).to.have.length(11);
|
||||
|
||||
@ -77,44 +77,9 @@ describe('Superblocks and Blocks', () => {
|
||||
cy.contains("Get started (it's free)").click();
|
||||
});
|
||||
|
||||
it('Has first superblock and block collapsed by default', () => {
|
||||
cy.contains(superBlockNames[0])
|
||||
.should('be.visible')
|
||||
.and('have.attr', 'aria-expanded', 'true');
|
||||
|
||||
cy.contains('Basic HTML and HTML5')
|
||||
.should('be.visible')
|
||||
.and('have.attr', 'aria-expanded', 'true');
|
||||
});
|
||||
|
||||
it('Has all supeblocks visible but folded (excluding the first one)', () => {
|
||||
it('Has all supeblocks visible', () => {
|
||||
cy.wrap(superBlockNames.slice(1)).each(name => {
|
||||
cy.contains(name)
|
||||
.should('be.visible')
|
||||
.and('have.attr', 'aria-expanded', 'false');
|
||||
cy.contains(name).should('be.visible');
|
||||
});
|
||||
});
|
||||
it('Superblocks should be collapsable and foldable', () => {
|
||||
cy.contains(superBlockNames[0])
|
||||
.click()
|
||||
.should('have.attr', 'aria-expanded', 'false');
|
||||
cy.contains('Basic HTML and HTML5').should('not.exist');
|
||||
|
||||
cy.contains(superBlockNames[0])
|
||||
.click()
|
||||
.should('have.attr', 'aria-expanded', 'true');
|
||||
cy.contains('Basic HTML and HTML5').should('be.visible');
|
||||
});
|
||||
|
||||
it('Blocks should be collapsable and foldable', () => {
|
||||
cy.contains('Basic HTML and HTML5')
|
||||
.click()
|
||||
.should('have.attr', 'aria-expanded', 'false');
|
||||
cy.contains('Introduction to Basic HTML and HTML5').should('not.exist');
|
||||
|
||||
cy.contains('Basic HTML and HTML5')
|
||||
.click()
|
||||
.should('have.attr', 'aria-expanded', 'true');
|
||||
cy.contains('Introduction to Basic HTML and HTML5').should('be.visible');
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user