mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fixin tests harder
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
d0078519cb
commit
303160161c
@ -36,7 +36,7 @@ describe("Lens integration tests", () => {
|
||||
|
||||
it('shows "add cluster"', async () => {
|
||||
await app.electron.ipcRenderer.send("test-menu-item-click", "File", "Add Cluster");
|
||||
await app.client.waitUntilTextExists("h2", "Add Cluster");
|
||||
await app.client.waitUntilTextExists("h2", "Add Clusters from Kubeconfig");
|
||||
});
|
||||
|
||||
describe("preferences page", () => {
|
||||
@ -44,17 +44,17 @@ describe("Lens integration tests", () => {
|
||||
const appName: string = process.platform === "darwin" ? "Lens" : "File";
|
||||
|
||||
await app.electron.ipcRenderer.send("test-menu-item-click", appName, "Preferences");
|
||||
await app.client.waitUntilTextExists(".PageLayout h2", "Application");
|
||||
await app.client.waitUntilTextExists("[data-testid=application-header]", "APPLICATION");
|
||||
});
|
||||
|
||||
it("shows all tabs and their contents", async () => {
|
||||
await app.client.click("[data-testid=application-tab]");
|
||||
await app.client.click("[data-testid=proxy-tab]");
|
||||
await app.client.waitUntilTextExists(".PageLayout h2", "Proxy");
|
||||
await app.client.waitUntilTextExists("[data-testid=proxy-header]", "PROXY");
|
||||
await app.client.click("[data-testid=kube-tab]");
|
||||
await app.client.waitUntilTextExists(".PageLayout h2", "Kubernetes");
|
||||
await app.client.waitUntilTextExists("[data-testid=kubernetes-header]", "KUBERNETES");
|
||||
await app.client.click("[data-testid=telemetry-tab]");
|
||||
await app.client.waitUntilTextExists(".PageLayout h2", "Telemetry");
|
||||
await app.client.waitUntilTextExists("[data-testid=telemetry-header]", "TELEMETRY");
|
||||
});
|
||||
|
||||
it("ensures helm repos", async () => {
|
||||
|
||||
@ -80,7 +80,7 @@ export async function appStart() {
|
||||
export async function clickWhatsNew(app: Application) {
|
||||
await app.client.waitUntilTextExists("h1", "What's new?");
|
||||
await app.client.click("button.primary");
|
||||
await app.client.waitUntilTextExists("h2", "default");
|
||||
await app.client.waitUntilTextExists("h5", "Clusters");
|
||||
}
|
||||
|
||||
export async function clickWelcomeNotification(app: Application) {
|
||||
@ -89,7 +89,7 @@ export async function clickWelcomeNotification(app: Application) {
|
||||
if (itemsText === "0 item") {
|
||||
// welcome notification should be present, dismiss it
|
||||
await app.client.waitUntilTextExists("div.message", "Welcome!");
|
||||
await app.client.click("i.Icon.close");
|
||||
await app.client.click(".notification i.Icon.close");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -114,7 +114,7 @@ export class Preferences extends React.Component {
|
||||
>
|
||||
{this.activeTab == Pages.Application && (
|
||||
<section id="application">
|
||||
<h2>Application</h2>
|
||||
<h2 data-testid="application-header">Application</h2>
|
||||
<section id="appearance">
|
||||
<SubTitle title="Theme"/>
|
||||
<Select
|
||||
@ -158,7 +158,7 @@ export class Preferences extends React.Component {
|
||||
{this.activeTab == Pages.Proxy && (
|
||||
<section id="proxy">
|
||||
<section>
|
||||
<h2>Proxy</h2>
|
||||
<h2 data-testid="proxy-header">Proxy</h2>
|
||||
<SubTitle title="HTTP Proxy"/>
|
||||
<Input
|
||||
theme="round-black"
|
||||
@ -198,7 +198,7 @@ export class Preferences extends React.Component {
|
||||
{this.activeTab == Pages.Kubernetes && (
|
||||
<section id="kubernetes">
|
||||
<section id="kubectl">
|
||||
<h2>Kubernetes</h2>
|
||||
<h2 data-testid="kubernetes-header">Kubernetes</h2>
|
||||
<KubectlBinaries preferences={preferences}/>
|
||||
</section>
|
||||
<hr/>
|
||||
@ -211,7 +211,7 @@ export class Preferences extends React.Component {
|
||||
|
||||
{this.activeTab == Pages.Telemetry && (
|
||||
<section id="telemetry">
|
||||
<h2>Telemetry</h2>
|
||||
<h2 data-testid="telemetry-header">Telemetry</h2>
|
||||
{telemetryExtensions.map(this.renderExtension)}
|
||||
</section>
|
||||
)}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user