From 96c1382a21db174f8dac9d8293e3e6f48cb35cfd Mon Sep 17 00:00:00 2001 From: Georgel Pop Date: Thu, 7 Nov 2024 13:40:02 +0100 Subject: [PATCH] LPD-32863 Adapt test, check that it works with Shift key when range multiselect is on --- .../topper.spec.ts | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/modules/test/playwright/tests/layout-content-page-editor-web/topper.spec.ts b/modules/test/playwright/tests/layout-content-page-editor-web/topper.spec.ts index 8e3b406f6ce0e6..ed08dc5a283ffc 100644 --- a/modules/test/playwright/tests/layout-content-page-editor-web/topper.spec.ts +++ b/modules/test/playwright/tests/layout-content-page-editor-web/topper.spec.ts @@ -133,12 +133,32 @@ test( await pageEditorPage.selectFragment(headingId); - // Check that when multiple selection is on the class is present + // Check that when simple multiple selection is on the class is present await page.keyboard.down('Control'); await expect( page.locator('.page-editor__topper.not-allowed').first() ).toBeVisible(); + + await page.keyboard.up('Control'); + + await expect( + page.locator('.page-editor__topper.not-allowed').first() + ).not.toBeVisible(); + + // Check that when range multiple selection is on the class is present + + await page.keyboard.down('Shift'); + + await expect( + page.locator('.page-editor__topper.not-allowed').first() + ).toBeVisible(); + + await page.keyboard.up('Shift'); + + await expect( + page.locator('.page-editor__topper.not-allowed').first() + ).not.toBeVisible(); } );