From adc76ba7aca7c6505ea87d74a110bb9cf2ef41ea Mon Sep 17 00:00:00 2001 From: Jack Kavanagh Date: Mon, 17 Mar 2025 10:03:17 +0100 Subject: [PATCH] fix render error bug (#8467) --- .../tests/smoke/global-environments.test.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/insomnia-smoke-test/tests/smoke/global-environments.test.ts b/packages/insomnia-smoke-test/tests/smoke/global-environments.test.ts index 200f0ac707..4232d93853 100644 --- a/packages/insomnia-smoke-test/tests/smoke/global-environments.test.ts +++ b/packages/insomnia-smoke-test/tests/smoke/global-environments.test.ts @@ -1,3 +1,5 @@ +import { expect } from '@playwright/test'; + import { loadFixture } from '../../playwright/paths'; import { test } from '../../playwright/test'; @@ -20,6 +22,12 @@ test.describe('Global Environments', async () => { await page.getByRole('link', { name: 'collection-for-global-' }).click(); await page.getByTestId('New Request').getByLabel('GET New Request', { exact: true }).click(); + // check if it appears red with error message in tag editor + await page.getByText('Body', { exact: true }).click(); + await page.getByText('_[\'global-base\']').click(); + await expect(page.getByLabel('Live Preview')).toContainText('Failed to render environment variables: _[\'global-base\']'); + await page.getByRole('button', { name: 'Done' }).click(); + // check if it appears as a custom message when sending the request await page.getByRole('button', { name: 'Send' }).click(); await page.getByRole('heading', { name: '2 environment variables are' }).click(); await page.getByRole('button', { name: 'Cancel' }).click();