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

Chore/fx e2e test updates #2368

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

umarkayani-adaptive
Copy link
Contributor

No description provided.

* updated fixtures to use new POs
* added POs for NewRFQ page and BlotterPage
* moved some timeouts into utils
Copy link
Contributor

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) {
Copy link
Contributor

Choose a reason for hiding this comment

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

as credit,

Suggested change
async clickCurrency(currency: string) {
async selectFilter(filter: string) {

Copy link
Contributor

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']")
Copy link
Contributor

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?

Copy link
Contributor

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) {
Copy link
Contributor

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! 😄

Copy link
Contributor

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() {
Copy link
Contributor

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

@@ -2,3 +2,6 @@ export * from "./CreditBlotterPageObject"
export * from "./CreditNewRfqPageObject"
export * from "./CreditRfqTilesPageObject"
export * from "./CreditSellSidePageObject"
// FX pages
Copy link
Contributor

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

@@ -15,6 +15,11 @@ export enum TestTimeout {
EXTENDED = 90000,
}

export enum RfqTimeout {
Copy link
Contributor

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")
Copy link
Contributor

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants