mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Using asElement() for assertions
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
5921098bde
commit
8566ae8e9e
@ -188,19 +188,15 @@ describeIf(minikubeReady(TEST_NAMESPACE))("Minikube based tests", () => {
|
|||||||
await frame.click(".MenuItem >> text=Logs");
|
await frame.click(".MenuItem >> text=Logs");
|
||||||
|
|
||||||
await frame.waitForSelector(".Dock.isOpen");
|
await frame.waitForSelector(".Dock.isOpen");
|
||||||
const logLine = await frame.getByTestId("log-row-0");
|
const logLine = await frame.waitForSelector("[data-testid=pod-log-list] [data-index='0']");
|
||||||
|
|
||||||
expect(logLine).toHaveStyle({
|
expect(logLine.asElement()).toHaveStyle({ "white-space": "nowrap" });
|
||||||
"white-space": "nowrap",
|
|
||||||
});
|
|
||||||
|
|
||||||
await frame.click("[data-testid='log-controls'] .wrap-logs");
|
await frame.click("[data-testid='log-controls'] .wrap-logs");
|
||||||
|
|
||||||
const wrappedLogLine = await frame.getByTestId("log-row-0");
|
const wrappedLogLine = await frame.waitForSelector("[data-testid=pod-log-list] [data-index='0']");
|
||||||
|
|
||||||
expect(wrappedLogLine).toHaveStyle({
|
expect(wrappedLogLine.asElement()).toHaveStyle({ "white-space": "normal" });
|
||||||
"white-space": "normal",
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
10 * 60 * 1000,
|
10 * 60 * 1000,
|
||||||
);
|
);
|
||||||
|
|||||||
@ -80,7 +80,6 @@ export const LogList = observer(({ model }: LogListProps) => {
|
|||||||
<div
|
<div
|
||||||
key={virtualRow.index + uniqRowKey}
|
key={virtualRow.index + uniqRowKey}
|
||||||
data-index={virtualRow.index}
|
data-index={virtualRow.index}
|
||||||
data-testid={`log-row-${virtualRow.index}`}
|
|
||||||
ref={rowVirtualizer.measureElement}
|
ref={rowVirtualizer.measureElement}
|
||||||
style={{
|
style={{
|
||||||
transform: `translateY(${virtualRow.start}px)`,
|
transform: `translateY(${virtualRow.start}px)`,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user