Fix duplicate variable declarations in e2e tests

This commit is contained in:
counterweight 2025-12-26 21:00:29 +01:00
parent 7f547d667d
commit c9efcf79ff
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C

View file

@ -56,7 +56,6 @@ test.describe("Admin Pricing Page - Admin Access", () => {
expect(count).toBeGreaterThan(0); expect(count).toBeGreaterThan(0);
// Check that premium fields have values (inputs are after labels) // Check that premium fields have values (inputs are after labels)
const inputs = page.locator('input[type="number"]');
const buyValue = await inputs.nth(0).inputValue(); // First input is premium_buy const buyValue = await inputs.nth(0).inputValue(); // First input is premium_buy
const sellValue = await inputs.nth(1).inputValue(); // Second input is premium_sell const sellValue = await inputs.nth(1).inputValue(); // Second input is premium_sell
@ -125,7 +124,6 @@ test.describe("Admin Pricing Page - Admin Access", () => {
await expect(page.getByText(/must be between.*-100.*100/i)).toBeVisible({ timeout: 2000 }); await expect(page.getByText(/must be between.*-100.*100/i)).toBeVisible({ timeout: 2000 });
// Test min < max validation (inputs 4 and 5 are min/max buy) // Test min < max validation (inputs 4 and 5 are min/max buy)
const inputs = page.locator('input[type="number"]');
const minBuyInput = inputs.nth(4); // Min buy is 5th input (after 4 premium/threshold inputs) const minBuyInput = inputs.nth(4); // Min buy is 5th input (after 4 premium/threshold inputs)
const maxBuyInput = inputs.nth(5); // Max buy is 6th input const maxBuyInput = inputs.nth(5); // Max buy is 6th input