Skip to content

Commit 388330e

Browse files
committed
2 parents c222502 + 16a6a68 commit 388330e

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

e2e-studio/utils/test-utils.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,16 @@ export class ArcadeStudioTestHelper {
108108
* @param waitForGraph - Whether to wait for graph rendering (default: true)
109109
*/
110110
async executeQuery(query: string, waitForGraph = true): Promise<void> {
111-
// Get query textarea and fill it
112-
const queryTextarea = this.page.getByRole('tabpanel').getByRole('textbox');
113-
await expect(queryTextarea).toBeVisible();
114-
await queryTextarea.fill(query);
111+
// Set query via CodeMirror API (fill() doesn't reliably update CodeMirror's internal model)
112+
await this.page.evaluate((q) => {
113+
(window as any).editor.setValue(q);
114+
}, query);
115+
116+
// Dismiss any existing error toasts that could block the execute button
117+
await this.page.evaluate(() => {
118+
const toasts = document.querySelectorAll('.swal2-container');
119+
toasts.forEach(t => t.remove());
120+
});
115121

116122
// Execute query
117123
await this.page.getByRole('button', { name: '' }).first().click();

0 commit comments

Comments
 (0)