mirror of
https://github.com/nasa/openmct.git
synced 2025-05-30 14:14:19 +00:00
[Browse] Update tests
Removed reference to destroy() in the context menu action test. #33, #47.
This commit is contained in:
parent
1455e5d8b5
commit
aa091a9d26
@ -135,23 +135,6 @@ define(
|
|||||||
// Listener should have been detached from body
|
// Listener should have been detached from body
|
||||||
expect(mockBody.off).toHaveBeenCalled();
|
expect(mockBody.off).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
|
||||||
it("removes listeners from body if destroyed while menu is showing", function () {
|
|
||||||
// Show the menu
|
|
||||||
action.perform();
|
|
||||||
|
|
||||||
// Verify preconditions
|
|
||||||
expect(mockBody.off).not.toHaveBeenCalled();
|
|
||||||
expect(mockMenu.remove).not.toHaveBeenCalled();
|
|
||||||
|
|
||||||
// Destroy the menu
|
|
||||||
action.destroy();
|
|
||||||
|
|
||||||
// Verify menu was removed and listener detached
|
|
||||||
expect(mockBody.off).toHaveBeenCalled();
|
|
||||||
expect(mockMenu.remove).toHaveBeenCalled();
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
Loading…
x
Reference in New Issue
Block a user