mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-09-24 23:01:18 +08:00
feat(tools): revert the quick solution in cypress tests (#49427)
This commit is contained in:
@@ -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');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user