[MM-61570]: Refactored the post priority menu and fixed the keyboard navigation issue in the menu. (#29583)

* [MA-7]: Refactored the post priority menu and fixed the keyboard navigation issue in the menu

* [MA-7]: Updated the menu list structure and fixed menu not closing bug

* [MA-7]: Review fixes minor code structure fixes

* [MA-7]: Fixed failing e2e test cases

* [MA-7]: Fixed styling and Keyboard behaviour of menu

* [MA-7]: Minor changes after rebased with master

* [MA-7]: Fixed failing playwright test case

* [MA-7]: Fixed failing e2e test cases

* [MA-7]: Fixed reverting of selected priority to previous value on menu close

* [MA-7]: Fixed failing smoke test

* [MA-7]: Fixed submenu pointer event and failing playwright test cases

* [MA-7]: Fixed failing playwright test case

* fix playwright tests

* fix playwright tests

---------

Co-authored-by: yasserfaraazkhan <attitude3cena.yf@gmail.com>
Этот коммит содержится в:
ayush-chauhan233
2025-02-20 03:00:22 +05:30
коммит произвёл GitHub
родитель d76e0b9d3d
Коммит 102e3472d8
17 изменённых файлов: 371 добавлений и 452 удалений

Просмотреть файл

@@ -42,25 +42,21 @@ test('Post actions tab support', async ({pw, axe}) => {
await post.postMenu.toBeVisible();
// # Open the dot menu
await post.postMenu.dotMenuButton.click();
await post.postMenu.dotMenuButton.press('Enter');
// * Dot menu should be visible and have focused
await channelsPage.postDotMenu.toBeVisible();
await expect(channelsPage.postDotMenu.container).toBeFocused();
await expect(channelsPage.postDotMenu.replyMenuItem).toBeFocused();
// # Analyze the page
const accessibilityScanResults = await axe
.builder(page, {disableColorContrast: true})
.include('.MuiMenu-list')
.include('.MuiList-root.MuiList-padding')
.analyze();
// * Should have no violation
expect(accessibilityScanResults.violations).toHaveLength(0);
// * Should move focus to Reply after arrow down
await channelsPage.postDotMenu.container.press('ArrowDown');
await expect(channelsPage.postDotMenu.replyMenuItem).toBeFocused();
// * Should move focus to Forward after arrow down
await channelsPage.postDotMenu.replyMenuItem.press('ArrowDown');
await expect(channelsPage.postDotMenu.forwardMenuItem).toBeFocused();