test: unflake "should format JSON request body" (#35708)

This commit is contained in:
Dmitry Gozman 2025-04-23 13:56:15 +00:00 committed by GitHub
parent a98ad6f071
commit 69ffff95e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -112,7 +112,7 @@ test('should format JSON request body', async ({ runUITest, server }) => {
await page.getByText('post-data-1').click(); await page.getByText('post-data-1').click();
await expect(page.locator('.CodeMirror-code .CodeMirror-line').allInnerTexts()).resolves.toEqual([ await expect(page.locator('.CodeMirror-code .CodeMirror-line')).toHaveText([
'{', '{',
' "data": {', ' "data": {',
' "key": "value",', ' "key": "value",',
@ -122,11 +122,11 @@ test('should format JSON request body', async ({ runUITest, server }) => {
' ]', ' ]',
' }', ' }',
'}', '}',
]); ], { useInnerText: true });
await page.getByText('post-data-2').click(); await page.getByText('post-data-2').click();
await expect(page.locator('.CodeMirror-code .CodeMirror-line').allInnerTexts()).resolves.toEqual([ await expect(page.locator('.CodeMirror-code .CodeMirror-line')).toHaveText([
'{', '{',
' "data": {', ' "data": {',
' "key": "value",', ' "key": "value",',
@ -136,7 +136,7 @@ test('should format JSON request body', async ({ runUITest, server }) => {
' ]', ' ]',
' }', ' }',
'}', '}',
]); ], { useInnerText: true });
}); });
test('should display list of query parameters (only if present)', async ({ runUITest, server }) => { test('should display list of query parameters (only if present)', async ({ runUITest, server }) => {