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

Test for white-space rule changing

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2022-12-02 10:43:46 +03:00
parent 2c2266e13d
commit a49c947e51

View File

@ -189,16 +189,18 @@ describeIf(minikubeReady(TEST_NAMESPACE))("Minikube based tests", () => {
await frame.waitForSelector(".Dock.isOpen");
const logLine = await frame.waitForSelector("[data-testid=pod-log-list] [data-index='0']");
const lineBoundingBox = await logLine.boundingBox();
expect(lineBoundingBox?.height).toBeLessThan(30);
expect(logLine).toHaveStyle({
"white-space": "nowrap",
});
await frame.click("[data-testid='log-controls'] .wrap-logs");
await frame.waitForTimeout(1000);
const wrappedLogLine = await frame.waitForSelector("[data-testid=pod-log-list] [data-index='0']");
const wrappedLineBoundingBox = await wrappedLogLine.boundingBox();
expect(wrappedLineBoundingBox?.height).toBeGreaterThan(30);
const wrappedLogLine = await frame.waitForSelector("[data-testid=pod-log-list] [data-index='0']");
expect(wrappedLogLine).toHaveStyle({
"white-space": "normal",
});
},
10 * 60 * 1000,
);