mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(client): show check code button after reset (#50778)
This commit is contained in:
committed by
GitHub
parent
ea45dc84b7
commit
73249cf6e3
@@ -275,7 +275,8 @@ const LowerJaw = ({
|
||||
onClick={tryToExecuteChallenge}
|
||||
{...(challengeIsCompleted &&
|
||||
!focusManagementCompleted && { tabIndex: -1, className: 'sr-only' })}
|
||||
{...(focusManagementCompleted && { 'aria-hidden': true })}
|
||||
{...(challengeIsCompleted &&
|
||||
focusManagementCompleted && { 'aria-hidden': true })}
|
||||
ref={checkYourCodeButtonRef}
|
||||
>
|
||||
{checkButtonText}
|
||||
|
||||
@@ -70,6 +70,28 @@ describe('Challenge with multifile editor', () => {
|
||||
}
|
||||
);
|
||||
|
||||
it(
|
||||
'brings back the check button after reset',
|
||||
{ browser: '!firefox' },
|
||||
() => {
|
||||
cy.visit(location);
|
||||
cy.focused().click().type('{end}{enter}<meta charset="UTF-8" />');
|
||||
cy.get(selectors.checkLowerJawButton).should('not.be.focused');
|
||||
cy.get(selectors.checkLowerJawButton).click();
|
||||
// Ready to submit (submit button replaces check button)
|
||||
cy.get(selectors.submitLowerJawButton).should('be.visible');
|
||||
cy.get(selectors.checkLowerJawButton).should('not.be.visible');
|
||||
// Reset
|
||||
cy.get(selectors.resetCodeButton).click();
|
||||
cy.get('[data-cy=reset-modal-confirm').click();
|
||||
// First we need to click on the description or Cypress will not be able
|
||||
// to scroll to the button
|
||||
cy.get('.editor-upper-jaw').click();
|
||||
cy.get(selectors.checkLowerJawButton).should('be.visible');
|
||||
cy.get(selectors.submitLowerJawButton).should('not.be.visible');
|
||||
}
|
||||
);
|
||||
|
||||
it(
|
||||
'checks hotkeys when instruction is focused',
|
||||
{ browser: '!firefox' },
|
||||
|
||||
Reference in New Issue
Block a user