mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix integration tests
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
24fc11420f
commit
e65b182a0d
@ -39,7 +39,10 @@ export function minikubeReady(testNamespace: string): boolean {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function addMinikubeCluster(app: Application) {
|
export async function addMinikubeCluster(app: Application) {
|
||||||
await app.client.click("button.add-button");
|
await app.client.waitForVisible("button.MuiSpeedDial-fab");
|
||||||
|
await app.client.click("button.MuiSpeedDial-fab");
|
||||||
|
await app.client.waitForVisible(`button[title="Add from kubeconfig"]`);
|
||||||
|
await app.client.click(`button[title="Add from kubeconfig"]`);
|
||||||
await app.client.waitUntilTextExists("div", "Select kubeconfig file");
|
await app.client.waitUntilTextExists("div", "Select kubeconfig file");
|
||||||
await app.client.click("div.Select__control"); // show the context drop-down list
|
await app.client.click("div.Select__control"); // show the context drop-down list
|
||||||
await app.client.waitUntilTextExists("div", "minikube");
|
await app.client.waitUntilTextExists("div", "minikube");
|
||||||
|
|||||||
@ -19,10 +19,8 @@ export class CatalogAddButton extends React.Component<CatalogAddButtonProps> {
|
|||||||
protected menuItems = observable.array<CatalogEntityContextMenu>([]);
|
protected menuItems = observable.array<CatalogEntityContextMenu>([]);
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
const { category } = this.props;
|
|
||||||
|
|
||||||
disposeOnUnmount(this, [
|
disposeOnUnmount(this, [
|
||||||
reaction(() => category, (category) => {
|
reaction(() => this.props.category, (category) => {
|
||||||
this.menuItems.clear();
|
this.menuItems.clear();
|
||||||
|
|
||||||
if (category && category instanceof EventEmitter) {
|
if (category && category instanceof EventEmitter) {
|
||||||
@ -65,8 +63,8 @@ export class CatalogAddButton extends React.Component<CatalogAddButtonProps> {
|
|||||||
{ this.menuItems.map((menuItem, index) => {
|
{ this.menuItems.map((menuItem, index) => {
|
||||||
return <SpeedDialAction
|
return <SpeedDialAction
|
||||||
key={index}
|
key={index}
|
||||||
icon={<Icon material="text_snippet" />}
|
icon={<Icon material={menuItem.icon} />}
|
||||||
tooltipTitle="Import Kubeconfig"
|
tooltipTitle={menuItem.title}
|
||||||
onClick={() => menuItem.onClick()}
|
onClick={() => menuItem.onClick()}
|
||||||
/>;
|
/>;
|
||||||
})}
|
})}
|
||||||
|
|||||||
@ -161,7 +161,7 @@ export class Catalog extends React.Component {
|
|||||||
provideBackButtonNavigation={false}
|
provideBackButtonNavigation={false}
|
||||||
contentGaps={false}>
|
contentGaps={false}>
|
||||||
<ItemListLayout
|
<ItemListLayout
|
||||||
renderHeaderTitle="Catalog"
|
renderHeaderTitle={this.catalogEntityStore.activeCategory?.metadata.name}
|
||||||
isClusterScoped
|
isClusterScoped
|
||||||
isSearchable={true}
|
isSearchable={true}
|
||||||
isSelectable={false}
|
isSelectable={false}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user