[CI] Fix development workflow (#1465)

Since merging #1135 and utilising Go templating to enable/disable the rememeber me and password reset features these have stopped working in the development workflow.
During frontend development if someone wants to modify these values they should modify the `.env.development` file accordingly.
pull/1457/head^2
Amir Zarrinkafsh 2020-11-16 20:58:29 +11:00 committed by GitHub
parent f42b1ea229
commit 106c9032ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 6 deletions

View File

@ -1,2 +1,4 @@
HOST=authelia-frontend
PUBLIC_URL=""
PUBLIC_URL=""
REACT_APP_REMEMBER_ME=true
REACT_APP_RESET_PASSWORD=true

View File

@ -1 +1,3 @@
PUBLIC_URL={{.Base}}
PUBLIC_URL={{.Base}}
REACT_APP_REMEMBER_ME={{.RememberMe}}
REACT_APP_RESET_PASSWORD={{.ResetPassword}}

View File

@ -25,7 +25,7 @@
<title>Login - Authelia</title>
</head>
<body data-basepath="%PUBLIC_URL%" data-rememberme="{{.RememberMe}}" data-disable-resetpassword="{{.ResetPassword}}">
<body data-basepath="%PUBLIC_URL%" data-rememberme="%REACT_APP_REMEMBER_ME%" data-resetpassword="%REACT_APP_RESET_PASSWORD%">
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--

View File

@ -1,6 +1,6 @@
import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
document.body.setAttribute("data-basepath", "");
document.body.setAttribute("data-rememberme", "false");
document.body.setAttribute("data-disable-resetpassword", "false");
document.body.setAttribute("data-rememberme", "true");
document.body.setAttribute("data-resetpassword", "true");
configure({ adapter: new Adapter() });

View File

@ -12,5 +12,5 @@ export function getRememberMe() {
}
export function getResetPassword() {
return getEmbeddedVariable("disable-resetpassword") === "true";
return getEmbeddedVariable("resetpassword") === "true";
}