feat(tools): revert the quick solution in cypress tests (#49427)

This commit is contained in:
Muhammed Mustafa
2023-02-18 21:56:57 +01:00
committed by GitHub
parent 251aecc58f
commit 3cd60a692d
3 changed files with 12 additions and 38 deletions
@@ -23,15 +23,9 @@ describe('Backend challenge', function () {
it('does not generate unhandled errors on submission', () => {
cy.visit(locations.index);
cy.get(selectors.tag.inputSolution).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(selectors.tag.inputSolution)
.type('https://example.com')
.type('{enter}')
.then(() => {
cy.get(selectors.class.outputText)
.contains(runningOutput)
@@ -9,13 +9,9 @@ describe('CodeAlly cert challenge', function () {
});
it('should not allow you to submit a URL', function () {
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('input[name="solution"]')
.type('https://example.com')
.type('{enter}');
cy.contains('You must complete the project first.');
});
@@ -31,13 +27,9 @@ describe('CodeAlly cert challenge', function () {
});
it('should allow you to submit a URL', function () {
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('input[name="solution"]')
.type('https://example.com')
.type('{enter}');
cy.get('.completion-modal-body');
});
@@ -138,11 +138,7 @@ describe('Username input field', () => {
cy.typeUsername('nhcarrigan');
cy.contains('Username is available');
// 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.get('@usernameInput').type('{enter}', { force: true, release: false });
cy.contains('We have updated your username to nhcarrigan')
.should('be.visible')
@@ -160,11 +156,7 @@ describe('Username input field', () => {
cy.typeUsername('bjorno');
cy.contains('Username is available');
// 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.get('@usernameInput').type('{enter}', { force: true, release: false });
cy.contains('We have updated your username to bjorno').within(() => {
cy.get('button').click();
@@ -179,11 +171,7 @@ describe('Username input field', () => {
cy.typeUsername('symbol');
cy.contains('Username is available');
// 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.get('@usernameInput').type('{enter}', { force: true, release: false });
cy.contains('Account Settings for symbol').should('be.visible');