Skip to content

Commit

Permalink
fix: e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SHolleworth committed Jan 8, 2025
1 parent b7a5837 commit bc23c6f
Showing 1 changed file with 9 additions and 18 deletions.
27 changes: 9 additions & 18 deletions packages/client/e2e/credit.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,13 @@ test.describe("Credit", () => {
.first()
.click()

const quantity = newRfqPage.getByTestId("quantity")
const quantity = newRfqPage.getByLabel("Quantity (000)")
await quantity.pressSequentially("2")
await quantity.blur()

await newRfqPage.locator("span").getByText(/All/).click()
await newRfqPage.getByLabel(/All/).click()

await newRfqPage
.locator("span")
.getByText(/Adaptive Bank/)
.click()
await newRfqPage.getByLabel(/Adaptive Bank/).click()

await newRfqPage
.locator("button")
Expand All @@ -83,7 +80,7 @@ test.describe("Credit", () => {
await rfqsPage.getByText(/Live/).first().click()

// Wait for first quote response
await expect(firstQuote).not.toContainText("Awaiting response", {
await expect(firstQuote).not.toContainText(/Awaiting response/, {
timeout: ElementTimeout.LONG,
})

Expand All @@ -100,7 +97,7 @@ test.describe("Credit", () => {
},
)

await rfqsPage.locator("li").getByText(/All/).nth(0).click()
await rfqsPage.locator("button").getByText(/All/).nth(0).click()
const btnTxt = await rfqsPage
.getByTestId("view-trade")
.first()
Expand Down Expand Up @@ -128,13 +125,10 @@ test.describe("Credit", () => {
.first()
.click()

const quantity = newRfqPage.getByTestId("quantity")
const quantity = newRfqPage.getByLabel("Quantity (000)")
await quantity.pressSequentially("2")

await newRfqPage
.locator("span")
.getByText(/Adaptive Bank/)
.click()
await newRfqPage.getByLabel(/Adaptive Bank/).click()

const pagePromise = context.waitForEvent("page", {
predicate: (page) => page.url().includes("credit-sellside"),
Expand Down Expand Up @@ -163,13 +157,10 @@ test.describe("Credit", () => {
await newRfqPage.getByPlaceholder(/Enter a CUSIP/).click()
await newRfqPage.getByTestId("search-result-item").nth(5).click()

const quantity = newRfqPage.getByTestId("quantity")
const quantity = newRfqPage.getByLabel("Quantity (000)")
await quantity.pressSequentially("2")

await newRfqPage
.locator("span")
.getByText(/Adaptive Bank/)
.click()
await newRfqPage.getByLabel(/Adaptive Bank/).click()

const pagePromise = context.waitForEvent("page", {
predicate: (page) => page.url().includes("credit-sellside"),
Expand Down

0 comments on commit bc23c6f

Please sign in to comment.