2024-09-11 23:34:33 +03:00
|
|
|
// @watch start
|
|
|
|
// templates/repo/graph.tmpl
|
|
|
|
// web_src/css/features/gitgraph.css
|
|
|
|
// web_src/js/features/repo-graph.js
|
|
|
|
// @watch end
|
|
|
|
|
2024-08-15 00:34:36 +03:00
|
|
|
import {expect} from '@playwright/test';
|
2024-11-12 23:07:09 +03:00
|
|
|
import {test} from './utils_e2e.ts';
|
2024-07-07 20:59:32 +03:00
|
|
|
|
2024-09-11 23:34:33 +03:00
|
|
|
test('Commit graph overflow', async ({page}) => {
|
|
|
|
await page.goto('/user2/diff-test/graph');
|
|
|
|
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});
|
|
|
|
});
|
|
|
|
|
2024-11-12 23:07:09 +03:00
|
|
|
test('Switch branch', async ({page}) => {
|
2024-07-07 20:59:32 +03:00
|
|
|
const response = await page.goto('/user2/repo1/graph');
|
2024-10-23 17:22:25 +03:00
|
|
|
expect(response?.status()).toBe(200);
|
2024-07-07 20:59:32 +03:00
|
|
|
|
|
|
|
await page.click('#flow-select-refs-dropdown');
|
|
|
|
const input = page.locator('#flow-select-refs-dropdown');
|
|
|
|
await input.pressSequentially('develop', {delay: 50});
|
|
|
|
await input.press('Enter');
|
|
|
|
|
2024-11-12 23:07:09 +03:00
|
|
|
await page.waitForLoadState();
|
2024-07-07 20:59:32 +03:00
|
|
|
|
2024-07-22 21:03:32 +03:00
|
|
|
await expect(page.locator('#loading-indicator')).toBeHidden();
|
2024-07-07 20:59:32 +03:00
|
|
|
await expect(page.locator('#rel-container')).toBeVisible();
|
|
|
|
await expect(page.locator('#rev-container')).toBeVisible();
|
|
|
|
});
|