Skip to content

Commit dd6fd6e

Browse files
committed
Remove references to prod in env var names
1 parent 660e5a8 commit dd6fd6e

File tree

9 files changed

+44
-44
lines changed

9 files changed

+44
-44
lines changed

.github/workflows/deploy-production.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,10 +240,10 @@ jobs:
240240
runs-on: ubuntu-latest
241241
environment: production
242242
env:
243-
APPT_PROD_LOGIN_EMAIL: ${{ secrets.E2E_APPT_PROD_LOGIN_EMAIL }}
244-
APPT_PROD_LOGIN_PWORD: ${{ secrets.E2E_APPT_PROD_LOGIN_PASSWORD }}
245-
APPT_PROD_DISPLAY_NAME: ${{ secrets.E2E_APPT_PROD_DISPLAY_NAME }}
246-
APPT_PROD_MY_SHARE_LINK: ${{ secrets.E2E_APPT_PROD_MY_SHARE_LINK }}
243+
APPT_LOGIN_EMAIL: ${{ secrets.E2E_APPT_LOGIN_EMAIL }}
244+
APPT_LOGIN_PWORD: ${{ secrets.E2E_APPT_PROD_LOGIN_PASSWORD }}
245+
APPT_DISPLAY_NAME: ${{ secrets.E2E_APPT_DISPLAY_NAME }}
246+
APPT_MY_SHARE_LINK: ${{ secrets.E2E_APPT_MY_SHARE_LINK }}
247247
APPT_BOOKING_REQUESTER_EMAIL: ${{ secrets.E2E_APPT_PROD_BOOKING_REQUESTER_EMAIL }}
248248
steps:
249249
- uses: actions/checkout@v4

.github/workflows/nightly-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ jobs:
2020
runs-on: ubuntu-latest
2121
environment: production
2222
env:
23-
APPT_PROD_LOGIN_EMAIL: ${{ secrets.E2E_APPT_PROD_LOGIN_EMAIL }}
24-
APPT_PROD_LOGIN_PWORD: ${{ secrets.E2E_APPT_PROD_LOGIN_PASSWORD }}
25-
APPT_PROD_DISPLAY_NAME: ${{ secrets.E2E_APPT_PROD_DISPLAY_NAME }}
26-
APPT_PROD_MY_SHARE_LINK: ${{ secrets.E2E_APPT_PROD_MY_SHARE_LINK }}
23+
APPT_LOGIN_EMAIL: ${{ secrets.E2E_APPT_LOGIN_EMAIL }}
24+
APPT_LOGIN_PWORD: ${{ secrets.E2E_APPT_PROD_LOGIN_PASSWORD }}
25+
APPT_DISPLAY_NAME: ${{ secrets.E2E_APPT_DISPLAY_NAME }}
26+
APPT_MY_SHARE_LINK: ${{ secrets.E2E_APPT_MY_SHARE_LINK }}
2727
APPT_BOOKING_REQUESTER_EMAIL: ${{ secrets.E2E_APPT_PROD_BOOKING_REQUESTER_EMAIL }}
2828
steps:
2929
- uses: actions/checkout@v4

test/e2e/.env.example

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
# Appointment E2E Test Configuration
22

33
# URLs
4-
APPT_PROD_URL=https://appointment.day/
5-
APPT_PROD_SHORT_SHARE_LINK_PREFIX=https://apmt.day/
6-
APPT_PROD_LONG_SHARE_LINK_PREFIX=https://appointment.day/user/
4+
APPT_URL=https://appointment.day/
5+
APPT_SHORT_SHARE_LINK_PREFIX=https://apmt.day/
6+
APPT_LONG_SHARE_LINK_PREFIX=https://appointment.day/user/
77

8-
# Production sign-in (FxA) credentials
9-
APPT_PROD_LOGIN_EMAIL=
10-
APPT_PROD_LOGIN_PWORD=
8+
# Sign-in (FxA) credentials
9+
APPT_LOGIN_EMAIL=
10+
APPT_LOGIN_PWORD=
1111

1212
# Appointment user display name (settings => account => display name) for above user
13-
APPT_PROD_DISPLAY_NAME=
13+
APPT_DISPLAY_NAME=
1414

15-
# Production booking share link for the existing user above (settings => account => my link)
16-
APPT_PROD_MY_SHARE_LINK=
15+
# Booking share link for the existing user above (settings => account => my link)
16+
APPT_MY_SHARE_LINK=
1717

1818
# Booking requester's name and email address (used when a booking slot is requested via the
1919
# share link). Important: real appointment booking emails will be sent to the provided email.

test/e2e/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ cp .env.example .env
3939

