mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-02 17:08:32 +00:00
Revert: Re-add post response vars (#6307)
* Partial Revert "remove: presets and response var (#6195)"
This reverts commit 786a3414b8 while keeping code related to presets deleted
* revert: remove global environment variables assignment
This commit is contained in:
@@ -47,12 +47,19 @@ test('should persist request with newlines across app restarts', async ({ create
|
||||
|
||||
// Add Pre Request var with newlines
|
||||
await page.getByRole('tab', { name: 'Vars' }).click();
|
||||
await page.locator('.btn-add-var').click();
|
||||
const preReqRow = page.locator('table tbody tr').first();
|
||||
await page.locator('.btn-add-var').first().click();
|
||||
const preReqRow = page.locator('table').first().locator('tbody tr').first();
|
||||
await getTableCell(preReqRow, 0).locator('input[type="text"]').fill('preRequestVar');
|
||||
await getTableCell(preReqRow, 1).locator('.CodeMirror').click();
|
||||
await getTableCell(preReqRow, 1).locator('textarea').fill('pre\nRequest\nValue');
|
||||
|
||||
// Add Post Response var with newlines
|
||||
await page.locator('.btn-add-var').last().click();
|
||||
const postResRow = page.locator('table').nth(1).locator('tbody tr').first();
|
||||
await getTableCell(postResRow, 0).locator('input[type="text"]').fill('postResponseVar');
|
||||
await getTableCell(postResRow, 1).locator('.CodeMirror').click();
|
||||
await getTableCell(postResRow, 1).locator('textarea').fill('post\nResponse\nValue');
|
||||
|
||||
await page.keyboard.press('Meta+s');
|
||||
await app1.close();
|
||||
|
||||
@@ -73,7 +80,8 @@ test('should persist request with newlines across app restarts', async ({ create
|
||||
|
||||
// Verify vars persisted
|
||||
await page2.getByRole('tab', { name: 'Vars' }).click();
|
||||
await expect(page2.locator('table tbody tr')).toHaveCount(1);
|
||||
await expect(page2.locator('table').first().locator('tbody tr')).toHaveCount(1);
|
||||
await expect(page2.locator('table').nth(1).locator('tbody tr')).toHaveCount(1);
|
||||
|
||||
await app2.close();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user