Skip to content

Commit

Permalink
fix(ui): TE-XXXX e2e test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nalin-patidar committed Jan 28, 2025
1 parent 7c98e35 commit 5392d86
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion thirdeye-ui/e2e/pages/alert-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,10 @@ export class AlertListPage extends BasePage {
const jsonEditor = this.page.locator(".CodeMirror");
await jsonEditor.click();
const date = new Date();
const granularity = Math.ceil(Math.random() * 100);
const editedAlert = `{"id": ${
topAlert.id
}, "name": "Clicks_SUM_mean-variance-rule-dup-edit${date.getTime()}","description": "","template": {"name": "startree-mean-variance"},"templateProperties": {"dataSource": "pinot","dataset": "AdCampaignData","aggregationColumn": "Clicks","aggregationFunction": "SUM","monitoringGranularity": "P1D","timezone": "UTC","queryFilters": "","sensitivity": "-6","lookback": "P21D"},"cron": "0 0 5 ? * MON-FRI *","auth": {"namespace": null}}`;
}, "name": "Clicks_SUM_mean-variance-rule-dup-edit${date.getTime()}","description": "","template": {"name": "startree-mean-variance"},"templateProperties": {"dataSource": "pinot","dataset": "AdCampaignData","aggregationColumn": "Clicks","aggregationFunction": "SUM","monitoringGranularity": "P${granularity}D","timezone": "UTC","queryFilters": "","sensitivity": "-6","lookback": "P21D"},"cron": "0 0 5 ? * MON-FRI *","auth": {"namespace": null}}`;
await this.page.evaluate((editedAlert) => {
const editor = document.querySelector(".CodeMirror")?.CodeMirror;
editor.setValue(editedAlert);
Expand Down
1 change: 1 addition & 0 deletions thirdeye-ui/e2e/tests/alert-list.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/
import { test } from "@playwright/test";
import { AlertListPage } from "../pages/alert-list";
test.describe.configure({ mode: "serial" });

let alertListPage;
test.beforeEach(async ({ page }) => {
Expand Down

0 comments on commit 5392d86

Please sign in to comment.