-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
1,146 additions
and
1,113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
name: Build | ||
|
||
on: | ||
pull_request: | ||
types: [closed] | ||
on: [push] | ||
|
||
jobs: | ||
npm-build: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
name: Build Docker image check | ||
on: | ||
pull_request: | ||
types: [closed] | ||
jobs: | ||
docker_build: | ||
name: Build Docker image | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
name: Deploy Preview | ||
|
||
on: | ||
on: | ||
pull_request: | ||
types: [closed] | ||
|
||
env: | ||
PROJECT_ID: ${{ secrets.GCP_PROJECT }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
name: Unit Tests | ||
|
||
on: | ||
pull_request: | ||
types: [closed] | ||
on: [push] | ||
|
||
jobs: | ||
unit-tests: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
import { parseIso8601Datetime } from "../../../utils/parse"; | ||
|
||
export function isPrePlusDate( | ||
plusReleaseDateString: string, | ||
dateStringToCompare: string, | ||
) { | ||
const brokerScanReleaseDateParts = plusReleaseDateString.split("-"); | ||
if (brokerScanReleaseDateParts[0] === "") { | ||
brokerScanReleaseDateParts[0] = "2023"; | ||
} | ||
const brokerScanReleaseDate = new Date( | ||
Date.UTC( | ||
Number.parseInt(brokerScanReleaseDateParts[0], 10), | ||
Number.parseInt(brokerScanReleaseDateParts[1] ?? "12", 10) - 1, | ||
Number.parseInt(brokerScanReleaseDateParts[2] ?? "05", 10), | ||
), | ||
); | ||
|
||
return ( | ||
(parseIso8601Datetime(dateStringToCompare)?.getTime() ?? 0) < | ||
brokerScanReleaseDate.getTime() | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
import { isPrePlusDate } from "../../app/functions/universal/isPrePlusDate.js"; | ||
import { test, expect } from "../fixtures/basePage.js"; | ||
|
||
test.describe(`${process.env.E2E_TEST_ENV} - Authentication flow verification @smoke`, () => { | ||
|
@@ -14,7 +15,7 @@ test.describe(`${process.env.E2E_TEST_ENV} - Authentication flow verification @s | |
authPage, | ||
landingPage, | ||
}, testInfo) => { | ||
// speed up test by ignore non necessary requests | ||
// speed up test by ignoring non-necessary requests | ||
await page.route(/(analytics)/, async (route) => { | ||
await route.abort(); | ||
}); | ||
|
@@ -23,12 +24,20 @@ test.describe(`${process.env.E2E_TEST_ENV} - Authentication flow verification @s | |
await landingPage.goToSignIn(); | ||
|
||
// Fill out sign up form | ||
const randomEmail = `${Date.now()}[email protected]`; | ||
const currentTimestamp = Date.now(); | ||
const randomEmail = `${currentTimestamp}[email protected]`; | ||
await authPage.signUp(randomEmail, page); | ||
|
||
// assert successful login | ||
const successUrl = `${process.env.E2E_TEST_BASE_URL}/user/welcome`; | ||
expect(page.url()).toBe(successUrl); | ||
const successUrlSlugs = isPrePlusDate( | ||
process.env.BROKER_SCAN_RELEASE_DATE ?? "", | ||
new Date(currentTimestamp).toUTCString(), | ||
) | ||
? "/user/dashboard" | ||
: "/user/welcome"; | ||
expect(page.url()).toBe( | ||
`${process.env.E2E_TEST_BASE_URL}${successUrlSlugs}`, | ||
); | ||
|
||
await testInfo.attach( | ||
`${process.env.E2E_TEST_ENV}-signup-monitor-dashboard.png`, | ||
|
Oops, something went wrong.