Skip to content
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
12 changes: 6 additions & 6 deletions tests/e2e/specs/graphDetails.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ test.describe('Graph Details - Compare Mode', () => {
// Ctrl+Click second commit to multi-select
const secondCommit = graphWebview.getByText('Add utils module', { exact: true }).first();
await expect(secondCommit).toBeVisible({ timeout: MaxTimeout });
await secondCommit.click({ modifiers: ['Control'] });
await secondCommit.click({ modifiers: ['ControlOrMeta'] });

// Compare panel should appear with its header
const compareHeader = graphWebview.locator('.compare-header__title').first();
Expand All @@ -465,7 +465,7 @@ test.describe('Graph Details - Compare Mode', () => {
await selectCommitByMessage(graphWebview, 'Add greeting module');
await waitForDetailsLoaded(graphWebview);
const secondCommit = graphWebview.getByText('Add utils module', { exact: true }).first();
await secondCommit.click({ modifiers: ['Control'] });
await secondCommit.click({ modifiers: ['ControlOrMeta'] });

// Wait for compare panel
await expect(graphWebview.locator('.compare-header__title').first()).toBeVisible({ timeout: 15000 });
Expand All @@ -481,7 +481,7 @@ test.describe('Graph Details - Compare Mode', () => {
await selectCommitByMessage(graphWebview, 'Add greeting module');
await waitForDetailsLoaded(graphWebview);
const secondCommit = graphWebview.getByText('Add utils module', { exact: true }).first();
await secondCommit.click({ modifiers: ['Control'] });
await secondCommit.click({ modifiers: ['ControlOrMeta'] });

await expect(graphWebview.locator('.compare-header__title').first()).toBeVisible({ timeout: 15000 });

Expand All @@ -502,7 +502,7 @@ test.describe('Graph Details - Compare Mode', () => {
await selectCommitByMessage(graphWebview, 'Add greeting module');
await waitForDetailsLoaded(graphWebview);
const secondCommit = graphWebview.getByText('Add utils module', { exact: true }).first();
await secondCommit.click({ modifiers: ['Control'] });
await secondCommit.click({ modifiers: ['ControlOrMeta'] });

await expect(graphWebview.locator('.compare-header__title').first()).toBeVisible({ timeout: 15000 });

Expand All @@ -516,7 +516,7 @@ test.describe('Graph Details - Compare Mode', () => {
await selectCommitByMessage(graphWebview, 'Add greeting module');
await waitForDetailsLoaded(graphWebview);
const secondCommit = graphWebview.getByText('Add utils module', { exact: true }).first();
await secondCommit.click({ modifiers: ['Control'] });
await secondCommit.click({ modifiers: ['ControlOrMeta'] });

await expect(graphWebview.locator('.compare-header__title').first()).toBeVisible({ timeout: 15000 });

Expand All @@ -532,7 +532,7 @@ test.describe('Graph Details - Compare Mode', () => {
await selectCommitByMessage(graphWebview, 'Add greeting module');
await waitForDetailsLoaded(graphWebview);
const secondCommit = graphWebview.getByText('Add utils module', { exact: true }).first();
await secondCommit.click({ modifiers: ['Control'] });
await secondCommit.click({ modifiers: ['ControlOrMeta'] });

await expect(graphWebview.locator('.compare-header__title').first()).toBeVisible({ timeout: 15000 });

Expand Down
3 changes: 2 additions & 1 deletion tests/e2e/specs/graphHeader.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ test.describe('Graph — Header menus', () => {
const webview = await openGraph(vscode);

// No integration is connected in the test environment, so the indicator advertises that.
const launchpadButton = webview.locator('button[aria-label^="Launchpad"]').first();
// The indicator's anchor is an <a href> (click opens Launchpad directly), not a <button>.
const launchpadButton = webview.locator('.action-button[aria-label^="Launchpad"]').first();
await expect(launchpadButton).toBeVisible({ timeout: MaxTimeout });
await expect(launchpadButton).toHaveAttribute('aria-label', /connect an integration/i);

Expand Down
20 changes: 20 additions & 0 deletions tests/e2e/specs/graphPin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,24 @@ async function getPinnedWebviewItem(webview: FrameLocator): Promise<string | nul
return JSON.parse(json) as string | null;
}

/**
* Collapse the details panel if it is open. The panel auto-opens at the bottom of the graph
* (WIP initial selection + vertical layout), and in the short E2E panel it squeezes the row
* grid to near-zero height — the virtualizer then paints no branch rows, so ref-pill
* `data-vscode-context` assertions can never match. Closing it gives the grid the height to
* actually render the rows.
*/
async function ensureDetailsPanelClosed(webview: FrameLocator): Promise<void> {
const toggle = webview.locator('gl-button[aria-label$="Details Panel"]').first();
await expect(toggle).toBeVisible({ timeout: 15000 });
if ((await toggle.getAttribute('aria-label')) === 'Hide Details Panel') {
await toggle.click();
Comment thread
sergeibbb marked this conversation as resolved.
await expect(webview.locator('gl-button[aria-label="Show Details Panel"]').first()).toBeVisible({
timeout: 15000,
});
}
}

const test = base.extend({
vscodeOptions: [
{
Expand Down Expand Up @@ -168,6 +186,8 @@ test.describe('Graph — Pin Branch to Edge', () => {
// Verify the webviewItem context includes +pinned (rows re-processed after pin).
// The row re-send (updateState) arrives separately from — and later than — the
// pinnedRef state update above, so poll until the row context picks up +pinned.
// The branch rows must actually be painted for the context to exist in the DOM.
await ensureDetailsPanelClosed(graphWebview!);
await expect.poll(() => getPinnedWebviewItem(graphWebview!), { timeout: 15000 }).toContain('+pinned');
});

Expand Down
9 changes: 6 additions & 3 deletions tests/e2e/specs/graphReview.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,12 @@ test.describe('Review & Compose Sub-Panels', () => {
const branchRow = graphWebview.locator('.graph-details-header__branch-row');
await expect(branchRow).toBeVisible({ timeout: 30000 });

// Create branch icon should be in branch row
const createBranchChip = branchRow.locator('gl-action-chip[icon="custom-start-work"]');
await expect(createBranchChip).toBeVisible();
// Branch actions kebab (hosts the Create Branch... context menu, replacing the old
// standalone create-branch chip) should be in branch row
const branchActionsChip = branchRow.locator(
'gl-action-chip[icon="kebab-vertical"][label="Show Branch Actions"]',
);
await expect(branchActionsChip).toBeVisible();

// Review/compose chips should NOT be in branch row
const reviewInBranch = branchRow.locator('gl-action-chip[icon="checklist"]');
Expand Down
8 changes: 4 additions & 4 deletions tests/e2e/specs/rebase.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ test.describe('Editor — Core', () => {

// Test bulk action change: multi-select with Ctrl+Click then drop with 'd'
await entries.nth(2).click();
await entries.nth(3).click({ modifiers: ['Control'] });
await entries.nth(3).click({ modifiers: ['ControlOrMeta'] });
await page.keyboard.press('d');
await page.waitForTimeout(ShortTimeout / 2);
await expect(entries.nth(2).locator('.action-select')).toHaveAttribute('value', 'drop');
Expand Down Expand Up @@ -287,7 +287,7 @@ test.describe('Editor — Core', () => {

// Select oldest then newest (so newest is focused)
await oldestEntry.click();
await newestEntry.click({ modifiers: ['Control'] });
await newestEntry.click({ modifiers: ['ControlOrMeta'] });

// Press 's' to squash selection
await page.keyboard.press('s');
Expand Down Expand Up @@ -374,7 +374,7 @@ test.describe('Editor — Core', () => {

// Test moving commits down: Select 2nd and 3rd entries (Commit C and Commit B)
await entries.nth(1).click();
await entries.nth(2).click({ modifiers: ['Control'] });
await entries.nth(2).click({ modifiers: ['ControlOrMeta'] });
await page.keyboard.press('Alt+ArrowDown');
await page.waitForTimeout(ShortTimeout / 2);

Expand All @@ -395,7 +395,7 @@ test.describe('Editor — Core', () => {

// Test moving commits up: Select repositioned Commit C and Commit B (now at indices 2 and 3)
await entries.nth(2).click();
await entries.nth(3).click({ modifiers: ['Control'] });
await entries.nth(3).click({ modifiers: ['ControlOrMeta'] });
await page.keyboard.press('Alt+ArrowUp');
await page.waitForTimeout(ShortTimeout / 2);

Expand Down
Loading