Skip to content

Commit 71b77b8

Browse files
committed
Expand the search index row only if not already expanded
1 parent 83dbe8a commit 71b77b8

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

packages/compass-e2e-tests/helpers/selectors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,7 @@ export const SearchIndexConfirmButton =
10711071
export const searchIndexRow = (name: string) =>
10721072
`[data-testid="search-indexes-row-${name}"]`;
10731073
export const searchIndexExpandButton = (name: string) =>
1074-
`${searchIndexRow(name)} button:first-child`;
1074+
`${searchIndexRow(name)} button[aria-label="Expand row"]`;
10751075
export const searchIndexAggregateButton = (name: string) =>
10761076
`${searchIndexRow(
10771077
name

packages/compass-e2e-tests/tests/search-indexes.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,12 @@ async function verifyIndexDetails(
129129
const indexRow = browser.$(indexRowSelector);
130130
await indexRow.waitForDisplayed({ timeout: WAIT_TIMEOUT });
131131
await browser.hover(indexRowSelector);
132-
await browser.clickVisible(Selectors.searchIndexExpandButton(indexName));
132+
133+
// Expand the row if it's not already expanded
134+
const expandButton = browser.$(Selectors.searchIndexExpandButton(indexName));
135+
if (await expandButton.isDisplayed()) {
136+
await expandButton.click();
137+
}
133138

134139
await browser.waitUntil(async () => {
135140
const text = await browser

0 commit comments

Comments
 (0)