1
0
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:
Jari Kolehmainen 2021-04-12 10:26:29 +03:00
parent 24fc11420f
commit e65b182a0d
3 changed files with 8 additions and 7 deletions

View File

@ -39,7 +39,10 @@ export function minikubeReady(testNamespace: string): boolean {
}
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.click("div.Select__control"); // show the context drop-down list
await app.client.waitUntilTextExists("div", "minikube");

View File

@ -19,10 +19,8 @@ export class CatalogAddButton extends React.Component<CatalogAddButtonProps> {
protected menuItems = observable.array<CatalogEntityContextMenu>([]);
componentDidMount() {
const { category } = this.props;
disposeOnUnmount(this, [
reaction(() => category, (category) => {
reaction(() => this.props.category, (category) => {
this.menuItems.clear();
if (category && category instanceof EventEmitter) {
@ -65,8 +63,8 @@ export class CatalogAddButton extends React.Component<CatalogAddButtonProps> {
{ this.menuItems.map((menuItem, index) => {
return <SpeedDialAction
key={index}
icon={<Icon material="text_snippet" />}
tooltipTitle="Import Kubeconfig"
icon={<Icon material={menuItem.icon} />}
tooltipTitle={menuItem.title}
onClick={() => menuItem.onClick()}
/>;
})}

View File

@ -161,7 +161,7 @@ export class Catalog extends React.Component {
provideBackButtonNavigation={false}
contentGaps={false}>
<ItemListLayout
renderHeaderTitle="Catalog"
renderHeaderTitle={this.catalogEntityStore.activeCategory?.metadata.name}
isClusterScoped
isSearchable={true}
isSelectable={false}