mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-03 23:48:12 +08:00
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:
@@ -36,6 +36,10 @@ export async function setupTestBrowser() {
|
||||
page.on("console", async (msg) => {
|
||||
// If there is a console.error but an error is not thrown, this will ensure the test fails
|
||||
if (msg.type() === "error") {
|
||||
// TODO: chromium does not currently support the CSP directive on the
|
||||
// line below, so we swallow this error. Remove this when the test
|
||||
// suite uses a browser version that supports this directive.
|
||||
if (msg.text() === "Unrecognized Content-Security-Policy directive 'require-trusted-types-for'.\n") return;
|
||||
const errorMsgText = await Promise.all(
|
||||
// TODO can we do this without internal properties?
|
||||
msg.args().map((arg) => arg._remoteObject.description)
|
||||
|
||||
Reference in New Issue
Block a user