mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-28 23:24:05 +00:00
* Fix -bin header handling in grpc * fix: bin-header, tests rm: tests rm: unused fix: bin header fix: test fix: test rm: un-necessarycode --------- Co-authored-by: Juan Pablo Orsay <jporsay@gmail.com>
33 lines
1.5 KiB
TypeScript
33 lines
1.5 KiB
TypeScript
import { test, expect } from '../../../playwright';
|
|
import { closeAllCollections } from '../../utils/page';
|
|
|
|
test.describe('grpc metadata', () => {
|
|
test.afterAll(async ({ pageWithUserData: page }) => {
|
|
await closeAllCollections(page);
|
|
});
|
|
|
|
test('should handle binary metadata', async ({ pageWithUserData: page }) => {
|
|
await test.step('Open the request', async () => {
|
|
const collection = page.locator('#sidebar-collection-name').filter({ hasText: 'Grpcbin' });
|
|
await collection.click();
|
|
const request = page.locator('.collection-item-name').filter({ hasText: 'SayHello' });
|
|
await request.click();
|
|
});
|
|
|
|
await test.step('Verify request sent successfully', async () => {
|
|
await page.getByTestId('grpc-send-request-button').click();
|
|
const statusCode = page.getByTestId('grpc-response-status-code');
|
|
const statusText = page.getByTestId('grpc-response-status-text');
|
|
await expect(statusCode).toBeVisible({ timeout: 30000 });
|
|
await expect(statusText).toBeVisible({ timeout: 30000 });
|
|
await expect(statusCode).toHaveText(/0/);
|
|
await expect(statusText).toHaveText(/OK/);
|
|
});
|
|
|
|
/* TODO: Reflection fetching incorrectly marks requests as modified, causing save indicators to appear. This save step prevents test timeouts by clearing the modified state. This is a temporary workaround until the reflection fetching issue is resolved. */
|
|
await test.step('save request via shortcut', async () => {
|
|
await page.keyboard.press('Meta+s');
|
|
});
|
|
});
|
|
});
|