1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Use getByText from frame selector

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2022-12-02 13:27:50 +03:00
parent 8566ae8e9e
commit 4fbaa7f43f

View File

@ -189,8 +189,10 @@ describeIf(minikubeReady(TEST_NAMESPACE))("Minikube based tests", () => {
await frame.waitForSelector(".Dock.isOpen"); await frame.waitForSelector(".Dock.isOpen");
const logLine = await frame.waitForSelector("[data-testid=pod-log-list] [data-index='0']"); const logLine = await frame.waitForSelector("[data-testid=pod-log-list] [data-index='0']");
// @ts-ignore
const lineContents = logLine.getByText("text");
expect(logLine.asElement()).toHaveStyle({ "white-space": "nowrap" }); expect(lineContents).toHaveStyle({ "white-space": "nowrap" });
await frame.click("[data-testid='log-controls'] .wrap-logs"); await frame.click("[data-testid='log-controls'] .wrap-logs");