4040
Then edit your local `.env` file and provide the following values:
4141
```dotenv
42-
APPT_PROD_LOGIN_EMAIL=<existing-test-FxA-user-email>
43-
APPT_PROD_LOGIN_PWORD=<exisiting-test-FxA-user-password>
44-
APPT_PROD_DISPLAY_NAME=<appointment-user-display-name>
45-
APPT_PROD_MY_SHARE_LINK=<apointment-user-share-link>
42+
APPT_LOGIN_EMAIL=<existing-test-FxA-user-email>
43+
APPT_LOGIN_PWORD=<exisiting-test-FxA-user-password>
44+
APPT_DISPLAY_NAME=<appointment-user-display-name>
45+
APPT_MY_SHARE_LINK=<apointment-user-share-link>
4646
APPT_BOOKING_REQUESTER_EMAIL=<booking-requesters-email>
4747
```
4848

@@ -73,10 +73,10 @@ You can run the E2E tests from your local machine but against browsers provided
7373
Once you have credentials for an existing Appointemnt test account, edit your local `.env` file and add these details (more information found above):
7474

7575
```dotenv
76-
APPT_PROD_LOGIN_EMAIL=<existing-test-FxA-user-email>
77-
APPT_PROD_LOGIN_PWORD=<exisiting-test-FxA-user-password>
78-
APPT_PROD_DISPLAY_NAME=<appointment-user-display-name>
79-
APPT_PROD_MY_SHARE_LINK=<apointment-user-share-link>
76+
APPT_LOGIN_EMAIL=<existing-test-FxA-user-email>
77+
APPT_LOGIN_PWORD=<exisiting-test-FxA-user-password>
78+
APPT_DISPLAY_NAME=<appointment-user-display-name>
79+
APPT_MY_SHARE_LINK=<apointment-user-share-link>
8080
APPT_BOOKING_REQUESTER_EMAIL=<booking-requesters-email>
8181
```
8282

test/e2e/const/constants.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
// appointment urls
2-
export const APPT_PROD_URL = String(process.env.APPT_PROD_URL);
3-
export const APPT_PROD_MY_SHARE_LINK = String(process.env.APPT_PROD_MY_SHARE_LINK);
4-
export const APPT_PROD_SHORT_SHARE_LINK_PREFIX = String(process.env.APPT_PROD_SHORT_SHARE_LINK_PREFIX);
5-
export const APPT_PROD_LONG_SHARE_LINK_PREFIX = String(process.env.APPT_PROD_LONG_SHARE_LINK_PREFIX);
6-
export const APPT_PROD_PENDING_BOOKINGS_PAGE = `${process.env.APPT_PROD_URL}bookings/pending`;
2+
export const APPT_URL = String(process.env.APPT_URL);
3+
export const APPT_MY_SHARE_LINK = String(process.env.APPT_MY_SHARE_LINK);
4+
export const APPT_SHORT_SHARE_LINK_PREFIX = String(process.env.APPT_SHORT_SHARE_LINK_PREFIX);
5+
export const APPT_LONG_SHARE_LINK_PREFIX = String(process.env.APPT_LONG_SHARE_LINK_PREFIX);
6+
export const APPT_PROD_PENDING_BOOKINGS_PAGE = `${process.env.APPT_URL}bookings/pending`;
77

88
// page titles
99
export const APPT_PAGE_TITLE = 'Thunderbird Appointment';
1010
export const FXA_PAGE_TITLE = 'Mozilla accounts';
1111

1212
// production sign-in credentials and corresponding account display name
13-
export const PROD_LOGIN_EMAIL = String(process.env.APPT_PROD_LOGIN_EMAIL);
14-
export const PROD_LOGIN_PWORD = String(process.env.APPT_PROD_LOGIN_PWORD);
13+
export const PROD_LOGIN_EMAIL = String(process.env.APPT_LOGIN_EMAIL);
14+
export const PROD_LOGIN_PWORD = String(process.env.APPT_LOGIN_PWORD);
1515

1616
// appointment user display name (settings => account) for above user
17-
export const PROD_DISPLAY_NAME = String(process.env.APPT_PROD_DISPLAY_NAME);
17+
export const PROD_DISPLAY_NAME = String(process.env.APPT_DISPLAY_NAME);
1818

1919
// appointment requester's name and email address
2020
export const APPT_BOOKING_REQUESTER_NAME = String(process.env.APPT_BOOKING_REQUESTER_NAME);

test/e2e/pages/booking-page.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { expect } from '@playwright/test';
22
import { type Page, type Locator } from '@playwright/test';
3-
import { APPT_PROD_MY_SHARE_LINK, APPT_PROD_SHORT_SHARE_LINK_PREFIX, APPT_PROD_LONG_SHARE_LINK_PREFIX } from '../const/constants';
3+
import { APPT_MY_SHARE_LINK, APPT_SHORT_SHARE_LINK_PREFIX, APPT_LONG_SHARE_LINK_PREFIX } from '../const/constants';
44

