-
Notifications
You must be signed in to change notification settings - Fork 573
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
Chore/fx e2e test updates #2368
base: master
Are you sure you want to change the base?
Conversation
* updated fixtures to use new POs * added POs for NewRFQ page and BlotterPage * moved some timeouts into utils
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.
rename to FxTilesPageObject
readonly testInfo: TestInfo, | ||
) {} | ||
|
||
async clickCurrency(currency: string) { |
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.
as credit,
async clickCurrency(currency: string) { | |
async selectFilter(filter: string) { |
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.
but should not be marked async
- neither should the originals in the Credit POs - did we discuss this already?
} | ||
|
||
get spotTileNotionalInput() { | ||
return this.page.locator("input[id='notional-input-EURUSD']") |
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.
this includes a specific currency pair
pass this in perhaps as a currencyPair
param?
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.
as you have done below .. but please use currencyPair
, no need to abbreviate to pair
return this.page.locator("input[id='notional-input-EURUSD']") | ||
} | ||
|
||
async buyCurrencyPair(pair: string) { |
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.
no need for the CurrencyPair
suffix here, we cannot buy anything else! 😄
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.
and having the parameter named as currencyPair
seals the deal!
return await this.page.getByTestId(`Sell-${pair}`).click() | ||
} | ||
|
||
get tradeId() { |
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 am leaning towards the pattern of having all the getters at the top .. happy to discuss this pattern, tho
packages/client/e2e/pages/index.ts
Outdated
@@ -2,3 +2,6 @@ export * from "./CreditBlotterPageObject" | |||
export * from "./CreditNewRfqPageObject" | |||
export * from "./CreditRfqTilesPageObject" | |||
export * from "./CreditSellSidePageObject" | |||
// FX pages |
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.
no need for this comment .. the names say it all
packages/client/e2e/utils.ts
Outdated
@@ -15,6 +15,11 @@ export enum TestTimeout { | |||
EXTENDED = 90000, | |||
} | |||
|
|||
export enum RfqTimeout { |
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.
we have Credit, with RFQs .. this enum name is potentially confusing
also, no need to move these here .. they are not general timeouts .. I specifically moved/kept them in the spot tile spec so they are located in the relevant scope
|
||
async clickCurrency(currency: string) { | ||
return await this.page | ||
.getByTestId("tab-bar-tabs") |
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.
this is where a Component would be useful, to tie in with reused UI elements - ref our conversation about the RTC-QA-BUG-VERSION branch
* renamed PO file * moved getters to top of PO file * cleaned up POs - removed async/awaits
No description provided.