Skip to content

Commit dc7a304

Browse files
committed
test delete suggestion before accepting suggestion
1 parent f5be9e5 commit dc7a304

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

ui-tests/tests/ui.spec.ts

+14-14
Original file line numberDiff line numberDiff line change
@@ -384,47 +384,47 @@ test.describe('UI Test', () => {
384384
});
385385

386386
test.describe('Suggestion Panel test', () => {
387-
test(`Test Accept Suggestion`, async ({ page }) => {
387+
test(`Test Delete Suggestion`, async ({ page }) => {
388388
await page.goto();
389-
389+
390390
const fileName = 'test.jcad';
391391
const fullPath = `examples/${fileName}`;
392392
await page.notebook.openByPath(fullPath);
393393
await page.notebook.activate(fullPath);
394394
await page.locator('div.jpcad-Spinner').waitFor({ state: 'hidden' });
395-
395+
396396
// Activate Right Panel
397397
await page.locator('li#tab-key-1-7').click();
398398
await page.getByTitle('Create new fork').click();
399399
await page.locator('div.jp-Dialog-buttonLabel[aria-label="Ok"]').click();
400-
400+
401401
// Select cone
402402
await page
403403
.locator('[data-test-id="react-tree-root"]')
404404
.getByText('Cone 1')
405405
.click();
406-
406+
407407
await page.locator('input#root_Height').click();
408408
await page.locator('input#root_Height').fill('20');
409-
409+
410410
await page
411411
.locator('div.jp-Dialog-buttonLabel', {
412412
hasText: 'Submit'
413413
})
414414
.click();
415-
416-
await page.getByTitle('Accept suggestion').click();
415+
416+
await page.getByTitle('Delete suggestion').click();
417417
await page.locator('div.jp-Dialog-buttonLabel[aria-label="Ok"]').click();
418-
418+
419419
let main = await page.$('#jp-main-split-panel');
420420
if (main) {
421421
expect(await main.screenshot()).toMatchSnapshot({
422-
name: `JCAD-Accept-Suggestion.png`
422+
name: `JCAD-Delete-Suggestion.png`
423423
});
424424
}
425425
});
426-
427-
test(`Test Delete Suggestion`, async ({ page }) => {
426+
427+
test(`Test Accept Suggestion`, async ({ page }) => {
428428
await page.goto();
429429

430430
const fileName = 'test.jcad';
@@ -453,13 +453,13 @@ test.describe('UI Test', () => {
453453
})
454454
.click();
455455

456-
await page.getByTitle('Delete suggestion').click();
456+
await page.getByTitle('Accept suggestion').click();
457457
await page.locator('div.jp-Dialog-buttonLabel[aria-label="Ok"]').click();
458458

459459
let main = await page.$('#jp-main-split-panel');
460460
if (main) {
461461
expect(await main.screenshot()).toMatchSnapshot({
462-
name: `JCAD-Delete-Suggestion.png`
462+
name: `JCAD-Accept-Suggestion.png`
463463
});
464464
}
465465
});

0 commit comments

Comments
 (0)