Fetch passwords from secretsmanager (#2138)

* add aws secretsmanagerclient

* create custom globalsetup

* consume secret password and enable tests

* update npm
This commit is contained in:
Severiano Badajoz
2021-04-05 14:16:10 -07:00
committed by GitHub
parent 6ecdfa4940
commit 4510c8c8a4
7 changed files with 1397 additions and 1261 deletions
+3 -6
View File
@@ -16,7 +16,7 @@ import {
goToPage,
} from "./puppeteerUtils";
import { appUrlBase } from "./config";
import { appUrlBase, TEST_EMAIL, TEST_PASSWORD } from "./config";
export async function drag(testId, start, end, lasso = false) {
const layout = await waitByID(testId);
@@ -317,9 +317,6 @@ export async function assertCategoryDoesNotExist(categoryName) {
}
export async function login() {
const email = ``;
const password = "";
await goToPage(appUrlBase);
await clickOn("log-in");
@@ -328,8 +325,8 @@ export async function login() {
await waitUntilFormFieldStable('[name="email"]');
await expect(page).toFillForm("form", {
email,
password,
email: TEST_EMAIL,
password: TEST_PASSWORD,
});
await Promise.all([
+2
View File
@@ -6,3 +6,5 @@ export const appUrlBase =
export const DATASET = "pbmc3k";
export const isDev = jestEnv === ENV_DEFAULT.DEV;
export const isDebug = jestEnv === ENV_DEFAULT.DEBUG;
export const TEST_EMAIL = "user@example.com";
export const TEST_PASSWORD = process.env.TEST_ACCOUNT_PASS ?? "";
+2 -1
View File
@@ -368,7 +368,8 @@ describeIfCalledByMakeFileTarget("auth buttons", () => {
});
});
const conditionalDescribe = describe.skip;
const conditionalDescribe =
process.env.TEST_AUTH_INTEGRATION === "true" ? describe : describe.skip;
conditionalDescribe("AuthN Integration", () => {
it("logs in", async () => {
+1 -1
View File
@@ -4,7 +4,7 @@
"testMatch": ["**/__tests__/**/?(*.)(spec|test).js?(x)"],
"setupFiles": ["../setupMissingGlobals.js"],
"setupFilesAfterEnv": ["expect-puppeteer", "./puppeteer.setup.js"],
"globalSetup": "jest-environment-puppeteer/setup",
"globalSetup": "../globalSetup.js",
"globalTeardown": "jest-environment-puppeteer/teardown",
"testEnvironment": "./screenshot_env.js"
}