fix: cypress (#45593)
This commit is contained in:
@ -26,9 +26,15 @@ describe('Backend challenge', function () {
|
|||||||
|
|
||||||
it('does not generate unhandled errors on submission', () => {
|
it('does not generate unhandled errors on submission', () => {
|
||||||
cy.visit(locations.index);
|
cy.visit(locations.index);
|
||||||
cy.get(selectors.input)
|
cy.get(selectors.input).type('https://example.com');
|
||||||
.type('https://example.com')
|
|
||||||
.type('{enter}')
|
// 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(() => {
|
.then(() => {
|
||||||
cy.get(selectors.defaultOutput)
|
cy.get(selectors.defaultOutput)
|
||||||
.contains(runningOutput)
|
.contains(runningOutput)
|
||||||
|
@ -9,9 +9,14 @@ describe('CodeAlly cert challenge', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should not allow you to submit a URL', function () {
|
it('should not allow you to submit a URL', function () {
|
||||||
cy.get('input[name="solution"]')
|
cy.get('input[name="solution"]').type('https://example.com');
|
||||||
.type('https://example.com')
|
|
||||||
.type('{enter}');
|
// 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.');
|
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 () {
|
it('should allow you to submit a URL', function () {
|
||||||
cy.get('input[name="solution"]')
|
cy.get('input[name="solution"]').type('https://example.com');
|
||||||
.type('https://example.com')
|
|
||||||
.type('{enter}');
|
// 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');
|
cy.get('.completion-modal-body');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -183,7 +183,12 @@ describe('Username input field', () => {
|
|||||||
.clear({ force: true })
|
.clear({ force: true })
|
||||||
.type('nhcarrigan', { force: true });
|
.type('nhcarrigan', { force: true });
|
||||||
cy.contains('Username is available');
|
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')
|
cy.contains('We have updated your username to nhcarrigan')
|
||||||
.should('be.visible')
|
.should('be.visible')
|
||||||
@ -203,7 +208,12 @@ describe('Username input field', () => {
|
|||||||
.clear({ force: true })
|
.clear({ force: true })
|
||||||
.type('bjorno', { force: true });
|
.type('bjorno', { force: true });
|
||||||
cy.contains('Username is available');
|
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.contains('We have updated your username to bjorno').within(() => {
|
||||||
cy.get('button').click();
|
cy.get('button').click();
|
||||||
@ -221,7 +231,11 @@ describe('Username input field', () => {
|
|||||||
.type('symbol', { force: true });
|
.type('symbol', { force: true });
|
||||||
cy.contains('Username is available');
|
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');
|
cy.contains('Account Settings for symbol').should('be.visible');
|
||||||
|
|
||||||
|
@ -61,7 +61,11 @@ Cypress.Commands.add('resetUsername', () => {
|
|||||||
|
|
||||||
cy.contains('Username is available');
|
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');
|
cy.contains('Account Settings for developmentuser').should('be.visible');
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user