Skip to content

Commit

Permalink
fix: e2e tests and types
Browse files Browse the repository at this point in the history
  • Loading branch information
SHolleworth committed Jan 9, 2025
1 parent b7a5837 commit 5895f85
Show file tree
Hide file tree
Showing 3 changed files with 1,276 additions and 7,427 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("div").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
102 changes: 44 additions & 58 deletions packages/client/src/client/theme/uisk/generatedTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1096,18 +1096,18 @@ const collection0: UISK_Collection0 = {
"Colors/Success/800": "#085d3a",
"Colors/Success/900": "#074d31",
"Colors/Success/950": "#053321",
"Colors/Data/Positive/25": "#d9ebd9",
"Colors/Data/Positive/50": "#cce4cc",
"Colors/Data/Positive/100": "#7fbb7f",
"Colors/Data/Positive/200": "#339233",
"Colors/Data/Positive/300": "#007700",
"Colors/Data/Positive/400": "#005a00",
"Colors/Data/Positive/500": "#004b00",
"Colors/Data/Positive/600": "#003b00",
"Colors/Data/Positive/700": "#002c00",
"Colors/Data/Positive/800": "#001d00",
"Colors/Data/Positive/900": "#000e00",
"Colors/Data/Positive/950": "#000600",
"Colors/Data/Positive/25": "#f6fef9",
"Colors/Data/Positive/50": "#ecfdf3",
"Colors/Data/Positive/100": "#dcfae6",
"Colors/Data/Positive/200": "#abefc6",
"Colors/Data/Positive/300": "#75e0a7",
"Colors/Data/Positive/400": "#47cd89",
"Colors/Data/Positive/500": "#17b26a",
"Colors/Data/Positive/600": "#079455",
"Colors/Data/Positive/700": "#067647",
"Colors/Data/Positive/800": "#085d3a",
"Colors/Data/Positive/900": "#074d31",
"Colors/Data/Positive/950": "#053321",
"Colors/Data/Negative/25": "#f5e0e0",
"Colors/Data/Negative/50": "#f0d1d1",
"Colors/Data/Negative/100": "#d98b8b",
Expand Down Expand Up @@ -1609,18 +1609,18 @@ const collection0: UISK_Collection0 = {
"Colors/Success/800": "#085d3a",
"Colors/Success/900": "#074d31",
"Colors/Success/950": "#053321",
"Colors/Data/Positive/25": "#d9ebd9",
"Colors/Data/Positive/50": "#cce4cc",
"Colors/Data/Positive/100": "#7fbb7f",
"Colors/Data/Positive/200": "#339233",
"Colors/Data/Positive/300": "#007700",
"Colors/Data/Positive/400": "#005a00",
"Colors/Data/Positive/500": "#004b00",
"Colors/Data/Positive/600": "#003b00",
"Colors/Data/Positive/700": "#002c00",
"Colors/Data/Positive/800": "#001d00",
"Colors/Data/Positive/900": "#000e00",
"Colors/Data/Positive/950": "#000600",
"Colors/Data/Positive/25": "#f6fef9",
"Colors/Data/Positive/50": "#ecfdf3",
"Colors/Data/Positive/100": "#dcfae6",
"Colors/Data/Positive/200": "#abefc6",
"Colors/Data/Positive/300": "#75e0a7",
"Colors/Data/Positive/400": "#47cd89",
"Colors/Data/Positive/500": "#17b26a",
"Colors/Data/Positive/600": "#079455",
"Colors/Data/Positive/700": "#067647",
"Colors/Data/Positive/800": "#085d3a",
"Colors/Data/Positive/900": "#074d31",
"Colors/Data/Positive/950": "#053321",
"Colors/Data/Negative/25": "#f5e0e0",
"Colors/Data/Negative/50": "#f0d1d1",
"Colors/Data/Negative/100": "#d98b8b",
Expand Down Expand Up @@ -2626,12 +2626,12 @@ const collection6: UISK_Collection6 = {
"Colors/Text/text-brand-tertiary_alt": "#f7f7f7",
"Colors/Border/border-secondary": "#292929",
"Colors/Border/border-error_subtle": "#890c21",
"Colors/Border/border-primary": "#424242",
"Colors/Border/border-primary": "#525252",
"Colors/Border/border-brand": "#8184f8",
"Colors/Border/border-disabled": "#424242",
"Colors/Border/border-error": "#c41230",
"Colors/Border/border-disabled_subtle": "#292929",
"Colors/Border/border-tertiary": "#292929",
"Colors/Border/border-tertiary": "#1f1f1f",
"Colors/Border/border-brand_alt": "#424242",
"Colors/Background/bg-primary": "#0f0f0f",
"Colors/Background/bg-tertiary": "#292929",
Expand Down Expand Up @@ -2924,14 +2924,14 @@ const collection6: UISK_Collection6 = {
"Colors/Background/bg-buy-primary": "#8e90f9",
"Colors/Background/bg-buy-primary_hover": "#676ac6",
"Colors/Border/border-success": "#079455",
"Component colors/Utility/Data/utility-data-positive-50": "#cce4cc",
"Component colors/Utility/Data/utility-data-positive-100": "#7fbb7f",
"Component colors/Utility/Data/utility-data-positive-200": "#339233",
"Component colors/Utility/Data/utility-data-positive-300": "#007700",
"Component colors/Utility/Data/utility-data-positive-400": "#005a00",
"Component colors/Utility/Data/utility-data-positive-500": "#004b00",
"Component colors/Utility/Data/utility-data-positive-600": "#003b00",
"Component colors/Utility/Data/utility-data-positive-700": "#002c00",
"Component colors/Utility/Data/utility-data-positive-50": "#ecfdf3",
"Component colors/Utility/Data/utility-data-positive-100": "#dcfae6",
"Component colors/Utility/Data/utility-data-positive-200": "#abefc6",
"Component colors/Utility/Data/utility-data-positive-300": "#75e0a7",
"Component colors/Utility/Data/utility-data-positive-400": "#47cd89",
"Component colors/Utility/Data/utility-data-positive-500": "#17b26a",
"Component colors/Utility/Data/utility-data-positive-600": "#079455",
"Component colors/Utility/Data/utility-data-positive-700": "#067647",
"Component colors/Utility/Red/utility-red-700": "#e28897",
"Component colors/Utility/Red/utility-red-600": "#d14159",
"Component colors/Utility/Red/utility-red-500": "#c41230",
Expand Down Expand Up @@ -2980,7 +2980,7 @@ const collection6: UISK_Collection6 = {
"Colors/Text/text-primary_on-brand": "#ffffff",
"Colors/Text/text-secondary_on-brand": "#c0c2fc",
"Colors/Text/text-tertiary_on-brand": "#c0c2fc",
"Colors/Text/text-quaternary_on-brand": "#a7a9fa",
"Colors/Text/text-quaternary_on-brand": "#4d4f95",
"Colors/Text/text-brand-tertiary_alt": "#676ac6",
"Colors/Border/border-secondary": "#f5f5f5",
"Colors/Border/border-error_subtle": "#d14159",
Expand Down Expand Up @@ -3282,14 +3282,14 @@ const collection6: UISK_Collection6 = {
"Colors/Background/bg-buy-primary": "#8e90f9",
"Colors/Background/bg-buy-primary_hover": "#41427c",
"Colors/Border/border-success": "#17b26a",
"Component colors/Utility/Data/utility-data-positive-50": "#cce4cc",
"Component colors/Utility/Data/utility-data-positive-100": "#7fbb7f",
"Component colors/Utility/Data/utility-data-positive-200": "#339233",
"Component colors/Utility/Data/utility-data-positive-300": "#007700",
"Component colors/Utility/Data/utility-data-positive-400": "#005a00",
"Component colors/Utility/Data/utility-data-positive-500": "#004b00",
"Component colors/Utility/Data/utility-data-positive-600": "#003b00",
"Component colors/Utility/Data/utility-data-positive-700": "#002c00",
"Component colors/Utility/Data/utility-data-positive-50": "#ecfdf3",
"Component colors/Utility/Data/utility-data-positive-100": "#dcfae6",
"Component colors/Utility/Data/utility-data-positive-200": "#abefc6",
"Component colors/Utility/Data/utility-data-positive-300": "#75e0a7",
"Component colors/Utility/Data/utility-data-positive-400": "#47cd89",
"Component colors/Utility/Data/utility-data-positive-500": "#17b26a",
"Component colors/Utility/Data/utility-data-positive-600": "#079455",
"Component colors/Utility/Data/utility-data-positive-700": "#067647",
"Component colors/Utility/Red/utility-red-700": "#6d091a",
"Component colors/Utility/Red/utility-red-600": "#890c21",
"Component colors/Utility/Red/utility-red-500": "#a50e28",
Expand Down Expand Up @@ -3375,7 +3375,7 @@ const collections: UISK_Collections = {
...collection7,
}

type UISK_TextStyles = {
export type UISK_TextStyles = {
"Display 2xl/Regular": ResolvedTextStyleDefinition
"Display 2xl/Medium": ResolvedTextStyleDefinition
"Display 2xl/Semibold": ResolvedTextStyleDefinition
Expand Down Expand Up @@ -7020,8 +7020,6 @@ type ResolvedTextStyleDefinition = {
fontWeight: number
letterSpacing: number | string
lineHeight: string
marginBlockEnd: number
marginInlineStart: number
textDecoration: ResolvedTextDecoration
textTransform: TextTransform
}
Expand Down Expand Up @@ -7137,18 +7135,6 @@ export function resolveTextStyle(
variables,
),

marginBlockEnd: resolveNumberField(
textStyle.definition.paragraphSpacing,
binding("paragraphSpacing"),
variables,
),

marginInlineStart: resolveNumberField(
textStyle.definition.paragraphIndent,
binding("paragraphIndent"),
variables,
),

fontStretch: parseFontStretch(textStyle.definition.fontName.style),
textDecoration:
textDecorations[textStyle.definition.textDecoration] ?? "none",
Expand Down
Loading

0 comments on commit 5895f85

Please sign in to comment.