55
export class BookingPage {
66
readonly page: Page;
@@ -40,7 +40,7 @@ export class BookingPage {
4040
*/
4141
async gotoBookingPageShortUrl() {
4242
// the default share link is a short URL
43-
await this.page.goto(APPT_PROD_MY_SHARE_LINK);
43+
await this.page.goto(APPT_MY_SHARE_LINK);
4444
await this.page.waitForLoadState('domcontentloaded');
4545
}
4646

@@ -49,8 +49,8 @@ export class BookingPage {
4949
*/
5050
async gotoBookingPageLongUrl() {
5151
// the share link is short by default; build the corresponding long link first
52-
const prodShareLinkUser: string = APPT_PROD_MY_SHARE_LINK.split(APPT_PROD_SHORT_SHARE_LINK_PREFIX)[1];
53-
const longLink: string = `${APPT_PROD_LONG_SHARE_LINK_PREFIX}${prodShareLinkUser}`;
52+
const prodShareLinkUser: string = APPT_MY_SHARE_LINK.split(APPT_SHORT_SHARE_LINK_PREFIX)[1];
53+
const longLink: string = `${APPT_LONG_SHARE_LINK_PREFIX}${prodShareLinkUser}`;
5454
await this.page.goto(longLink);
5555
await this.page.waitForLoadState('domcontentloaded');
5656
}
@@ -59,7 +59,7 @@ export class BookingPage {
5959
* Go to the booking page week view (via the booking share link)
6060
*/
6161
async gotoBookingPageWeekView() {
62-
const weekLink: string = `${APPT_PROD_MY_SHARE_LINK}#week`;
62+
const weekLink: string = `${APPT_MY_SHARE_LINK}#week`;
6363
await this.page.goto(weekLink);
6464
await this.page.waitForLoadState('domcontentloaded');
6565
await expect(this.confirmBtn).toBeVisible({ timeout: 30_000 });

test/e2e/pages/fxa-page.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export class FxAPage {
1717
}
1818

1919
async signIn() {
20-
expect(PROD_LOGIN_PWORD, 'getting APPT_PROD_LOGIN_PWORD env var').toBeTruthy();
20+
expect(PROD_LOGIN_PWORD, 'getting APPT_LOGIN_PWORD env var').toBeTruthy();
2121
await this.passwordInput.fill(String(PROD_LOGIN_PWORD));
2222
await this.signInButton.click();
2323
}

test/e2e/pages/splashscreen-page.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { expect, type Page, type Locator } from '@playwright/test';
2-
import { APPT_PROD_URL, PROD_LOGIN_EMAIL, FXA_PAGE_TITLE } from '../const/constants';
2+
import { APPT_URL, PROD_LOGIN_EMAIL, FXA_PAGE_TITLE } from '../const/constants';
33

44
export class SplashscreenPage {
55
readonly page: Page;
@@ -17,7 +17,7 @@ export class SplashscreenPage {
1717
}
1818

1919
async gotoProd() {
20-
await this.page.goto(APPT_PROD_URL);
20+
await this.page.goto(APPT_URL);
2121
await this.page.waitForLoadState('domcontentloaded');
2222
}
2323

@@ -38,7 +38,7 @@ export class SplashscreenPage {
3838
await this.clickLoginBtn();
3939
await expect(this.loginEmailInput).toBeVisible();
4040
await expect(this.loginContinueBtn).toBeVisible();
41-
expect(PROD_LOGIN_EMAIL, 'getting APPT_PROD_LOGIN_EMAIL env var').toBeTruthy();
41+
expect(PROD_LOGIN_EMAIL, 'getting APPT_LOGIN_EMAIL env var').toBeTruthy();
4242
await this.enterLoginEmail(String(PROD_LOGIN_EMAIL))
4343
await this.clickLoginContinueBtn();
4444
await expect(this.page).toHaveTitle(FXA_PAGE_TITLE, { timeout: 30_000 }); // be generous in case FxA is slow to load

test/e2e/utils/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ import { SplashscreenPage } from "../pages/splashscreen-page";
33
import { FxAPage } from "../pages/fxa-page";
44
import { DashboardPage } from "../pages/dashboard-page";
55
import { expect, type Page } from '@playwright/test';
6-
import { APPT_PROD_URL, APPT_PAGE_TITLE } from "../const/constants";
6+
import { APPT_URL, APPT_PAGE_TITLE } from "../const/constants";
77

88
/**
99
* Navigate to and sign into the Appointment application using the production URL and
1010
* production credentials provided in the .env file.
1111
*/
1212
export const navigateToAppointmentProdAndSignIn = async (page: Page) => {
13-
console.log(`navigating to appointment production (${APPT_PROD_URL}) and signing in`);
13+
console.log(`navigating to appointment production (${APPT_URL}) and signing in`);
1414
const homePage = new SplashscreenPage(page);
1515
const signInPage = new FxAPage(page);
1616
const dashboardPage = new DashboardPage(page);

0 commit comments

Comments
 (0)