1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import React from "react";
6 import { ContextMenu } from "./context-menu";
7 import { ShareIcon } from "../icon/icon";
9 describe("<ContextMenu />", () => {
21 it("calls onItemClick with clicked action", () => {
22 const onItemClick = cy.spy().as("onItemClick")
24 anchorEl={document.createElement("div")}
27 onItemClick={onItemClick}
29 cy.get('div[role=button]').eq(2).click();
30 cy.get('@onItemClick').should('have.been.calledWith', items[1][0]);