Files
bruno/tests/interpolation/interpolate-request-url.spec.ts
sid-bruno 6f8c543ee3 tests: additional tests for path params and odata (#5610)
* Support for Odata style path params (#5048)

* Support for Odata style path params

* Remove test statement

* Update packages/bruno-app/src/utils/url/index.spec.js

Add more testcases

Co-authored-by: sid-bruno <siddharth@usebruno.com>

* Performance improvements

* Add testcases for odata style url params

---------

Co-authored-by: sid-bruno <siddharth@usebruno.com>

* tests: additional tests for odata and path params

tests(electron): add in odata smoke for interpolation

chore: code format

chore: ESLint atomic diff based formatting (#5592)

* chore: atomic diff based formatting

chore(format): fix formatting

tests(playwright): interpolation tests

Support for Odata style path params (#5048)

* Support for Odata style path params

* Remove test statement

* Update packages/bruno-app/src/utils/url/index.spec.js

Add more testcases

Co-authored-by: sid-bruno <siddharth@usebruno.com>

* Performance improvements

* Add testcases for odata style url params

---------

Co-authored-by: sid-bruno <siddharth@usebruno.com>

---------

Co-authored-by: Anton <anton@trugen.net>
Co-authored-by: Siddharth Gelera <ahoy@barelyhuman.dev>
2025-09-23 15:55:04 +05:30

27 lines
1.2 KiB
TypeScript

import { test, expect } from '../../playwright';
test.describe.serial('URL Interpolation', () => {
test.setTimeout(2 * 10 * 1000);
test('Interpolate basic path params', async ({ pageWithUserData: page }) => {
await page.locator('#sidebar-collection-name').click();
await page.getByRole('complementary').getByText('echo-request-url').click();
await page.getByTestId('send-arrow-icon').click();
expect(page.getByTestId('response-status-code')).toHaveText(/200/);
const texts = await page.locator('div:nth-child(2) > .CodeMirror-scroll').allInnerTexts();
expect(texts.some(d => d.includes(`"url": "/path/some-data"`))).toBe(true);
});
test('Interpolate oData path params', async ({ pageWithUserData: page }) => {
await page.getByRole('complementary').getByText('echo-request-odata').click();
await page.getByTestId('send-arrow-icon').click();
expect(page.getByTestId('response-status-code')).toHaveText(/200/);
const texts = await page.locator('div:nth-child(2) > .CodeMirror-scroll').allInnerTexts();
expect(texts.some(d => d.includes(`"url": "/path/Category('category123')/Item(item456)/foobar/Tags(%22tag%20test%22)"`))).toBe(true);
});
});