mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Try making UI unit testable in Ubuntu by removing usage of component which uses an experimental browser feature
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
parent
550abfcc0d
commit
d592848a7f
@ -55,16 +55,6 @@ describe("kube-object-menu", () => {
|
|||||||
|
|
||||||
render = renderFor(di);
|
render = renderFor(di);
|
||||||
|
|
||||||
// TODO: Remove illegal global overwrites for what should be a dependency somewhere.
|
|
||||||
// TODO: Remove usage of experimental browser API.
|
|
||||||
window.requestIdleCallback = (callback: IdleRequestCallback): number => {
|
|
||||||
callback(undefined);
|
|
||||||
|
|
||||||
return undefined;
|
|
||||||
};
|
|
||||||
|
|
||||||
window.cancelIdleCallback = () => {};
|
|
||||||
|
|
||||||
di.override(clusterInjectable, {
|
di.override(clusterInjectable, {
|
||||||
name: "Some name",
|
name: "Some name",
|
||||||
});
|
});
|
||||||
|
|||||||
@ -30,7 +30,6 @@ import { Icon, IconProps } from "../icon";
|
|||||||
import { Menu, MenuItem, MenuProps } from "../menu";
|
import { Menu, MenuItem, MenuProps } from "../menu";
|
||||||
import uniqueId from "lodash/uniqueId";
|
import uniqueId from "lodash/uniqueId";
|
||||||
import isString from "lodash/isString";
|
import isString from "lodash/isString";
|
||||||
import { RenderDelay } from "../render-delay/render-delay";
|
|
||||||
|
|
||||||
export interface MenuActionsProps extends Partial<MenuProps> {
|
export interface MenuActionsProps extends Partial<MenuProps> {
|
||||||
className?: string;
|
className?: string;
|
||||||
@ -125,7 +124,7 @@ export class MenuActions extends React.Component<MenuActionsProps> {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{this.renderTriggerIcon()}
|
{this.renderTriggerIcon()}
|
||||||
<RenderDelay>
|
|
||||||
<Menu
|
<Menu
|
||||||
htmlFor={this.id}
|
htmlFor={this.id}
|
||||||
isOpen={this.isOpen} open={this.toggle} close={this.toggle}
|
isOpen={this.isOpen} open={this.toggle} close={this.toggle}
|
||||||
@ -150,7 +149,6 @@ export class MenuActions extends React.Component<MenuActionsProps> {
|
|||||||
</MenuItem>
|
</MenuItem>
|
||||||
)}
|
)}
|
||||||
</Menu>
|
</Menu>
|
||||||
</RenderDelay>
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user