Skip to content

Commit

Permalink
fix: use fill for network forward tests
Browse files Browse the repository at this point in the history
Signed-off-by: Mason Hu <[email protected]>
  • Loading branch information
MasWho committed Feb 20, 2025
1 parent 004170c commit 35189b9
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions tests/helpers/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,20 +82,16 @@ export const createNetworkForward = async (page: Page, network: string) => {
let addressInput = page.getByLabel("0 target address");
await page.getByRole("button", { name: "Add port" }).click();
await portInput.click();
await expect(portInput).toBeFocused();
await page.keyboard.type("80");
await portInput.fill("80");
await addressInput.click();
await expect(addressInput).toBeFocused();
await page.keyboard.type(targetAddress);
await addressInput.fill(targetAddress);
await page.getByRole("button", { name: "Add port" }).click();
portInput = page.getByLabel("1 listen port");
addressInput = page.getByLabel("1 target address");
await portInput.click();
await expect(portInput).toBeFocused();
await page.keyboard.type("23,443-455");
await portInput.fill("23,443-455");
await addressInput.click();
await expect(addressInput).toBeFocused();
await page.keyboard.type(targetAddress);
await addressInput.fill(targetAddress);
await page.getByRole("button", { name: "Create" }).click();

await page.getByText(`Network forward ${listenAddress} created.`).click();
Expand Down

0 comments on commit 35189b9

Please sign in to comment.