-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into MPP-3442-new-email-template
- Loading branch information
Showing
36 changed files
with
2,372 additions
and
2,142 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 |
---|---|---|
|
@@ -16,7 +16,7 @@ jobs: | |
with: | ||
submodules: 'recursive' | ||
- name: Set up Python 3 | ||
uses: actions/[email protected].0 | ||
uses: actions/[email protected].1 | ||
with: | ||
python-version: '3.10' | ||
cache: 'pip' | ||
|
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,4 +1,4 @@ | ||
FROM python:3.10.11 | ||
FROM python:3.10.13 | ||
|
||
ARG CIRCLE_BRANCH | ||
ARG CIRCLE_SHA1 | ||
|
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
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,6 +1,6 @@ | ||
# Use the Relay mask address as From: address for forwarded emails | ||
|
||
- Status: Proposed | ||
- Status: Accepted | ||
- Deciders: Luke Crouch, Doris Deng | ||
- Date: 2023-08-11 | ||
|
||
|
@@ -43,9 +43,16 @@ forwarded emails. | |
|
||
## Decision Outcome | ||
|
||
Proceeding with testing and deployment of option 3, use the Relay mask as the | ||
`From:` address. Testing will focus on delivery issues, and quantifying the | ||
risk of categorization as spam. | ||
We proceeded with option 3, use the Relay mask as the `From:` address. | ||
|
||
The change was tested by staff in July and August 2023. Testing focused on delivery | ||
issues and quantifying the risk of categorization as spam. The change exposed some | ||
configuration issues in the staging environment, but worked well in production. | ||
|
||
The change was launched to all users in September 2023. There were no negative reports | ||
from users. There was a minor uptick in spam reports, up to an additional 1 per 1000 | ||
emails. There were some new unhandled processing exceptions, requiring new code to catch | ||
the exceptions and log the values that caused them. | ||
|
||
### Positive Consequences | ||
|
||
|
@@ -77,7 +84,7 @@ Relay forwards with: | |
|
||
``` | ||
Subject: A special offer for you | ||
From: "[email protected] [via Relay]" [email protected] | ||
From: "[email protected] [via Relay]" <[email protected]> | ||
To: [email protected] | ||
Reply-To: [email protected] | ||
``` | ||
|
@@ -101,7 +108,7 @@ Relay forwards with: | |
|
||
``` | ||
Subject: A special offer for you | ||
From: "[email protected] [via Relay]" [email protected] | ||
From: "[email protected] [via Relay]" <[email protected]> | ||
To: [email protected] | ||
Reply-To: [email protected] | ||
Resent-From: [email protected] | ||
|
@@ -132,7 +139,7 @@ Relay forwards with: | |
|
||
``` | ||
Subject: A special offer for you | ||
From: "[email protected] [via Relay]" [email protected] | ||
From: "[email protected] [via Relay]" <[email protected]> | ||
To: [email protected] | ||
Reply-To: [email protected] | ||
Resent-From: [email protected] | ||
|
@@ -164,7 +171,7 @@ Relay forwards with: | |
|
||
``` | ||
Subject: A special offer for you | ||
From: "[email protected] [via Relay]" [email protected] | ||
From: "[email protected] [via Relay]" <[email protected]> | ||
To: [email protected] | ||
Reply-To: [email protected] | ||
Resent-From: [email protected] | ||
|
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 |
---|---|---|
|
@@ -17,14 +17,14 @@ export const getVerificationCode = async (testEmail: string, page: Page, attempt | |
throw new Error('Unable to retrieve restmail data'); | ||
} | ||
|
||
const context = await request.newContext(); | ||
const context = await request.newContext(); | ||
const res = await context.get( | ||
`http://restmail.net/mail/${testEmail}`, | ||
{ | ||
failOnStatusCode: false | ||
} | ||
); | ||
const resJson = await res.json(); | ||
const resJson = await res.json(); | ||
if (resJson.length) { | ||
const verificationCode = resJson[0].headers['x-verify-short-code'] | ||
return verificationCode; | ||
|
@@ -42,16 +42,16 @@ export const deleteEmailAddressMessages = async (req: APIRequestContext, testEma | |
} | ||
}; | ||
|
||
const setYourPassword = async (page: Page) => { | ||
const setYourPassword = async (page: Page) => { | ||
await page.locator('#password').fill(process.env.E2E_TEST_ACCOUNT_PASSWORD as string) | ||
await page.locator('#vpassword').fill(process.env.E2E_TEST_ACCOUNT_PASSWORD as string) | ||
await page.locator('#age').fill('31'); | ||
await page.locator('button:has-text("Create account")').click({force: true}) | ||
await page.waitForTimeout(500) | ||
await checkAuthState(page) | ||
await checkAuthState(page) | ||
} | ||
|
||
const enterConfirmationCode = async (page: Page) => { | ||
const enterConfirmationCode = async (page: Page) => { | ||
const maybeVerificationCodeInput = 'div.card input' | ||
await page.waitForSelector(maybeVerificationCodeInput, { timeout: 2000 }) | ||
const confirmButton = page.locator('#submit-btn') | ||
|
@@ -89,16 +89,16 @@ const enterYourPassword = async (page: Page) => { | |
await checkAuthState(page) | ||
} | ||
|
||
export const generateRandomEmail = async () => { | ||
export const generateRandomEmail = async () => { | ||
return `${Date.now()}[email protected]`; | ||
}; | ||
|
||
export const setEnvVariables = async (email: string) => { | ||
export const setEnvVariables = async (email: string) => { | ||
// set env variables | ||
// stage will currently be the default | ||
process.env['E2E_TEST_ENV'] = process.env.E2E_TEST_ENV || 'stage'; | ||
// stage will currently be the default | ||
process.env['E2E_TEST_ENV'] = process.env.E2E_TEST_ENV as string ?? 'stage'; | ||
process.env['E2E_TEST_ACCOUNT_FREE'] = email; | ||
process.env['E2E_TEST_BASE_URL'] = ENV_URLS[process.env.E2E_TEST_ENV as string] || 'https://stage.fxprivaterelay.nonprod.cloudops.mozgcp.net' | ||
process.env['E2E_TEST_BASE_URL'] = ENV_URLS[process.env.E2E_TEST_ENV as string] ?? ENV_URLS.stage | ||
} | ||
|
||
interface DefaultScreenshotOpts { | ||
|
@@ -113,7 +113,7 @@ export const defaultScreenshotOpts: Partial<DefaultScreenshotOpts> = { | |
|
||
export const checkAuthState = async (page: Page) => { | ||
try { | ||
const authStateTitleString = await page.locator('h1').textContent({ timeout: 4000 }) | ||
const authStateTitleString = await page.locator('h1').first()?.textContent({ timeout: 4000 }) | ||
const checkIfTitleContains = (potentialTitle: string) => { | ||
return authStateTitleString?.includes(potentialTitle) | ||
} | ||
|
@@ -138,4 +138,4 @@ export const checkAuthState = async (page: Page) => { | |
break; | ||
} | ||
} catch {} | ||
} | ||
} |
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
Oops, something went wrong.