revert: feat(phase-1): allow user to customize keybindings#7163 (#7457)

* Revert "feat(phase-1): allow user to customize keybindings (#7163)"

This reverts commit 14532b48a6.

* Revert "chore: UI Polish for Zoom and Keybindings panel (#7376)"

This reverts commit 5151d29aac.
This commit is contained in:
Sid
2026-03-12 20:48:16 +05:30
committed by lohit-bruno
parent 7fc4ff274d
commit 59453536a6
25 changed files with 494 additions and 3912 deletions

View File

@@ -2,8 +2,6 @@ import { test, expect } from '../../../playwright';
import { closeAllCollections, createCollection } from '../../utils/page';
test.describe('Move tabs', () => {
const modifier = process.platform === 'darwin' ? 'Meta' : 'Control';
test.afterEach(async ({ page }) => {
// cleanup: close all collections
await closeAllCollections(page);
@@ -137,7 +135,7 @@ test.describe('Move tabs', () => {
// Move the request tab before the folder tab using keyboard shortcut
const source = page.locator('.request-tab .tab-label').filter({ hasText: 'test-request' });
await source.click();
await page.keyboard.press(`${modifier}+BracketLeft`);
await page.keyboard.press('ControlOrMeta+Shift+PageUp');
await page.waitForTimeout(500);
// Verify order of tabs after move
@@ -146,7 +144,7 @@ test.describe('Move tabs', () => {
// Move the request tab back to its original position using keyboard shortcut
await source.click();
await page.keyboard.press(`${modifier}+BracketRight`);
await page.keyboard.press('ControlOrMeta+Shift+PageDown');
await page.waitForTimeout(500);
// Verify order of tabs after move

View File

@@ -0,0 +1,93 @@
import { test, expect } from '../../../playwright';
import { closeAllCollections, createCollection } from '../../utils/page';
test.describe('Copy and Paste with Keyboard Shortcuts', () => {
test.afterAll(async ({ page }) => {
await closeAllCollections(page);
});
test('should copy and paste request using keyboard shortcuts', async ({ page, createTmpDir }) => {
await createCollection(page, 'keyboard-test', await createTmpDir('keyboard-test'));
const collection = page.locator('.collection-name').filter({ hasText: 'keyboard-test' });
// Create a request
await collection.hover();
await collection.locator('.collection-actions .icon').click();
await page.locator('.dropdown-item').filter({ hasText: 'New Request' }).click();
await page.getByPlaceholder('Request Name').fill('test-request');
await page.locator('#new-request-url .CodeMirror').click();
await page.locator('textarea').fill('https://echo.usebruno.com');
await page.getByRole('button', { name: 'Create' }).click();
const requestItem = page.locator('.collection-item-name').filter({ hasText: 'test-request' });
await expect(requestItem).toBeVisible();
// Focus the request item
await requestItem.click();
await requestItem.focus();
// Wait for keyboard focus indicator
await expect(requestItem).toHaveClass(/item-keyboard-focused/);
// Use Cmd+C on Mac, Ctrl+C on Windows/Linux
const modifier = process.platform === 'darwin' ? 'Meta' : 'Control';
await page.keyboard.press(`${modifier}+KeyC`);
// Verify copy success (toast message)
await expect(page.getByText(/Request copied/i).first()).toBeVisible();
// Focus the collection to paste
await collection.click();
await collection.focus();
// Use Cmd+V on Mac, Ctrl+V on Windows/Linux
await page.keyboard.press(`${modifier}+KeyV`);
// Verify paste success
await expect(page.getByText(/pasted successfully/i).first()).toBeVisible();
// Verify the pasted request appears
await expect(page.locator('.collection-item-name').filter({ hasText: 'test-request' })).toHaveCount(2);
});
test('should copy and paste folder using keyboard shortcuts', async ({ page }) => {
const collection = page.locator('.collection-name').filter({ hasText: 'keyboard-test' });
// Create a folder
await collection.hover();
await collection.locator('.collection-actions .icon').click();
await page.locator('.dropdown-item').filter({ hasText: 'New Folder' }).click();
await page.locator('#folder-name').fill('test-folder');
await page.getByRole('button', { name: 'Create' }).click();
const folder = page.locator('.collection-item-name').filter({ hasText: 'test-folder' });
await expect(folder).toBeVisible();
// Focus the folder
await folder.click();
await folder.focus();
// Wait for keyboard focus indicator
await expect(folder).toHaveClass(/item-keyboard-focused/);
// Use keyboard shortcut to copy
const modifier = process.platform === 'darwin' ? 'Meta' : 'Control';
await page.keyboard.press(`${modifier}+KeyC`);
// Verify copy success
await expect(page.getByText(/Folder copied/i).first()).toBeVisible();
// Focus the collection to paste
await collection.click();
await collection.focus();
// Use keyboard shortcut to paste
await page.keyboard.press(`${modifier}+KeyV`);
// Verify paste success
await expect(page.getByText(/pasted successfully/i).first()).toBeVisible();
// Verify the pasted folder appears
await expect(page.locator('.collection-item-name').filter({ hasText: 'test-folder' })).toHaveCount(2);
});
});

File diff suppressed because it is too large Load Diff

View File

@@ -450,7 +450,7 @@ const createFolder = async (
}
await locators.dropdown.item('New Folder').click();
await page.getByTestId('new-folder-input').fill(folderName);
await page.getByPlaceholder('Folder Name').fill(folderName);
await locators.modal.button('Create').click();
await expect(locators.sidebar.folder(folderName)).toBeVisible();
});