-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: split tppwless tests into multiple files to help with paralleli…
…zation (#742) * test: split tppwless tests into multiple files to help with parallelization * chore: bump patch version
- Loading branch information
Showing
9 changed files
with
147 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. | ||
* | ||
* This software is licensed under the Apache License, Version 2.0 (the | ||
* "License") as published by the Apache Software Foundation. | ||
* | ||
* You may not use this file except in compliance with the License. You may | ||
* obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
/* | ||
* Imports | ||
*/ | ||
|
||
import assert from "assert"; | ||
import puppeteer from "puppeteer"; | ||
import { | ||
clearBrowserCookiesWithoutAffectingConsole, | ||
clickOnProviderButton, | ||
getUserIdWithFetch, | ||
getLogoutButton, | ||
loginWithAuth0, | ||
setInputValues, | ||
submitForm, | ||
waitForSTElement, | ||
getPasswordlessDevice, | ||
setPasswordlessFlowType, | ||
getFeatureFlags, | ||
isReact16, | ||
assertProviders, | ||
setEnabledRecipes, | ||
clickOnProviderButtonWithoutWaiting, | ||
getGeneralError, | ||
backendBeforeEach, | ||
} from "../helpers"; | ||
import { TEST_CLIENT_BASE_URL, TEST_SERVER_BASE_URL, SIGN_IN_UP_API, GET_AUTH_URL_API } from "../constants"; | ||
import { getThirdPartyTestCases } from "./thirdparty.test"; | ||
import { getPasswordlessTestCases } from "./passwordless.test"; | ||
|
||
/* | ||
* Tests. | ||
*/ | ||
describe("SuperTokens Third Party Passwordless", function () { | ||
before(async function () { | ||
const features = await getFeatureFlags(); | ||
if (!features.includes("thirdpartypasswordless")) { | ||
this.skip(); | ||
} | ||
}); | ||
|
||
describe("Passwordless specific", function () { | ||
getPasswordlessTestCases({ | ||
authRecipe: "thirdpartypasswordless", | ||
logId: "THIRDPARTYPASSWORDLESS", | ||
generalErrorRecipeName: "THIRD_PARTY_PASSWORDLESS", | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. | ||
* | ||
* This software is licensed under the Apache License, Version 2.0 (the | ||
* "License") as published by the Apache Software Foundation. | ||
* | ||
* You may not use this file except in compliance with the License. You may | ||
* obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
/* | ||
* Imports | ||
*/ | ||
|
||
import assert from "assert"; | ||
import puppeteer from "puppeteer"; | ||
import { | ||
clearBrowserCookiesWithoutAffectingConsole, | ||
clickOnProviderButton, | ||
getUserIdWithFetch, | ||
getLogoutButton, | ||
loginWithAuth0, | ||
setInputValues, | ||
submitForm, | ||
waitForSTElement, | ||
getPasswordlessDevice, | ||
setPasswordlessFlowType, | ||
getFeatureFlags, | ||
isReact16, | ||
assertProviders, | ||
setEnabledRecipes, | ||
clickOnProviderButtonWithoutWaiting, | ||
getGeneralError, | ||
backendBeforeEach, | ||
} from "../helpers"; | ||
import { TEST_CLIENT_BASE_URL, TEST_SERVER_BASE_URL, SIGN_IN_UP_API, GET_AUTH_URL_API } from "../constants"; | ||
import { getThirdPartyTestCases } from "./thirdparty.test"; | ||
import { getPasswordlessTestCases } from "./passwordless.test"; | ||
|
||
/* | ||
* Tests. | ||
*/ | ||
describe("SuperTokens Third Party Passwordless", function () { | ||
const signInUpPageLoadLogs = isReact16() | ||
? ["ST_LOGS THIRDPARTYPASSWORDLESS OVERRIDE GET_LOGIN_ATTEMPT_INFO"] | ||
: [ | ||
"ST_LOGS THIRDPARTYPASSWORDLESS OVERRIDE GET_LOGIN_ATTEMPT_INFO", | ||
"ST_LOGS THIRDPARTYPASSWORDLESS OVERRIDE GET_LOGIN_ATTEMPT_INFO", | ||
]; | ||
|
||
before(async function () { | ||
const features = await getFeatureFlags(); | ||
if (!features.includes("thirdpartypasswordless")) { | ||
this.skip(); | ||
} | ||
}); | ||
|
||
describe("Third Party specific", function () { | ||
getThirdPartyTestCases({ | ||
authRecipe: "thirdpartypasswordless", | ||
rid: "thirdpartypasswordless", | ||
logId: "THIRDPARTYPASSWORDLESS", | ||
signInUpPageLoadLogs, | ||
thirdPartySignInUpLog: "THIRD_PARTY_SIGN_IN_AND_UP", | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters