mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix integration tests
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
parent
c6367f9797
commit
0350fa53ff
@ -364,9 +364,11 @@ utils.describeIf(minikubeReady(TEST_NAMESPACE))("Minikube based tests", () => {
|
||||
await kubeApiServerRow.click();
|
||||
await frame.waitForSelector(".Drawer", { state: "visible" });
|
||||
|
||||
const logButton = await frame.waitForSelector("ul.KubeObjectMenu li.MenuItem i.Icon span[data-icon-name='subject']");
|
||||
const podLogsIcon = await frame.waitForSelector(".Drawer .drawer-title .Icon >> text=subject");
|
||||
|
||||
await logButton.click();
|
||||
await podLogsIcon.click();
|
||||
|
||||
await frame.waitForSelector(".Dock.isOpen");
|
||||
|
||||
// Check if controls are available
|
||||
await frame.waitForSelector(".LogList .VirtualList");
|
||||
@ -433,31 +435,31 @@ utils.describeIf(minikubeReady(TEST_NAMESPACE))("Minikube based tests", () => {
|
||||
await frame.waitForTimeout(100_000);
|
||||
}
|
||||
|
||||
const inputField = await frame.waitForSelector(".CreateResource .MonacoEditor");
|
||||
const testPodName = "nginx-create-pod-test";
|
||||
const monacoEditor = await frame.waitForSelector(".DockTabContent .MonacoEditor");
|
||||
|
||||
await inputField.click();
|
||||
await inputField.type("apiVersion: v1", { delay: 10 });
|
||||
await inputField.press("Enter", { delay: 10 });
|
||||
await inputField.type("kind: Pod", { delay: 10 });
|
||||
await inputField.press("Enter", { delay: 10 });
|
||||
await inputField.type("metadata:", { delay: 10 });
|
||||
await inputField.press("Enter", { delay: 10 });
|
||||
await inputField.type(" name: nginx-create-pod-test", { delay: 10 });
|
||||
await inputField.press("Enter", { delay: 10 });
|
||||
await inputField.type(`namespace: ${TEST_NAMESPACE}`, { delay: 10 });
|
||||
await inputField.press("Enter", { delay: 10 });
|
||||
await inputField.press("Backspace", { delay: 10 });
|
||||
await inputField.type("spec:", { delay: 10 });
|
||||
await inputField.press("Enter", { delay: 10 });
|
||||
await inputField.type(" containers:", { delay: 10 });
|
||||
await inputField.press("Enter", { delay: 10 });
|
||||
await inputField.type("- name: nginx-create-pod-test", { delay: 10 });
|
||||
await inputField.press("Enter", { delay: 10 });
|
||||
await inputField.type(" image: nginx:alpine", { delay: 10 });
|
||||
await inputField.press("Enter", { delay: 10 });
|
||||
await monacoEditor.click();
|
||||
await monacoEditor.type("apiVersion: v1", { delay: 10 });
|
||||
await monacoEditor.press("Enter", { delay: 10 });
|
||||
await monacoEditor.type("kind: Pod", { delay: 10 });
|
||||
await monacoEditor.press("Enter", { delay: 10 });
|
||||
await monacoEditor.type("metadata:", { delay: 10 });
|
||||
await monacoEditor.press("Enter", { delay: 10 });
|
||||
await monacoEditor.type(` name: ${testPodName}`, { delay: 10 });
|
||||
await monacoEditor.press("Enter", { delay: 10 });
|
||||
await monacoEditor.type(`namespace: ${TEST_NAMESPACE}`, { delay: 10 });
|
||||
await monacoEditor.press("Enter", { delay: 10 });
|
||||
await monacoEditor.press("Backspace", { delay: 10 });
|
||||
await monacoEditor.type("spec:", { delay: 10 });
|
||||
await monacoEditor.press("Enter", { delay: 10 });
|
||||
await monacoEditor.type(" containers:", { delay: 10 });
|
||||
await monacoEditor.press("Enter", { delay: 10 });
|
||||
await monacoEditor.type(`- name: ${testPodName}`, { delay: 10 });
|
||||
await monacoEditor.press("Enter", { delay: 10 });
|
||||
await monacoEditor.type(" image: nginx:alpine", { delay: 10 });
|
||||
await monacoEditor.press("Enter", { delay: 10 });
|
||||
|
||||
await frame.click("button.Button >> text='Create & Close'");
|
||||
await frame.click("div.TableCell >> text=nginx-create-pod-test");
|
||||
await frame.waitForSelector("div.drawer-title-text >> text='Pod: nginx-create-pod-test'");
|
||||
await frame.click(".Dock .Button >> text='Create'");
|
||||
await frame.waitForSelector(`.TableCell >> text=${testPodName}`);
|
||||
}, 10*60*1000);
|
||||
});
|
||||
|
||||
@ -143,7 +143,7 @@ export class Logs extends React.Component<Props> {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="PodLogs flex column">
|
||||
<div className="PodLogs flex column box grow">
|
||||
{this.renderResourceSelector(data)}
|
||||
<LogList
|
||||
logs={logs}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user