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