mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-04 14:18:11 +08:00
1807-authN-smoke-test (#1898)
This PR does the following: 1. Add `login` and `logout` helper functions in `client/__tests__/e2e/cellxgeneActions.js` 2. Add conditional AuthN integration test in `client/__tests__/e2e/e2e.test.js`. The test will only run if env variable `TEST_AUTH_INTEGRATION` is `"true"`, which is only set in `single-cell-infra`'s Github Action flow. Corresponding PR [here](https://github.com/chanzuckerberg/single-cell-infra/pull/198)
This commit is contained in:
@@ -31,6 +31,8 @@ import {
|
||||
runDiffExp,
|
||||
selectCategory,
|
||||
subset,
|
||||
login,
|
||||
logout,
|
||||
} from "./cellxgeneActions";
|
||||
|
||||
const data = datasets[DATASET];
|
||||
@@ -518,4 +520,18 @@ test("lasso moves after pan", async () => {
|
||||
|
||||
expect(panCount).toBe(initialCount);
|
||||
});
|
||||
|
||||
const conditionalDescribe =
|
||||
process.env.TEST_AUTH_INTEGRATION === "true" ? describe : describe.skip;
|
||||
|
||||
conditionalDescribe("AuthN Integration", () => {
|
||||
it("logs in", async () => {
|
||||
await login();
|
||||
});
|
||||
|
||||
it("logs out", async () => {
|
||||
await login();
|
||||
await logout();
|
||||
});
|
||||
});
|
||||
/* eslint-enable no-await-in-loop -- await in loop is needed to emulate sequential user actions */
|
||||
|
||||
Reference in New Issue
Block a user