fix: use position: fixed to avoid forcing Cypress (#39605)

This commit is contained in:
Oliver Eyton-Williams
2020-09-23 17:15:21 +02:00
committed by GitHub
parent 2f4d1c2804
commit 4f0959df1d
4 changed files with 11 additions and 15 deletions

View File

@ -52,7 +52,7 @@ describe('Learn Landing page (not logged in)', () => {
describe('Quotes', () => {
beforeEach(() => {
cy.visit('/');
cy.contains("Get started (it's free)").click({ force: true });
cy.contains("Get started (it's free)").click();
});
it('Should show a quote', () => {
@ -71,7 +71,7 @@ describe('Quotes', () => {
describe('Superblocks and Blocks', () => {
beforeEach(() => {
cy.visit('/');
cy.contains("Get started (it's free)").click({ force: true });
cy.contains("Get started (it's free)").click();
});
it('Has first superblock and block collapsed by default', () => {
@ -93,30 +93,26 @@ describe('Superblocks and Blocks', () => {
});
it('Superblocks should be collapsable and foldable', () => {
cy.contains(superBlockNames[0])
.click({
force: true
})
.click()
.should('have.attr', 'aria-expanded', 'false');
cy.contains('Basic HTML and HTML5').should('not.be.visible');
cy.contains(superBlockNames[0])
.click({
force: true
})
.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({ force: true })
.click()
.should('have.attr', 'aria-expanded', 'false');
cy.contains('Introduction to Basic HTML and HTML5').should(
'not.be.visible'
);
cy.contains('Basic HTML and HTML5')
.click({ force: true })
.click()
.should('have.attr', 'aria-expanded', 'true');
cy.contains('Introduction to Basic HTML and HTML5').should('be.visible');
});