update to document rename tests (#6413)

This commit is contained in:
James Gatz 2023-08-29 13:29:13 +02:00 committed by GitHub
parent a35e99bacf
commit a9f32d9241
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -99,7 +99,7 @@ test.describe('Dashboard', async () => {
await page.getByTestId('project').click();
// Rename document
await page.click('text=DocumentNew Documentjust now >> button');
await page.getByLabel('my-spec.yaml').getByRole('button').click();
await page.getByRole('menuitem', { name: 'Rename' }).click();
await page.locator('text=Rename DocumentName Rename >> input[type="text"]').fill('test123');
await page.click('#root button:has-text("Rename")');

View File

@ -1,11 +1,12 @@
import { expect } from '@playwright/test';
import { test } from '../../playwright/test';
test('can name design documents', async ({ page }) => {
await page.getByRole('button', { name: ' New Document' }).click();
await page.getByPlaceholder('my-spec.yaml').fill('jurassic park');
await page.getByPlaceholder('my-spec.yaml').press('Enter');
await page.getByLabel('jurassic park').click();
await page.getByRole('button', { name: 'jurassic park ' }).press('Escape');
expect(page.getByRole('button', { name: 'jurassic park' })).toHaveText('jurassic park');
await page.getByTestId('project').click();
await page.getByLabel('jurassic park').click();
});