Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cypress #493

Merged
merged 2 commits into from
May 2, 2022
Merged

Fix cypress #493

merged 2 commits into from
May 2, 2022

Conversation

alfetopito
Copy link
Collaborator

@alfetopito alfetopito commented Apr 29, 2022

Summary

Fixing integration tests broken on #457

Note: One fix I did that isn't code related was approving WETH for the integ test account 0x68D25464371F3a97691c52e40d4C1306aF0B7629.

To Test

  1. Nothing to test, just confirm intergration tests are green

@alfetopito alfetopito self-assigned this Apr 29, 2022
@alfetopito alfetopito requested a review from a team April 29, 2022 13:52
@github-actions
Copy link
Contributor

CLA Assistant Lite All Contributors have signed the CLA.

@github-actions
Copy link
Contributor

  • 🔭 GP Swap: CoW Protocol v2 Swap UI

// When `.clear() doesn't work, brute force it with the input below.
// From https://stackoverflow.com/a/65918033/1272513
.type('{selectall}{backspace}{selectall}{backspace}')
.type('0.0', { delay: 400 })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we still need the delay?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, but I did not test without it

})

it('can swap Native for DAI', () => {
cy.get('#swap-currency-output .open-currency-select-button').click()
cy.get('.token-item-0xc7AD46e0b8a400Bb3C915120d284AafbA8fc4735').should('be.visible')
cy.get('.token-item-0xc7AD46e0b8a400Bb3C915120d284AafbA8fc4735').click({ force: true })
cy.get('#swap-currency-input .token-amount-input').should('be.visible')
cy.get('#swap-currency-input .token-amount-input').type('0.001', { delay: 400, force: true })
cy.get('#swap-currency-input .token-amount-input').clear().type('0.5', { delay: 400, force: true })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we not need the brute force clear here as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason, not everywhere is needed.
Did not try hard enough to see whether that would break without it

@alfetopito alfetopito merged commit 28650cd into develop May 2, 2022
@github-actions github-actions bot locked and limited conversation to collaborators May 2, 2022
@alfetopito alfetopito deleted the fix-cypress branch May 2, 2022 09:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants