mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-08 14:35:03 +00:00
refactor: simplify HtmlPreview component by extracting render logic into a separate function (#6740)
* refactor: simplify HtmlPreview component by extracting render logic into a separate function * refactor: wrap renderHtmlPreview in a fragment for improved JSX structure * fix: update preview visibility check in response format tests
This commit is contained in:
@@ -43,7 +43,7 @@ test.describe.serial('Response Format Select and Preview', () => {
|
||||
await switchResponseFormat(page, 'HTML');
|
||||
await expect(codeLine.nth(1)).toContainText('"hello": "bruno"');
|
||||
await switchToPreviewTab(page);
|
||||
await expect(previewContainer).toContainText('{"hello":"bruno"}');
|
||||
await expect(previewContainer.locator('webview')).toBeVisible();
|
||||
});
|
||||
|
||||
await test.step('Switch to Editor, select XML, verify editor and preview error', async () => {
|
||||
@@ -59,7 +59,7 @@ test.describe.serial('Response Format Select and Preview', () => {
|
||||
await switchResponseFormat(page, 'JavaScript');
|
||||
await expect(codeLine.nth(1)).toContainText('"hello": "bruno"');
|
||||
await switchToPreviewTab(page);
|
||||
await expect(previewContainer).toContainText('{"hello":"bruno"}');
|
||||
await expect(previewContainer.locator('webview')).toBeVisible();
|
||||
});
|
||||
|
||||
await test.step('Switch to Editor, select Raw, verify editor and preview', async () => {
|
||||
|
||||
Reference in New Issue
Block a user