fix(e2e): failing electron tests (#52495)

This commit is contained in:
Tom
2023-12-06 02:43:52 -06:00
committed by GitHub
parent 79b5891655
commit 8750f5dbe1
2 changed files with 7 additions and 2 deletions

View File

@@ -38,7 +38,12 @@ const ProjectModal = ({
<SolutionViewer challengeFiles={challengeFiles} solution={solution} />
</Modal.Body>
<Modal.Footer>
<Button onClick={handleSolutionModalHide}>{t('buttons.close')}</Button>
<Button
data-cy='solution-viewer-close-btn'
onClick={handleSolutionModalHide}
>
{t('buttons.close')}
</Button>
</Modal.Footer>
</Modal>
);

View File

@@ -147,7 +147,7 @@ describe('project submission', () => {
// TODO: if we write a test to check that the solution is visible
// before reloading, we should include that here.
cy.contains('Solution for');
cy.contains('Close').click();
cy.get(`[data-cy="solution-viewer-close-btn"]`).click();
});
// Claim and view solutions on certification page