mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Extensible welcome page (#2637)
* welcome/landing page Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com> * fix integration tests Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
1 parent
1f854d0a0f
commit
b1274cbb33
22 files changed
+147
-820
No files matched your search
@@ -30,10 +30,6 @@ describe("Lens integration tests", () => {
|
||||
}
|
||||
});
|
||||
|
||||
it('shows "whats new"', async () => {
|
||||
await utils.clickWhatsNew(app);
|
||||
});
|
||||
|
||||
it('shows "add cluster"', async () => {
|
||||
await app.electron.ipcRenderer.send("test-menu-item-click", "File", "Add Cluster");
|
||||
await app.client.waitUntilTextExists("h2", "Add Clusters from Kubeconfig");
|
||||
|
||||
@@ -24,8 +24,6 @@ describe("Lens cluster pages", () => {
|
||||
utils.describeIf(ready)("test common pages", () => {
|
||||
let clusterAdded = false;
|
||||
const addCluster = async () => {
|
||||
await utils.clickWhatsNew(app);
|
||||
await utils.clickWelcomeNotification(app);
|
||||
await app.client.waitUntilTextExists("div", "Catalog");
|
||||
await addMinikubeCluster(app);
|
||||
await waitForMinikubeDashboard(app);
|
||||
|
||||
@@ -18,7 +18,6 @@ describe("Lens command palette", () => {
|
||||
});
|
||||
|
||||
it("opens command dialog from menu", async () => {
|
||||
await utils.clickWhatsNew(app);
|
||||
await app.electron.ipcRenderer.send("test-menu-item-click", "View", "Command Palette...");
|
||||
await app.client.waitUntilTextExists(".Select__option", "Preferences: Open");
|
||||
await app.client.keys("Escape");
|
||||
|
||||
@@ -73,24 +73,14 @@ export async function appStart() {
|
||||
while (await app.client.getWindowCount() > 1);
|
||||
await app.client.windowByIndex(0);
|
||||
await app.client.waitUntilWindowLoaded();
|
||||
await showCatalog(app);
|
||||
|
||||
return app;
|
||||
}
|
||||
|
||||
export async function clickWhatsNew(app: Application) {
|
||||
await app.client.waitUntilTextExists("h1", "What's new?");
|
||||
await app.client.click("button.primary");
|
||||
await app.client.waitUntilTextExists("div", "Catalog");
|
||||
}
|
||||
|
||||
export async function clickWelcomeNotification(app: Application) {
|
||||
const itemsText = await app.client.$("div.info-panel").getText();
|
||||
|
||||
if (itemsText === "0 items") {
|
||||
// welcome notification should be present, dismiss it
|
||||
await app.client.waitUntilTextExists("div.message", "Welcome!");
|
||||
await app.client.click(".notification i.Icon.close");
|
||||
}
|
||||
export async function showCatalog(app: Application) {
|
||||
await app.client.waitUntilTextExists("[data-test-id=catalog-link]", "Catalog");
|
||||
await app.client.click("[data-test-id=catalog-link]");
|
||||
}
|
||||
|
||||
type AsyncPidGetter = () => Promise<number>;
|
||||
|
||||
Reference in new issue
Block a user