Skip to content

Commit

Permalink
chore: use query param form for e2e test (#3387)
Browse files Browse the repository at this point in the history
Tiny PR to actually test the query params form on verb request page.
  • Loading branch information
wesbillman authored Nov 14, 2024
1 parent 65bf8fb commit d222532
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions frontend/console/e2e/ingress-http.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,19 @@ test('send get request with path and query params', async ({ page }) => {
const pathInput = page.locator('input#request-path')
expect(pathInput).toHaveValue('http://localhost:8891/get/name')

// Update the path input to test path and query params
await pathInput.fill('http://localhost:8891/get/wicket?age=10')
await pathInput.fill('http://localhost:8891/get/wicket')

// Click the Query Params tab
await page.getByRole('button', { name: 'Query Params' }).click()

// Fill out query parameters using the key/value inputs
// Get the first pair of inputs in the form
const keyInput = page.locator('input[placeholder="Key"]').first()
const valueInput = page.locator('input[placeholder="Value"]').first()

await keyInput.fill('age')
await valueInput.fill('10')

await page.getByRole('button', { name: 'Send' }).click()

const responseEditor = page.locator('#response-editor .cm-content[role="textbox"]')
Expand Down

0 comments on commit d222532

Please sign in to comment.