FIX: Don't fail if the test environment doesn't support Webauthn

This commit is contained in:
Robin Ward
2020-03-20 10:43:31 -04:00
parent c150566506
commit 1859e6b7ca

View File

@@ -256,6 +256,10 @@ QUnit.test("second factor security keys", async assert => {
assert.ok(exists("#security-key-name"), "shows security key name input");
fillIn("#security-key-name", "");
// The following tests can only run when Webauthn is enabled. This is not
// always the case, for example on a browser running on a non-standard port
if (typeof PublicKeyCredential !== "undefined") {
await click(".add-security-key");
assert.ok(
@@ -264,6 +268,7 @@ QUnit.test("second factor security keys", async assert => {
.indexOf("provide a name") > -1,
"shows name missing error message"
);
}
});
QUnit.test("default avatar selector", async assert => {