✅(frontend) enhance document grid tests and component interactions
- Updated test cases to replace 'docs-grid-loader' with 'grid-loader' for improved consistency across document grid tests. - Refactored document interaction tests to utilize the 'docs-grid' locator for better readability and maintainability. - Enhanced document table content tests by refining element selection methods for improved clarity and performance. - Cleaned up test code to ensure better structure and maintainability.
This commit is contained in:
committed by
Anthony LC
parent
f02dcae52a
commit
8eb2b60937
@@ -19,34 +19,9 @@ test.describe('Doc Table Content', () => {
|
||||
|
||||
await verifyDocName(page, randomDoc);
|
||||
|
||||
const editor = page.locator('.ProseMirror');
|
||||
await page.locator('.ProseMirror').click();
|
||||
|
||||
await editor.locator('.bn-block-outer').last().fill('/');
|
||||
|
||||
await page.getByText('Heading 1').click();
|
||||
await page.keyboard.type('Level 1');
|
||||
await editor.getByText('Level 1').dblclick();
|
||||
await page.getByRole('button', { name: 'Strike' }).click();
|
||||
|
||||
await page.locator('.bn-block-outer').first().click();
|
||||
await editor.click();
|
||||
await page.locator('.bn-block-outer').last().click();
|
||||
await page.keyboard.press('Enter');
|
||||
|
||||
await editor.locator('.bn-block-outer').last().fill('/');
|
||||
await page.getByText('Heading 2').click();
|
||||
await page.keyboard.type('Level 2');
|
||||
|
||||
await page.locator('.bn-block-outer').last().click();
|
||||
|
||||
// Create space to fill the viewport
|
||||
await page.keyboard.press('Enter');
|
||||
|
||||
await editor.locator('.bn-block-outer').last().fill('/');
|
||||
await page.getByText('Heading 3').click();
|
||||
await page.keyboard.type('Level 3');
|
||||
|
||||
expect(true).toBe(true);
|
||||
await page.keyboard.type('# Level 1\n## Level 2\n### Level 3');
|
||||
|
||||
const summaryContainer = page.locator('#summaryContainer');
|
||||
await summaryContainer.click();
|
||||
|
||||
Reference in New Issue
Block a user