mirror of
https://github.com/go-gitea/gitea.git
synced 2026-07-09 19:00:02 +00:00
`data-render-name` is set before the plugin's async render runs, so measuring the container height right after the attribute appears can observe the pre-render 48px height when the `pdfobject` chunk loads slowly (flaked in CI). Poll for the height instead, like the asciicast test in the same file does.
import {env} from 'node:process';
import {test, expect} from '@playwright/test';
import {apiCreateRepo, randomString} from './utils.ts';
test('repo readme', async ({page}) => {
const repoName = `e2e-readme-${randomString(8)}`;
await apiCreateRepo(page.request, {name: repoName});
await page.goto(`/${env.GITEA_TEST_E2E_USER}/${repoName}`);
await expect(page.locator('#readme')).toContainText(repoName);
});