mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-02 16:08:13 +08:00
create e2e test for auth buttons (#1907)
This PR adds a few helpful additions regarding authentication. Changes: * e2e tests are now run on test_oauth via a passed config.yaml * node dev server correctly handles `/login` and `/logout` endpoints to make developing for auth easier * Introduced auth e2e tests to check that buttons display and work
This commit is contained in:
@@ -17,6 +17,7 @@ import {
|
||||
goToPage,
|
||||
typeInto,
|
||||
waitByID,
|
||||
clickOnUntil,
|
||||
} from "./puppeteerUtils";
|
||||
|
||||
import {
|
||||
@@ -521,6 +522,17 @@ test("lasso moves after pan", async () => {
|
||||
expect(panCount).toBe(initialCount);
|
||||
});
|
||||
|
||||
describe("auth buttons", () => {
|
||||
test("login then logout", async () => {
|
||||
await goToPage(appUrlBase);
|
||||
await clickOnUntil("log-in", async () => {
|
||||
await page.waitForNavigation({ waitUntil: "networkidle0" });
|
||||
await waitByID("user-info");
|
||||
});
|
||||
await logout();
|
||||
});
|
||||
});
|
||||
|
||||
const conditionalDescribe =
|
||||
process.env.TEST_AUTH_INTEGRATION === "true" ? describe : describe.skip;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user