Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Manage Cookie Modal [INS-5007] #8385

Merged
merged 13 commits into from
Feb 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { expect } from '@playwright/test';

import { loadFixture } from '../../playwright/paths';
import { test } from '../../playwright/test';

Expand All @@ -23,18 +25,18 @@ test.describe('Cookie editor', async () => {
await page.click('pre[role="presentation"]:has-text("bar")');
await page.locator('[data-testid="CookieValue"] >> textarea').nth(1).fill('123');
await page.locator('text=Done').nth(1).click();
await page.getByRole('cell', { name: 'foo=b123ar; Expires=' }).click();
await page.getByTestId('cookie-test-iteration-0').click();

// Create a new cookie
await page.locator('.cookie-list').getByRole('button', { name: 'Actions' }).click();
await page.getByRole('menuitem', { name: 'Add Cookie' }).click();
await page.getByRole('button', { name: 'Add Cookie' }).click();

await page.getByRole('button', { name: 'Edit' }).first().click();

// Try to replace text in Raw view
await page.getByRole('tab', { name: 'Raw' }).click();
await page.locator('text=Raw Cookie String >> input[type="text"]').fill('foo2=bar2; Expires=Tue, 19 Jan 2038 03:14:07 GMT; Domain=localhost; Path=/');
await page.locator('text=Done').nth(1).click();
await page.getByRole('cell', { name: 'foo2=bar2; Expires=' }).click();
await page.getByTestId('cookie-test-iteration-0').click();

await page.click('text=Done');

Expand All @@ -44,7 +46,7 @@ test.describe('Cookie editor', async () => {

// Check in the timeline that the cookie was sent
await page.getByRole('tab', { name: 'Console' }).click();
await page.click('text=foo2=bar2; foo=b123ar');
await expect(page.getByText('foo2=bar2')).toBeVisible();

// Send ws request
await page.getByLabel('Request Collection').getByTestId('example websocket').press('Enter');
Expand All @@ -53,7 +55,6 @@ test.describe('Cookie editor', async () => {

// Check in the timeline that the cookie was sent
await page.getByRole('tab', { name: 'Console' }).click();
await page.click('text=foo2=bar2; foo=b123ar;');
await expect(page.getByText('foo2=bar2')).toBeVisible();
});

});
162 changes: 0 additions & 162 deletions packages/insomnia/src/ui/components/cookie-list.tsx

This file was deleted.

Loading
Loading