small fixes

This commit is contained in:
counterweight 2025-12-27 12:52:43 +01:00
parent 86c92a7c65
commit 43b250e157
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
3 changed files with 18 additions and 7 deletions

View file

@ -41,15 +41,15 @@ test.describe("Admin Pricing Page - Admin Access", () => {
await expect(page.getByText("Configure premium pricing and trade amount limits")).toBeVisible();
// Check all form fields are present (using text + input selector since labels aren't associated)
await expect(page.getByText(/Premium for BUY/i)).toBeVisible();
await expect(page.getByText(/Premium.*Buys/i)).toBeVisible();
await expect(page.locator('input[type="number"]').first()).toBeVisible();
await expect(page.getByText(/Premium for SELL/i)).toBeVisible();
await expect(page.getByText(/Premium.*Sells/i)).toBeVisible();
await expect(page.getByText(/Small Trade Threshold/i)).toBeVisible();
await expect(page.getByText(/Extra Premium for Small Trades/i)).toBeVisible();
await expect(page.getByText(/Trade Amount Limits.*BUY/i)).toBeVisible();
await expect(page.getByText(/Trade Amount Limits.*Buying/i)).toBeVisible();
await expect(page.getByText(/Minimum Amount/i).first()).toBeVisible();
await expect(page.getByText(/Maximum Amount/i).first()).toBeVisible();
await expect(page.getByText(/Trade Amount Limits.*SELL/i)).toBeVisible();
await expect(page.getByText(/Trade Amount Limits.*Selling/i)).toBeVisible();
// Check save button is present
await expect(page.getByRole("button", { name: /Save Changes/i })).toBeVisible();

View file

@ -91,7 +91,12 @@ test.describe("Availability Page - Admin Access", () => {
// Wait for "No availability" to disappear first, indicating slots have been loaded
await expect(targetCard.getByText("No availability")).not.toBeVisible({ timeout: 10000 });
// Then verify the specific slot text appears - this ensures the component has re-rendered
// Wait for any slot time text to appear (matches pattern like "09:00 - 17:00")
// This ensures React has finished rendering the slot badges
await expect(targetCard.getByText(/\d{2}:\d{2} - \d{2}:\d{2}/)).toBeVisible({ timeout: 10000 });
// Then verify the specific slot text appears
await expect(targetCard.getByText("09:00 - 17:00")).toBeVisible({ timeout: 5000 });
// Now clear it - click on the same card using the testid