fix(ui): prevent overflow of branch selector in commit graph

This commit is contained in:
Beowulf 2025-01-19 00:25:31 +01:00
parent d68e0d3e39
commit 3d3ffaf5cb
No known key found for this signature in database
GPG key ID: 44225F5F2792841D
2 changed files with 31 additions and 7 deletions

View file

@ -8,10 +8,27 @@ import {expect} from '@playwright/test';
import {save_visual, test} from './utils_e2e.ts';
test('Commit graph overflow', async ({page}) => {
await page.goto('/user2/diff-test/graph');
const response = await page.goto('/user2/repo1/graph');
expect(response?.status()).toBe(200);
await page.click('#flow-select-refs-dropdown');
const input = page.locator('#flow-select-refs-dropdown');
await input.press('Enter');
await input.press('Enter');
await input.press('Enter');
await input.press('Enter');
await input.press('Enter');
await input.press('Enter');
await input.press('Enter');
await input.press('Enter');
await input.press('Enter');
await input.press('Enter');
await expect(page.locator('#flow-select-refs-dropdown')).toBeInViewport({ratio: 1});
await expect(page.getByRole('button', {name: 'Mono'})).toBeInViewport({ratio: 1});
await expect(page.getByRole('button', {name: 'Color'})).toBeInViewport({ratio: 1});
await expect(page.locator('.selection.search.dropdown')).toBeInViewport({ratio: 1});
await save_visual(page);
});
test('Switch branch', async ({page}) => {