-
-
Notifications
You must be signed in to change notification settings - Fork 266
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
Feat/suite desktop core/invity mock for tests #16429
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this stage, I just copy pasted the responses from the life invity API.
Once we have first tests for buy, sell and exchange, we will optimize and slim down these files. Because then we will know what we need and don't.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hurray, Mocked API means we will always have same results. No need of masking that was anyway flaky.
const quoteProviderLocator = '@coinmarket/offers/quote/provider'; | ||
const quoteAmountLocator = '@coinmarket/offers/quote/crypto-amount'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like this approach, but I could not find better way.
I need to do a locator chaining and for some reason
this.page.getByTestId('@coinmarket/offers/quote').and(this.page.getByTestId('@coinmarket/offers/quote/provider'))
didnt work for me and I had to use:
this.page.getByTestId('@coinmarket/offers/quote').getByTestId('@coinmarket/offers/quote/provider')
So i pulled '@coinmarket/offers/quote/provider'
to a const definition so it woudn't be once in constructor and once in method validateBuyQuotes
66aef75
to
c223236
Compare
c223236
to
e7a18da
Compare
Description
Setups invity mocking for buy test. So far only web is working. I will work on desktop as next step
Related Issue
Resolve 15606, #16041