diff --git a/Common/Server/Infrastructure/Postgres/SchemaMigrations/1769517677937-RenameNotificationRuleTypes.ts b/Common/Server/Infrastructure/Postgres/SchemaMigrations/1769517677937-RenameNotificationRuleTypes.ts index b47a1bbfc0..d4519ff887 100644 --- a/Common/Server/Infrastructure/Postgres/SchemaMigrations/1769517677937-RenameNotificationRuleTypes.ts +++ b/Common/Server/Infrastructure/Postgres/SchemaMigrations/1769517677937-RenameNotificationRuleTypes.ts @@ -8,8 +8,10 @@ export class RenameNotificationRuleTypes1769517677937 @CaptureSpan() public async up(queryRunner: QueryRunner): Promise { - // 1. Update rules with "When on-call policy is executed" and incidentSeverityId (not null) - // to "When incident on-call policy is executed" + /* + * 1. Update rules with "When on-call policy is executed" and incidentSeverityId (not null) + * to "When incident on-call policy is executed" + */ await queryRunner.query( `UPDATE "UserNotificationRule" SET "ruleType" = 'When incident on-call policy is executed' @@ -17,8 +19,10 @@ export class RenameNotificationRuleTypes1769517677937 AND "incidentSeverityId" IS NOT NULL`, ); - // 2. Update rules with "When on-call policy is executed" and alertSeverityId (not null) - // to "When alert on-call policy is executed" + /* + * 2. Update rules with "When on-call policy is executed" and alertSeverityId (not null) + * to "When alert on-call policy is executed" + */ await queryRunner.query( `UPDATE "UserNotificationRule" SET "ruleType" = 'When alert on-call policy is executed' @@ -26,8 +30,10 @@ export class RenameNotificationRuleTypes1769517677937 AND "alertSeverityId" IS NOT NULL`, ); - // 3. Update rules with "When episode on-call policy is executed" - // to "When alert episode on-call policy is executed" + /* + * 3. Update rules with "When episode on-call policy is executed" + * to "When alert episode on-call policy is executed" + */ await queryRunner.query( `UPDATE "UserNotificationRule" SET "ruleType" = 'When alert episode on-call policy is executed' diff --git a/Common/Server/Services/UserNotificationRuleService.ts b/Common/Server/Services/UserNotificationRuleService.ts index 21efd25008..93951f4ec1 100644 --- a/Common/Server/Services/UserNotificationRuleService.ts +++ b/Common/Server/Services/UserNotificationRuleService.ts @@ -2032,7 +2032,8 @@ export class Service extends DatabaseService { notificationRule.userEmailId = userEmail.id!; notificationRule.incidentSeverityId = incidentSeverity.id!; notificationRule.notifyAfterMinutes = 0; - notificationRule.ruleType = NotificationRuleType.ON_CALL_EXECUTED_INCIDENT; + notificationRule.ruleType = + NotificationRuleType.ON_CALL_EXECUTED_INCIDENT; await this.create({ data: notificationRule, diff --git a/Common/Server/Services/UserOnCallLogService.ts b/Common/Server/Services/UserOnCallLogService.ts index 0f3205a2d9..cf738e02ab 100644 --- a/Common/Server/Services/UserOnCallLogService.ts +++ b/Common/Server/Services/UserOnCallLogService.ts @@ -328,9 +328,7 @@ export class Service extends DatabaseService { return NotificationRuleType.ON_CALL_EXECUTED_INCIDENT; } - if ( - userNotificationEventType === UserNotificationEventType.AlertCreated - ) { + if (userNotificationEventType === UserNotificationEventType.AlertCreated) { return NotificationRuleType.ON_CALL_EXECUTED_ALERT; } diff --git a/E2E/Tests/Home/Sitemap.spec.ts b/E2E/Tests/Home/Sitemap.spec.ts index 30098997d8..c2d67ac75a 100644 --- a/E2E/Tests/Home/Sitemap.spec.ts +++ b/E2E/Tests/Home/Sitemap.spec.ts @@ -49,9 +49,9 @@ test.describe("Home: Sitemap", () => { expect(sitemapLocs.length).toBeGreaterThan(0); // Verify sitemap-pages.xml is in the index - const pagesEntry: string | undefined = sitemapLocs.find( - (loc: string) => loc.includes("sitemap-pages.xml"), - ); + const pagesEntry: string | undefined = sitemapLocs.find((loc: string) => { + return loc.includes("sitemap-pages.xml"); + }); expect(pagesEntry, "sitemap-pages.xml should be in index").toBeTruthy(); }); @@ -77,9 +77,9 @@ test.describe("Home: Sitemap", () => { const first: string | undefined = locs[0]; expect(first, "First should exist").toBeTruthy(); // Homepage URL either ends with / or has no path after domain + const homepageRegex: RegExp = /^https?:\/\/[^/]+$/; const isHomepage: boolean = - first!.endsWith("/") || - /^https?:\/\/[^\/]+$/.test(first!); + first!.endsWith("/") || homepageRegex.test(first!); expect(isHomepage, "First should be homepage").toBeTruthy(); }); });