(In reply to Neha from comment #1)
I would like to work on this.
Can it be assigned to me?
Hello Neha, i'm going to assign the bug to you.
You can read http://docs.firefox-dev.tools/getting-started/ to setup the work environment. Make sure to choose "Artifact builds" when asked to as it's much faster.
Please feel free to ask any question, either here or on Slack.
For this bug, I think we can extend this test devtools/client/webconsole/test/mochitest/browser_console_context_menu_entries.js
You can run the test with
./mach test devtools/client/webconsole/test/mochitest/browser_console_context_menu_entries.js.
So here, we need to make sure that doing a right-click in the console input, in the Browser Console does show a context menu.
In the test, you can spot these lines:
menuPopup = await openContextMenu(hud, hud.jsterm.node || hud.jsterm.inputNode);
expectedContextMenu = [
"#editmenu-undo (editmenu-undo) [disabled]",
"#editmenu-delete (editmenu-delete) [disabled]",
"#editmenu-selectAll (editmenu-select-all) [disabled]",
"The context menu has the correct edit menu items");
Here we open the context menu (
openContextMenu) by clicking on a node (
hud.jsterm.node || hud.jsterm.inputNode).
The fix in Bug 1521049 was made to make sure that clicking a parent of those node works fine.
So here, we need to pick the parent to click on, for example
jsterm-input-container. We can do that using the
closest method of element (https://developer.mozilla.org/en-US/docs/Web/API/Element/closest).
Once we have this parent element, we can get the
menuPopup again using
openContextMenu with the new node. And then we need to check that the menu popup has everything we expect, which we can copy from what's in the test already (
expectedContextMenu is already built, we should check our menuPopup has the correct elements).
I hope everything is clear enough, if not, don't hesitate to ask questions :)