Revert "revert: cypress temporary workaround" (#46156)

This reverts commit 9d82633a61.
pull/46139/head^2
Tom 2022-05-25 15:49:14 -05:00 committed by GitHub
parent 9f73059c03
commit 58ce8ce3e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 47 additions and 13 deletions

View File

@ -26,9 +26,15 @@ describe('Backend challenge', function () {
it('does not generate unhandled errors on submission', () => {
cy.visit(locations.index);
cy.get(selectors.input)
.type('https://example.com')
.type('{enter}')
cy.get(selectors.input).type('https://example.com');
// temporary fix until https://github.com/cypress-io/cypress/issues/20562 is fixed
cy.contains(`I've completed this challenge`)
.click()
// revert to this when it is
// .type('{enter}')
.then(() => {
cy.get(selectors.defaultOutput)
.contains(runningOutput)

View File

@ -9,9 +9,14 @@ describe('CodeAlly cert challenge', function () {
});
it('should not allow you to submit a URL', function () {
cy.get('input[name="solution"]')
.type('https://example.com')
.type('{enter}');
cy.get('input[name="solution"]').type('https://example.com');
// temporary fix until https://github.com/cypress-io/cypress/issues/20562 is fixed
cy.contains(`I've completed this challenge`).click();
// revert to this when it is
// .type('{enter}')
cy.contains('You must complete the project first.');
});
});
@ -26,9 +31,14 @@ describe('CodeAlly cert challenge', function () {
});
it('should allow you to submit a URL', function () {
cy.get('input[name="solution"]')
.type('https://example.com')
.type('{enter}');
cy.get('input[name="solution"]').type('https://example.com');
// temporary fix until https://github.com/cypress-io/cypress/issues/20562 is fixed
cy.contains(`I've completed this challenge`).click();
// revert to this when it is
// .type('{enter}')
cy.get('.completion-modal-body');
});
});

View File

@ -183,7 +183,12 @@ describe('Username input field', () => {
.clear({ force: true })
.type('nhcarrigan', { force: true });
cy.contains('Username is available');
cy.get('@usernameInput').type('{enter}', { force: true, release: false });
// temporary fix until https://github.com/cypress-io/cypress/issues/20562 is fixed
cy.contains(`Save`).click();
// revert to this when it is
// cy.get('@usernameInput').type('{enter}', { force: true, release: false });
cy.contains('We have updated your username to nhcarrigan')
.should('be.visible')
@ -203,7 +208,12 @@ describe('Username input field', () => {
.clear({ force: true })
.type('bjorno', { force: true });
cy.contains('Username is available');
cy.get('@usernameInput').type('{enter}', { force: true, release: false });
// temporary fix until https://github.com/cypress-io/cypress/issues/20562 is fixed
cy.contains(`Save`).click();
// revert to this when it is
// cy.get('@usernameInput').type('{enter}', { force: true, release: false });
cy.contains('We have updated your username to bjorno').within(() => {
cy.get('button').click();
@ -221,7 +231,11 @@ describe('Username input field', () => {
.type('symbol', { force: true });
cy.contains('Username is available');
cy.get('@usernameInput').type('{enter}', { force: true, release: false });
// temporary fix until https://github.com/cypress-io/cypress/issues/20562 is fixed
cy.contains(`Save`).click();
// revert to this when it is
// cy.get('@usernameInput').type('{enter}', { force: true, release: false });
cy.contains('Account Settings for symbol').should('be.visible');

View File

@ -71,7 +71,11 @@ Cypress.Commands.add('resetUsername', () => {
cy.contains('Username is available');
cy.get('@usernameInput').type('{enter}', { force: true, release: false });
// temporary fix until https://github.com/cypress-io/cypress/issues/20562 is fixed
cy.contains(`Save`).click();
// revert to this when it is
// cy.get('@usernameInput').type('{enter}', { force: true, release: false });
cy.contains('Account Settings for developmentuser').should('be.visible');
});