1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-08-05 09:55:20 +02:00

fix: WIP toggle by reducing max issue title

- when the PR title has the maximum length, the WIP toggle switch does nothing
- work around this by slightly reducing the max input size (- 10 characters for eventually long prefixes)
- test WIP toggling edge case in playwright

fix(e2e): increase timeouts

A look at recent runs suggests they should be increased globally. The timeouts in the config file have no timeout by default.
This commit is contained in:
Otto Richter 2024-08-27 15:36:39 +02:00
parent 8d0530650e
commit 7eac5feb74
4 changed files with 20 additions and 3 deletions

View file

@ -51,6 +51,22 @@ test('Pull: Toggle WIP', async ({browser}, workerInfo) => {
// remove again
await click_toggle_wip({page});
await check_wip({page}, false);
// check maximum title length is handled gracefully
const maxLenStr = prTitle + 'a'.repeat(240);
await page.locator('#issue-title-edit-show').click();
await page.locator('#issue-title-editor input').fill(maxLenStr);
await page.getByText('Save').click();
await page.waitForLoadState('networkidle');
await click_toggle_wip({page});
await check_wip({page}, true);
await click_toggle_wip({page});
await check_wip({page}, false);
await expect(page.locator('h1')).toContainText(maxLenStr);
// restore original title
await page.locator('#issue-title-edit-show').click();
await page.locator('#issue-title-editor input').fill(prTitle);
await page.getByText('Save').click();
await check_wip({page}, false);
});
test('Issue: Labels', async ({browser}, workerInfo) => {