diff --git a/app/client/src/pages/Editor/Explorer/EntityExplorer.test.tsx b/app/client/src/pages/Editor/Explorer/EntityExplorer.test.tsx index 42660da8b7..0a2f29044c 100644 --- a/app/client/src/pages/Editor/Explorer/EntityExplorer.test.tsx +++ b/app/client/src/pages/Editor/Explorer/EntityExplorer.test.tsx @@ -81,6 +81,13 @@ describe("Entity Explorer tests", () => { , ); + const widgetsTree: any = component.queryByText("Widgets", { + selector: "div.t--entity-name", + }); + act(() => { + fireEvent.click(widgetsTree); + jest.runAllTimers(); + }); const tabsWidget = component.queryByText(children[0].widgetName); expect(tabsWidget).toBeTruthy(); }); @@ -106,13 +113,6 @@ describe("Entity Explorer tests", () => { , ); - const widgetsTree: any = component.queryByText("Widgets", { - selector: "div.t--entity-name", - }); - act(() => { - fireEvent.click(widgetsTree); - jest.runAllTimers(); - }); const tabsWidget: any = component.queryByText(children[0].widgetName); act(() => { fireEvent.click(tabsWidget);