Fix smoke tests to work with remote deployments of cellxgene (#1469)

* Add test for terms of service

* Add workaround for chromium CSP require-trusted-types-for error
This commit is contained in:
Matt Weiden
2020-05-12 13:01:57 -07:00
committed by GitHub
parent c1bf491a96
commit e55595cc55
3 changed files with 17 additions and 2 deletions
+11
View File
@@ -29,6 +29,17 @@ describe("did launch", () => {
);
expect(element).toBe(data.title);
});
test("terms of service, if they are there", async () => {
try {
await utils.clickOn("tos-cookies-accept", { timeout: 500 });
} catch {
console.warn("No terms of service footer detected.")
}
page.waitFor(50); // give the footer a chance to disappear
const result = await page.$("[data-testid='tos-cookies-accept']");
expect(result).toBeNull();
});
});
describe("metadata loads", () => {