Cover Files inline rename validation
This commit is contained in:
@@ -95,6 +95,23 @@ test.describe('G: Files Plugin', () => {
|
||||
await expect(page.locator('.files-breadcrumb')).not.toContainText('Daily');
|
||||
});
|
||||
|
||||
test('files explorer shows inline rename validation errors', async ({ page }) => {
|
||||
await page.locator('.wt-label').filter({ hasText: 'Project' }).click();
|
||||
await openFilesTool(page);
|
||||
await expect(page.locator('.files-breadcrumb')).toContainText('Project', { timeout: 10000 });
|
||||
|
||||
await page.locator('[data-file-name="project-only.txt"]').click();
|
||||
await page.locator('[data-files-action="rename"]').click();
|
||||
await page.locator('[data-files-rename-input]').fill('bad/name.txt');
|
||||
await page.locator('[data-files-rename-confirm]').click();
|
||||
|
||||
await expect(page.locator('[data-files-rename-error]')).toBeVisible();
|
||||
await expect(page.locator('[data-files-rename-error]')).toContainText('Invalid characters');
|
||||
await expect(page.locator('[data-files-rename-input]')).toBeVisible();
|
||||
await expect(page.locator('[data-file-name="project-only.txt"]')).toBeVisible();
|
||||
await expect(page.locator('[data-file-name="bad"]')).toHaveCount(0);
|
||||
});
|
||||
|
||||
test('files explorer uses labeled controls and no row New Here action', async ({ page }) => {
|
||||
await page.locator('.wt-label').filter({ hasText: 'Project' }).click();
|
||||
await openFilesTool(page);
|
||||
|
||||
Reference in New Issue
Block a user