Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature email password #16

Merged
merged 38 commits into from
Nov 4, 2020
Merged
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
bf4f019
email/password feature
kant01ne Oct 26, 2020
8b0cf4f
DRY routing + react-test-app in test + fix clashing node_modules
kant01ne Oct 26, 2020
44ce313
npmignore
kant01ne Oct 26, 2020
5565cfb
signIn API + feature events
kant01ne Oct 26, 2020
df6e30c
normalised form fields
kant01ne Oct 27, 2020
eafb550
normaliseAppInfo + use enums in constants
kant01ne Oct 27, 2020
804dd3c
remove unnecessary promises
kant01ne Oct 27, 2020
f4ef15b
remove useless usecallback and useeffect
kant01ne Oct 27, 2020
a8d94ee
signin theme wip
kant01ne Oct 28, 2020
20b414f
signin theme
kant01ne Oct 28, 2020
9b556ef
fix react hooks issue + add eslint to replace deprecated tslint
kant01ne Oct 28, 2020
0888212
signIn/signUp themes
kant01ne Oct 28, 2020
eb48d2c
tweaks
kant01ne Oct 28, 2020
c6d45ba
fix svg
kant01ne Oct 29, 2020
b80ad8b
use focus-within for the writing state
kant01ne Oct 29, 2020
eba2cec
handleChange onFocus only
kant01ne Oct 29, 2020
2cb74b9
normalise emailpassword correctly + restructure emailpassword recipe
kant01ne Oct 29, 2020
567cf04
fix svg
kant01ne Oct 29, 2020
d549e03
add default className for docs
kant01ne Oct 30, 2020
e5ac1df
allow to override palette
kant01ne Oct 30, 2020
84c8b4d
update default password validator
kant01ne Oct 30, 2020
4f1db43
FormBase
kant01ne Oct 31, 2020
e38d2f7
fix recipe import/export
kant01ne Oct 31, 2020
74cef1b
reset password feature and theme
kant01ne Nov 1, 2020
059597b
add test skeleton for password reset
kant01ne Nov 1, 2020
100d5bc
enforce linter pre commit
kant01ne Nov 2, 2020
4f9c829
enforce linter precommit
kant01ne Nov 2, 2020
242439c
enforce linter precommit
kant01ne Nov 2, 2020
2c20c42
remove unnecessary console.log
kant01ne Nov 2, 2020
14a4ea9
trim email + tests
kant01ne Nov 2, 2020
829dd16
add WithRouter to redirect in app with or without react router dom
kant01ne Nov 2, 2020
b1fda65
fix getRoutingComponent returning component
kant01ne Nov 2, 2020
16df6e9
modify git hook to include linter + remove useless EmailPasswordFeatu…
kant01ne Nov 2, 2020
8740e1b
server tests + fix API Calls
kant01ne Nov 3, 2020
56ead14
quick fixes
kant01ne Nov 3, 2020
3b6d3c7
allow autocomplete + correct rubik fonts
kant01ne Nov 3, 2020
133f560
useShadoWDom option
kant01ne Nov 3, 2020
eeb80a2
normaliseEmailPasswordConfig (no throw)
kant01ne Nov 3, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add test skeleton for password reset
kant01ne committed Nov 1, 2020
commit 059597bc87b6385c84298691ff1a45d5e0e10902
Original file line number Diff line number Diff line change
@@ -285,7 +285,8 @@ var SubmitNewPasswordTheme = /*#__PURE__*/ (function(_Component) {
var _this$props = this.props,
defaultStyles = _this$props.defaultStyles,
palette = _this$props.palette,
callAPI = _this$props.callAPI;
callAPI = _this$props.callAPI,
onSignInClicked = _this$props.onSignInClicked;
var styleFromInit = this.props.styleFromInit || {};
var _this$state = this.state,
formFields = _this$state.formFields,
@@ -342,7 +343,7 @@ var SubmitNewPasswordTheme = /*#__PURE__*/ (function(_Component) {
disabled: false,
isLoading: false,
type: "button",
onClick: this.props.onSignInClicked,
onClick: onSignInClicked,
label: "SIGN IN"
})
)
74 changes: 74 additions & 0 deletions test/end-to-end/resetpasswordusingtoken.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/* Copyright (c) 2020, 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
*/

/* https://github.com/babel/babel/issues/9849#issuecomment-487040428 */
import regeneratorRuntime from "regenerator-runtime";
import assert from "assert";
import { spawn } from "child_process";
import puppeteer from "puppeteer";
import { ST_ROOT_CONTAINER } from "../../lib/build/constants";

// Run the tests in a DOM environment.
require("jsdom-global")();

const TEST_APP_BASE_URL = "http://localhost:3031";
/*
* Tests.
*/
describe("SuperTokens Reset password feature/theme", function() {
let testAppChildProcess, browser;

before(async function() {
testAppChildProcess = spawn("./test/startTestApp.sh", ["--test"]);

testAppChildProcess.stderr.on("data", function(data) {
console.log("stderr:" + data);
});

testAppChildProcess.stdout.on("data", function(data) {
if (data.toString().startsWith("LOGS:")) {
console.log(data.toString());
}
});

await new Promise(r => setTimeout(r, 3000));

browser = await puppeteer.launch({
args: ["--no-sandbox", "--disable-setuid-sandbox"],
headless: true
});
});

after(async function() {
await browser.close();
testAppChildProcess.kill();
});

describe("Reset password enter email form test", function() {
it("Should send reset password for valid email", async function() {});
it("Should redirect to form if click on resend link after successful reset password", async function() {});
it("Should show general error if server failure", async function() {});
it("Should call onHandleSuccess props if present", async function() {});
});

describe("Reset password new password form test", function() {
it("Should return error form fields if password is in incorrect format", async function() {});
it("Should return error form fields if password does not match", async function() {});
});
});