[go: nahoru, domu]

Deflake an LMI test

Wait for the tree item to be expanded before trying to click its child.

Fixed: chromium:1166106
Change-Id: Id2e89e272220549afde4b97bf2264a745ca17dc8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2678092
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Auto-Submit: Philip Pfaffe <pfaffe@chromium.org>
diff --git a/test/e2e/sources/can-open-linear-memory-inspector_test.ts b/test/e2e/sources/can-open-linear-memory-inspector_test.ts
index f0db65b..a7e826b 100644
--- a/test/e2e/sources/can-open-linear-memory-inspector_test.ts
+++ b/test/e2e/sources/can-open-linear-memory-inspector_test.ts
@@ -15,8 +15,7 @@
 const LINEAR_MEMORY_INSPECTOR_TAB_TITLE_SELECTOR = '.tabbed-pane-header-tab-title';
 
 describe('Scope View', async () => {
-  // Flaky on the Mac CQ bot.
-  it.skip('[crbug.com/1166106] opens linear memory inspector', async () => {
+  it('opens linear memory inspector', async () => {
     await enableExperiment('wasmDWARFDebugging');
 
     const {frontend, target} = getBrowserAndPages();
@@ -41,10 +40,12 @@
 
     await step('expand the module scope', async () => {
       await click('[aria-label="Module"]');
+      await waitFor('[aria-label="Module"][aria-expanded="true"]');
     });
 
     await step('expand the memories list', async () => {
       await click('[data-object-property-name-for-test="memories"]');
+      await waitFor('[data-object-property-name-for-test="memories"][aria-expanded="true"]');
     });
 
     await step('open linear memory inspector from context menu', async () => {
@@ -62,7 +63,7 @@
       assert.isNotNull(titleElement);
       const title = await frontend.evaluate(x => x.innerText, titleElement);
 
-      assert.strictEqual(title, 'memory.wasm');
+      assert.strictEqual(title, 'Memory(100)');
     });
   });