mirror of
https://github.com/wassname/talk.git
synced 2026-07-21 12:51:03 +08:00
[next] Auth Popup v2 (#2101)
* feat: Implement new Sign In view * feat: Move forgot + resetPassword to new design * feat: Implement sign up with new design * fix: narrow gutter * test: add unit tests * test: integration tests * feat: support show / hide password * feat: support oauth2 flow * feat: add views for user completion * feat: implement oauth2 sign up * test: fix snapshots * fix: lint * fix: get more complete mutation response * fix: removed array of OIDC integrations * fix: renamed resolver function * fix: adapt oidc client implementation * fix: targetFilter should be stream on signup * fix: removed unneeded message * fix: moved password into local profile * fix: made username optional, removed valid null value * fix: linting * fix: respect targetFilter * feat: support user registration mutations - Added `setUsername` - Added `setEmail` - Added `setPassword` - Added `permit` to `@auth` - Added `email` to `User` * fix: fixed issue with query * feat: added user password update * feat: complete sign in mutation * fix: adapt some rebasing gitches * test: improve tests * test: unittest for setting auth token * fix: failing tests * test: move most tests from enzyme to react-test-renderer * fix: remove schema warnings in tests * test: improve window mock * test: test different social login configurations * test: test social logins for sign up * fix: use htmlFor instead of for * test: more feature tests * feat: always go through account completion * test: feature test account completion * feat: addtional account completion test * Update start.ts * chore: refactor auth token retrieval logic
This commit is contained in:
@@ -121,15 +121,37 @@ exports[`accepts correct password 1`] = `
|
||||
>
|
||||
Password
|
||||
</label>
|
||||
<input
|
||||
className="TextField-root TextField-colorRegular TextField-fullWidth"
|
||||
disabled={false}
|
||||
name="password"
|
||||
onChange={[Function]}
|
||||
placeholder="Password"
|
||||
type="password"
|
||||
value="testtest"
|
||||
/>
|
||||
<div
|
||||
className="PasswordField-fullWidth PasswordField-root"
|
||||
>
|
||||
<div
|
||||
className="PasswordField-wrapper"
|
||||
>
|
||||
<input
|
||||
className="PasswordField-colorRegular PasswordField-fullWidth PasswordField-input"
|
||||
disabled={false}
|
||||
name="password"
|
||||
onChange={[Function]}
|
||||
placeholder="Password"
|
||||
type="password"
|
||||
value="testtest"
|
||||
/>
|
||||
<div
|
||||
className="PasswordField-icon"
|
||||
onClick={[Function]}
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
title="Show password"
|
||||
>
|
||||
<span
|
||||
aria-hidden="true"
|
||||
className="Icon-root Icon-sm"
|
||||
>
|
||||
visibility
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeLarge Button-colorPrimary Button-variantFilled Button-fullWidth"
|
||||
@@ -258,15 +280,37 @@ exports[`accepts valid email 1`] = `
|
||||
>
|
||||
Password
|
||||
</label>
|
||||
<input
|
||||
className="TextField-root TextField-colorError TextField-fullWidth"
|
||||
disabled={false}
|
||||
name="password"
|
||||
onChange={[Function]}
|
||||
placeholder="Password"
|
||||
type="password"
|
||||
value=""
|
||||
/>
|
||||
<div
|
||||
className="PasswordField-fullWidth PasswordField-root"
|
||||
>
|
||||
<div
|
||||
className="PasswordField-wrapper"
|
||||
>
|
||||
<input
|
||||
className="PasswordField-colorError PasswordField-fullWidth PasswordField-input"
|
||||
disabled={false}
|
||||
name="password"
|
||||
onChange={[Function]}
|
||||
placeholder="Password"
|
||||
type="password"
|
||||
value=""
|
||||
/>
|
||||
<div
|
||||
className="PasswordField-icon"
|
||||
onClick={[Function]}
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
title="Show password"
|
||||
>
|
||||
<span
|
||||
aria-hidden="true"
|
||||
className="Icon-root Icon-sm"
|
||||
>
|
||||
visibility
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="Message-root Message-colorError Message-fullWidth"
|
||||
>
|
||||
@@ -421,15 +465,37 @@ exports[`checks for invalid email 1`] = `
|
||||
>
|
||||
Password
|
||||
</label>
|
||||
<input
|
||||
className="TextField-root TextField-colorError TextField-fullWidth"
|
||||
disabled={false}
|
||||
name="password"
|
||||
onChange={[Function]}
|
||||
placeholder="Password"
|
||||
type="password"
|
||||
value=""
|
||||
/>
|
||||
<div
|
||||
className="PasswordField-fullWidth PasswordField-root"
|
||||
>
|
||||
<div
|
||||
className="PasswordField-wrapper"
|
||||
>
|
||||
<input
|
||||
className="PasswordField-colorError PasswordField-fullWidth PasswordField-input"
|
||||
disabled={false}
|
||||
name="password"
|
||||
onChange={[Function]}
|
||||
placeholder="Password"
|
||||
type="password"
|
||||
value=""
|
||||
/>
|
||||
<div
|
||||
className="PasswordField-icon"
|
||||
onClick={[Function]}
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
title="Show password"
|
||||
>
|
||||
<span
|
||||
aria-hidden="true"
|
||||
className="Icon-root Icon-sm"
|
||||
>
|
||||
visibility
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="Message-root Message-colorError Message-fullWidth"
|
||||
>
|
||||
@@ -571,15 +637,37 @@ exports[`renders sign in form 1`] = `
|
||||
>
|
||||
Password
|
||||
</label>
|
||||
<input
|
||||
className="TextField-root TextField-colorRegular TextField-fullWidth"
|
||||
disabled={false}
|
||||
name="password"
|
||||
onChange={[Function]}
|
||||
placeholder="Password"
|
||||
type="password"
|
||||
value=""
|
||||
/>
|
||||
<div
|
||||
className="PasswordField-fullWidth PasswordField-root"
|
||||
>
|
||||
<div
|
||||
className="PasswordField-wrapper"
|
||||
>
|
||||
<input
|
||||
className="PasswordField-colorRegular PasswordField-fullWidth PasswordField-input"
|
||||
disabled={false}
|
||||
name="password"
|
||||
onChange={[Function]}
|
||||
placeholder="Password"
|
||||
type="password"
|
||||
value=""
|
||||
/>
|
||||
<div
|
||||
className="PasswordField-icon"
|
||||
onClick={[Function]}
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
title="Show password"
|
||||
>
|
||||
<span
|
||||
aria-hidden="true"
|
||||
className="Icon-root Icon-sm"
|
||||
>
|
||||
visibility
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeLarge Button-colorPrimary Button-variantFilled Button-fullWidth"
|
||||
@@ -721,15 +809,37 @@ exports[`shows error when submitting empty form 1`] = `
|
||||
>
|
||||
Password
|
||||
</label>
|
||||
<input
|
||||
className="TextField-root TextField-colorError TextField-fullWidth"
|
||||
disabled={false}
|
||||
name="password"
|
||||
onChange={[Function]}
|
||||
placeholder="Password"
|
||||
type="password"
|
||||
value=""
|
||||
/>
|
||||
<div
|
||||
className="PasswordField-fullWidth PasswordField-root"
|
||||
>
|
||||
<div
|
||||
className="PasswordField-wrapper"
|
||||
>
|
||||
<input
|
||||
className="PasswordField-colorError PasswordField-fullWidth PasswordField-input"
|
||||
disabled={false}
|
||||
name="password"
|
||||
onChange={[Function]}
|
||||
placeholder="Password"
|
||||
type="password"
|
||||
value=""
|
||||
/>
|
||||
<div
|
||||
className="PasswordField-icon"
|
||||
onClick={[Function]}
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
title="Show password"
|
||||
>
|
||||
<span
|
||||
aria-hidden="true"
|
||||
className="Icon-root Icon-sm"
|
||||
>
|
||||
visibility
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="Message-root Message-colorError Message-fullWidth"
|
||||
>
|
||||
@@ -871,15 +981,37 @@ exports[`shows server error 1`] = `
|
||||
>
|
||||
Password
|
||||
</label>
|
||||
<input
|
||||
className="TextField-root TextField-colorRegular TextField-fullWidth"
|
||||
disabled={true}
|
||||
name="password"
|
||||
onChange={[Function]}
|
||||
placeholder="Password"
|
||||
type="password"
|
||||
value="testtest"
|
||||
/>
|
||||
<div
|
||||
className="PasswordField-fullWidth PasswordField-root"
|
||||
>
|
||||
<div
|
||||
className="PasswordField-wrapper"
|
||||
>
|
||||
<input
|
||||
className="PasswordField-colorRegular PasswordField-fullWidth PasswordField-input"
|
||||
disabled={true}
|
||||
name="password"
|
||||
onChange={[Function]}
|
||||
placeholder="Password"
|
||||
type="password"
|
||||
value="testtest"
|
||||
/>
|
||||
<div
|
||||
className="PasswordField-icon"
|
||||
onClick={[Function]}
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
title="Show password"
|
||||
>
|
||||
<span
|
||||
aria-hidden="true"
|
||||
className="Icon-root Icon-sm"
|
||||
>
|
||||
visibility
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeLarge Button-colorPrimary Button-variantFilled Button-fullWidth Button-disabled"
|
||||
@@ -1013,15 +1145,37 @@ exports[`shows server error 2`] = `
|
||||
>
|
||||
Password
|
||||
</label>
|
||||
<input
|
||||
className="TextField-root TextField-colorRegular TextField-fullWidth"
|
||||
disabled={false}
|
||||
name="password"
|
||||
onChange={[Function]}
|
||||
placeholder="Password"
|
||||
type="password"
|
||||
value="testtest"
|
||||
/>
|
||||
<div
|
||||
className="PasswordField-fullWidth PasswordField-root"
|
||||
>
|
||||
<div
|
||||
className="PasswordField-wrapper"
|
||||
>
|
||||
<input
|
||||
className="PasswordField-colorRegular PasswordField-fullWidth PasswordField-input"
|
||||
disabled={false}
|
||||
name="password"
|
||||
onChange={[Function]}
|
||||
placeholder="Password"
|
||||
type="password"
|
||||
value="testtest"
|
||||
/>
|
||||
<div
|
||||
className="PasswordField-icon"
|
||||
onClick={[Function]}
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
title="Show password"
|
||||
>
|
||||
<span
|
||||
aria-hidden="true"
|
||||
className="Icon-root Icon-sm"
|
||||
>
|
||||
visibility
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeLarge Button-colorPrimary Button-variantFilled Button-fullWidth"
|
||||
@@ -1150,15 +1304,37 @@ exports[`submits form successfully 1`] = `
|
||||
>
|
||||
Password
|
||||
</label>
|
||||
<input
|
||||
className="TextField-root TextField-colorRegular TextField-fullWidth"
|
||||
disabled={true}
|
||||
name="password"
|
||||
onChange={[Function]}
|
||||
placeholder="Password"
|
||||
type="password"
|
||||
value="testtest"
|
||||
/>
|
||||
<div
|
||||
className="PasswordField-fullWidth PasswordField-root"
|
||||
>
|
||||
<div
|
||||
className="PasswordField-wrapper"
|
||||
>
|
||||
<input
|
||||
className="PasswordField-colorRegular PasswordField-fullWidth PasswordField-input"
|
||||
disabled={true}
|
||||
name="password"
|
||||
onChange={[Function]}
|
||||
placeholder="Password"
|
||||
type="password"
|
||||
value="testtest"
|
||||
/>
|
||||
<div
|
||||
className="PasswordField-icon"
|
||||
onClick={[Function]}
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
title="Show password"
|
||||
>
|
||||
<span
|
||||
aria-hidden="true"
|
||||
className="Icon-root Icon-sm"
|
||||
>
|
||||
visibility
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeLarge Button-colorPrimary Button-variantFilled Button-fullWidth Button-disabled"
|
||||
@@ -1287,15 +1463,37 @@ exports[`submits form successfully 2`] = `
|
||||
>
|
||||
Password
|
||||
</label>
|
||||
<input
|
||||
className="TextField-root TextField-colorRegular TextField-fullWidth"
|
||||
disabled={false}
|
||||
name="password"
|
||||
onChange={[Function]}
|
||||
placeholder="Password"
|
||||
type="password"
|
||||
value=""
|
||||
/>
|
||||
<div
|
||||
className="PasswordField-fullWidth PasswordField-root"
|
||||
>
|
||||
<div
|
||||
className="PasswordField-wrapper"
|
||||
>
|
||||
<input
|
||||
className="PasswordField-colorRegular PasswordField-fullWidth PasswordField-input"
|
||||
disabled={false}
|
||||
name="password"
|
||||
onChange={[Function]}
|
||||
placeholder="Password"
|
||||
type="password"
|
||||
value=""
|
||||
/>
|
||||
<div
|
||||
className="PasswordField-icon"
|
||||
onClick={[Function]}
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
title="Show password"
|
||||
>
|
||||
<span
|
||||
aria-hidden="true"
|
||||
className="Icon-root Icon-sm"
|
||||
>
|
||||
visibility
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeLarge Button-colorPrimary Button-variantFilled Button-fullWidth"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
exports[`change settings: during submit: oidc without errors 1`] = `
|
||||
<div
|
||||
className="ConfigBox-root"
|
||||
data-test="configure-auth-oidc-container-0"
|
||||
data-testid="configure-auth-oidc-container"
|
||||
>
|
||||
<div
|
||||
className="Flex-root ConfigBox-title Flex-flex Flex-justifySpaceBetween"
|
||||
@@ -24,8 +24,8 @@ exports[`change settings: during submit: oidc without errors 1`] = `
|
||||
checked={true}
|
||||
className="CheckBox-input"
|
||||
disabled={true}
|
||||
id="auth.integrations.oidc.0.enabled"
|
||||
name="auth.integrations.oidc.0.enabled"
|
||||
id="auth.integrations.oidc.enabled"
|
||||
name="auth.integrations.oidc.enabled"
|
||||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
@@ -33,7 +33,7 @@ exports[`change settings: during submit: oidc without errors 1`] = `
|
||||
/>
|
||||
<label
|
||||
className="CheckBox-label CheckBox-labelLight"
|
||||
htmlFor="auth.integrations.oidc.0.enabled"
|
||||
htmlFor="auth.integrations.oidc.enabled"
|
||||
>
|
||||
<span
|
||||
className="CheckBox-labelSpan"
|
||||
@@ -74,23 +74,6 @@ exports[`change settings: during submit: oidc without errors 1`] = `
|
||||
>
|
||||
Redirect URI
|
||||
</label>
|
||||
<div
|
||||
className="Typography-root Typography-detail Typography-colorTextSecondary ConfigDescription-description"
|
||||
>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter"
|
||||
>
|
||||
<span
|
||||
aria-hidden="true"
|
||||
className="Icon-root OIDCConfig-redirectDescriptionIcon Icon-sm"
|
||||
>
|
||||
error
|
||||
</span>
|
||||
<div>
|
||||
For OpenID Connect, your Redirect URI will not appear until you after you save this integration.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-alignCenter Flex-directionRow"
|
||||
>
|
||||
@@ -100,7 +83,7 @@ exports[`change settings: during submit: oidc without errors 1`] = `
|
||||
placeholder=""
|
||||
readOnly={true}
|
||||
type="text"
|
||||
value=""
|
||||
value="http://localhost/oidc/callback"
|
||||
/>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorPrimary Button-variantFilled"
|
||||
@@ -141,7 +124,7 @@ needs to be displayed, e.g. “Log in with <Facebook>”.
|
||||
autoCorrect="off"
|
||||
className="TextField-root TextField-colorRegular"
|
||||
disabled={true}
|
||||
name="auth.integrations.oidc.0.name"
|
||||
name="auth.integrations.oidc.name"
|
||||
onChange={[Function]}
|
||||
placeholder=""
|
||||
spellCheck={false}
|
||||
@@ -163,7 +146,7 @@ needs to be displayed, e.g. “Log in with <Facebook>”.
|
||||
autoCorrect="off"
|
||||
className="TextField-root TextField-colorRegular"
|
||||
disabled={true}
|
||||
name="auth.integrations.oidc.0.clientID"
|
||||
name="auth.integrations.oidc.clientID"
|
||||
onChange={[Function]}
|
||||
placeholder=""
|
||||
spellCheck={false}
|
||||
@@ -185,7 +168,7 @@ needs to be displayed, e.g. “Log in with <Facebook>”.
|
||||
autoCorrect="off"
|
||||
className="TextField-root TextField-colorRegular"
|
||||
disabled={true}
|
||||
name="auth.integrations.oidc.0.clientSecret"
|
||||
name="auth.integrations.oidc.clientSecret"
|
||||
onChange={[Function]}
|
||||
placeholder=""
|
||||
spellCheck={false}
|
||||
@@ -216,7 +199,7 @@ the remaining fields. You may also enter the information manually.
|
||||
autoCorrect="off"
|
||||
className="TextField-root TextField-colorRegular"
|
||||
disabled={true}
|
||||
name="auth.integrations.oidc.0.issuer"
|
||||
name="auth.integrations.oidc.issuer"
|
||||
onChange={[Function]}
|
||||
placeholder=""
|
||||
spellCheck={false}
|
||||
@@ -226,7 +209,7 @@ the remaining fields. You may also enter the information manually.
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorPrimary Button-variantFilled Button-disabled"
|
||||
disabled={true}
|
||||
id="configure-auth-oidc-discover-0"
|
||||
id="configure-auth-oidc-discover"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
@@ -253,7 +236,7 @@ the remaining fields. You may also enter the information manually.
|
||||
autoCorrect="off"
|
||||
className="TextField-root TextField-colorRegular"
|
||||
disabled={true}
|
||||
name="auth.integrations.oidc.0.authorizationURL"
|
||||
name="auth.integrations.oidc.authorizationURL"
|
||||
onChange={[Function]}
|
||||
placeholder=""
|
||||
spellCheck={false}
|
||||
@@ -275,7 +258,7 @@ the remaining fields. You may also enter the information manually.
|
||||
autoCorrect="off"
|
||||
className="TextField-root TextField-colorRegular"
|
||||
disabled={true}
|
||||
name="auth.integrations.oidc.0.tokenURL"
|
||||
name="auth.integrations.oidc.tokenURL"
|
||||
onChange={[Function]}
|
||||
placeholder=""
|
||||
spellCheck={false}
|
||||
@@ -297,7 +280,7 @@ the remaining fields. You may also enter the information manually.
|
||||
autoCorrect="off"
|
||||
className="TextField-root TextField-colorRegular"
|
||||
disabled={true}
|
||||
name="auth.integrations.oidc.0.jwksURI"
|
||||
name="auth.integrations.oidc.jwksURI"
|
||||
onChange={[Function]}
|
||||
placeholder=""
|
||||
spellCheck={false}
|
||||
@@ -325,8 +308,8 @@ the remaining fields. You may also enter the information manually.
|
||||
checked={true}
|
||||
className="CheckBox-input"
|
||||
disabled={true}
|
||||
id="auth.integrations.oidc.0.targetFilter.admin"
|
||||
name="auth.integrations.oidc.0.targetFilter.admin"
|
||||
id="auth.integrations.oidc.targetFilter.admin"
|
||||
name="auth.integrations.oidc.targetFilter.admin"
|
||||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
@@ -334,7 +317,7 @@ the remaining fields. You may also enter the information manually.
|
||||
/>
|
||||
<label
|
||||
className="CheckBox-label"
|
||||
htmlFor="auth.integrations.oidc.0.targetFilter.admin"
|
||||
htmlFor="auth.integrations.oidc.targetFilter.admin"
|
||||
>
|
||||
<span
|
||||
className="CheckBox-labelSpan"
|
||||
@@ -350,8 +333,8 @@ the remaining fields. You may also enter the information manually.
|
||||
checked={true}
|
||||
className="CheckBox-input"
|
||||
disabled={true}
|
||||
id="auth.integrations.oidc.0.targetFilter.stream"
|
||||
name="auth.integrations.oidc.0.targetFilter.stream"
|
||||
id="auth.integrations.oidc.targetFilter.stream"
|
||||
name="auth.integrations.oidc.targetFilter.stream"
|
||||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
@@ -359,7 +342,7 @@ the remaining fields. You may also enter the information manually.
|
||||
/>
|
||||
<label
|
||||
className="CheckBox-label"
|
||||
htmlFor="auth.integrations.oidc.0.targetFilter.stream"
|
||||
htmlFor="auth.integrations.oidc.targetFilter.stream"
|
||||
>
|
||||
<span
|
||||
className="CheckBox-labelSpan"
|
||||
@@ -394,8 +377,8 @@ integration to register for a new account.
|
||||
checked={false}
|
||||
className="CheckBox-input"
|
||||
disabled={true}
|
||||
id="auth.integrations.oidc.0.allowRegistration"
|
||||
name="auth.integrations.oidc.0.allowRegistration"
|
||||
id="auth.integrations.oidc.allowRegistration"
|
||||
name="auth.integrations.oidc.allowRegistration"
|
||||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
@@ -403,7 +386,7 @@ integration to register for a new account.
|
||||
/>
|
||||
<label
|
||||
className="CheckBox-label"
|
||||
htmlFor="auth.integrations.oidc.0.allowRegistration"
|
||||
htmlFor="auth.integrations.oidc.allowRegistration"
|
||||
>
|
||||
<span
|
||||
className="CheckBox-labelSpan"
|
||||
@@ -422,7 +405,7 @@ integration to register for a new account.
|
||||
exports[`change settings: enable facebook configure box 1`] = `
|
||||
<div
|
||||
className="ConfigBox-root"
|
||||
data-test="configure-auth-facebook-container"
|
||||
data-testid="configure-auth-facebook-container"
|
||||
>
|
||||
<div
|
||||
className="Flex-root ConfigBox-title Flex-flex Flex-justifySpaceBetween"
|
||||
@@ -687,7 +670,7 @@ integration to register for a new account.
|
||||
exports[`change settings: enable oidc configure box 1`] = `
|
||||
<div
|
||||
className="ConfigBox-root"
|
||||
data-test="configure-auth-oidc-container-0"
|
||||
data-testid="configure-auth-oidc-container"
|
||||
>
|
||||
<div
|
||||
className="Flex-root ConfigBox-title Flex-flex Flex-justifySpaceBetween"
|
||||
@@ -708,8 +691,8 @@ exports[`change settings: enable oidc configure box 1`] = `
|
||||
checked={true}
|
||||
className="CheckBox-input"
|
||||
disabled={false}
|
||||
id="auth.integrations.oidc.0.enabled"
|
||||
name="auth.integrations.oidc.0.enabled"
|
||||
id="auth.integrations.oidc.enabled"
|
||||
name="auth.integrations.oidc.enabled"
|
||||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
@@ -717,7 +700,7 @@ exports[`change settings: enable oidc configure box 1`] = `
|
||||
/>
|
||||
<label
|
||||
className="CheckBox-label CheckBox-labelLight"
|
||||
htmlFor="auth.integrations.oidc.0.enabled"
|
||||
htmlFor="auth.integrations.oidc.enabled"
|
||||
>
|
||||
<span
|
||||
className="CheckBox-labelSpan"
|
||||
@@ -758,23 +741,6 @@ exports[`change settings: enable oidc configure box 1`] = `
|
||||
>
|
||||
Redirect URI
|
||||
</label>
|
||||
<div
|
||||
className="Typography-root Typography-detail Typography-colorTextSecondary ConfigDescription-description"
|
||||
>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter"
|
||||
>
|
||||
<span
|
||||
aria-hidden="true"
|
||||
className="Icon-root OIDCConfig-redirectDescriptionIcon Icon-sm"
|
||||
>
|
||||
error
|
||||
</span>
|
||||
<div>
|
||||
For OpenID Connect, your Redirect URI will not appear until you after you save this integration.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-alignCenter Flex-directionRow"
|
||||
>
|
||||
@@ -784,7 +750,7 @@ exports[`change settings: enable oidc configure box 1`] = `
|
||||
placeholder=""
|
||||
readOnly={true}
|
||||
type="text"
|
||||
value=""
|
||||
value="http://localhost/oidc/callback"
|
||||
/>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorPrimary Button-variantFilled"
|
||||
@@ -825,7 +791,7 @@ needs to be displayed, e.g. “Log in with <Facebook>”.
|
||||
autoCorrect="off"
|
||||
className="TextField-root TextField-colorRegular"
|
||||
disabled={false}
|
||||
name="auth.integrations.oidc.0.name"
|
||||
name="auth.integrations.oidc.name"
|
||||
onChange={[Function]}
|
||||
placeholder=""
|
||||
spellCheck={false}
|
||||
@@ -847,7 +813,7 @@ needs to be displayed, e.g. “Log in with <Facebook>”.
|
||||
autoCorrect="off"
|
||||
className="TextField-root TextField-colorRegular"
|
||||
disabled={false}
|
||||
name="auth.integrations.oidc.0.clientID"
|
||||
name="auth.integrations.oidc.clientID"
|
||||
onChange={[Function]}
|
||||
placeholder=""
|
||||
spellCheck={false}
|
||||
@@ -869,7 +835,7 @@ needs to be displayed, e.g. “Log in with <Facebook>”.
|
||||
autoCorrect="off"
|
||||
className="TextField-root TextField-colorRegular"
|
||||
disabled={false}
|
||||
name="auth.integrations.oidc.0.clientSecret"
|
||||
name="auth.integrations.oidc.clientSecret"
|
||||
onChange={[Function]}
|
||||
placeholder=""
|
||||
spellCheck={false}
|
||||
@@ -900,7 +866,7 @@ the remaining fields. You may also enter the information manually.
|
||||
autoCorrect="off"
|
||||
className="TextField-root TextField-colorRegular"
|
||||
disabled={false}
|
||||
name="auth.integrations.oidc.0.issuer"
|
||||
name="auth.integrations.oidc.issuer"
|
||||
onChange={[Function]}
|
||||
placeholder=""
|
||||
spellCheck={false}
|
||||
@@ -910,7 +876,7 @@ the remaining fields. You may also enter the information manually.
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorPrimary Button-variantFilled"
|
||||
disabled={false}
|
||||
id="configure-auth-oidc-discover-0"
|
||||
id="configure-auth-oidc-discover"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
@@ -937,7 +903,7 @@ the remaining fields. You may also enter the information manually.
|
||||
autoCorrect="off"
|
||||
className="TextField-root TextField-colorRegular"
|
||||
disabled={false}
|
||||
name="auth.integrations.oidc.0.authorizationURL"
|
||||
name="auth.integrations.oidc.authorizationURL"
|
||||
onChange={[Function]}
|
||||
placeholder=""
|
||||
spellCheck={false}
|
||||
@@ -959,7 +925,7 @@ the remaining fields. You may also enter the information manually.
|
||||
autoCorrect="off"
|
||||
className="TextField-root TextField-colorRegular"
|
||||
disabled={false}
|
||||
name="auth.integrations.oidc.0.tokenURL"
|
||||
name="auth.integrations.oidc.tokenURL"
|
||||
onChange={[Function]}
|
||||
placeholder=""
|
||||
spellCheck={false}
|
||||
@@ -981,7 +947,7 @@ the remaining fields. You may also enter the information manually.
|
||||
autoCorrect="off"
|
||||
className="TextField-root TextField-colorRegular"
|
||||
disabled={false}
|
||||
name="auth.integrations.oidc.0.jwksURI"
|
||||
name="auth.integrations.oidc.jwksURI"
|
||||
onChange={[Function]}
|
||||
placeholder=""
|
||||
spellCheck={false}
|
||||
@@ -1009,8 +975,8 @@ the remaining fields. You may also enter the information manually.
|
||||
checked={true}
|
||||
className="CheckBox-input"
|
||||
disabled={false}
|
||||
id="auth.integrations.oidc.0.targetFilter.admin"
|
||||
name="auth.integrations.oidc.0.targetFilter.admin"
|
||||
id="auth.integrations.oidc.targetFilter.admin"
|
||||
name="auth.integrations.oidc.targetFilter.admin"
|
||||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
@@ -1018,7 +984,7 @@ the remaining fields. You may also enter the information manually.
|
||||
/>
|
||||
<label
|
||||
className="CheckBox-label"
|
||||
htmlFor="auth.integrations.oidc.0.targetFilter.admin"
|
||||
htmlFor="auth.integrations.oidc.targetFilter.admin"
|
||||
>
|
||||
<span
|
||||
className="CheckBox-labelSpan"
|
||||
@@ -1034,8 +1000,8 @@ the remaining fields. You may also enter the information manually.
|
||||
checked={true}
|
||||
className="CheckBox-input"
|
||||
disabled={false}
|
||||
id="auth.integrations.oidc.0.targetFilter.stream"
|
||||
name="auth.integrations.oidc.0.targetFilter.stream"
|
||||
id="auth.integrations.oidc.targetFilter.stream"
|
||||
name="auth.integrations.oidc.targetFilter.stream"
|
||||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
@@ -1043,7 +1009,7 @@ the remaining fields. You may also enter the information manually.
|
||||
/>
|
||||
<label
|
||||
className="CheckBox-label"
|
||||
htmlFor="auth.integrations.oidc.0.targetFilter.stream"
|
||||
htmlFor="auth.integrations.oidc.targetFilter.stream"
|
||||
>
|
||||
<span
|
||||
className="CheckBox-labelSpan"
|
||||
@@ -1078,8 +1044,8 @@ integration to register for a new account.
|
||||
checked={false}
|
||||
className="CheckBox-input"
|
||||
disabled={false}
|
||||
id="auth.integrations.oidc.0.allowRegistration"
|
||||
name="auth.integrations.oidc.0.allowRegistration"
|
||||
id="auth.integrations.oidc.allowRegistration"
|
||||
name="auth.integrations.oidc.allowRegistration"
|
||||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
@@ -1087,7 +1053,7 @@ integration to register for a new account.
|
||||
/>
|
||||
<label
|
||||
className="CheckBox-label"
|
||||
htmlFor="auth.integrations.oidc.0.allowRegistration"
|
||||
htmlFor="auth.integrations.oidc.allowRegistration"
|
||||
>
|
||||
<span
|
||||
className="CheckBox-labelSpan"
|
||||
@@ -1106,7 +1072,7 @@ integration to register for a new account.
|
||||
exports[`change settings: oidc validation errors 1`] = `
|
||||
<div
|
||||
className="ConfigBox-root"
|
||||
data-test="configure-auth-oidc-container-0"
|
||||
data-testid="configure-auth-oidc-container"
|
||||
>
|
||||
<div
|
||||
className="Flex-root ConfigBox-title Flex-flex Flex-justifySpaceBetween"
|
||||
@@ -1127,8 +1093,8 @@ exports[`change settings: oidc validation errors 1`] = `
|
||||
checked={true}
|
||||
className="CheckBox-input"
|
||||
disabled={false}
|
||||
id="auth.integrations.oidc.0.enabled"
|
||||
name="auth.integrations.oidc.0.enabled"
|
||||
id="auth.integrations.oidc.enabled"
|
||||
name="auth.integrations.oidc.enabled"
|
||||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
@@ -1136,7 +1102,7 @@ exports[`change settings: oidc validation errors 1`] = `
|
||||
/>
|
||||
<label
|
||||
className="CheckBox-label CheckBox-labelLight"
|
||||
htmlFor="auth.integrations.oidc.0.enabled"
|
||||
htmlFor="auth.integrations.oidc.enabled"
|
||||
>
|
||||
<span
|
||||
className="CheckBox-labelSpan"
|
||||
@@ -1177,23 +1143,6 @@ exports[`change settings: oidc validation errors 1`] = `
|
||||
>
|
||||
Redirect URI
|
||||
</label>
|
||||
<div
|
||||
className="Typography-root Typography-detail Typography-colorTextSecondary ConfigDescription-description"
|
||||
>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter"
|
||||
>
|
||||
<span
|
||||
aria-hidden="true"
|
||||
className="Icon-root OIDCConfig-redirectDescriptionIcon Icon-sm"
|
||||
>
|
||||
error
|
||||
</span>
|
||||
<div>
|
||||
For OpenID Connect, your Redirect URI will not appear until you after you save this integration.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-alignCenter Flex-directionRow"
|
||||
>
|
||||
@@ -1203,7 +1152,7 @@ exports[`change settings: oidc validation errors 1`] = `
|
||||
placeholder=""
|
||||
readOnly={true}
|
||||
type="text"
|
||||
value=""
|
||||
value="http://localhost/oidc/callback"
|
||||
/>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorPrimary Button-variantFilled"
|
||||
@@ -1244,7 +1193,7 @@ needs to be displayed, e.g. “Log in with <Facebook>”.
|
||||
autoCorrect="off"
|
||||
className="TextField-root TextField-colorRegular"
|
||||
disabled={false}
|
||||
name="auth.integrations.oidc.0.name"
|
||||
name="auth.integrations.oidc.name"
|
||||
onChange={[Function]}
|
||||
placeholder=""
|
||||
spellCheck={false}
|
||||
@@ -1279,7 +1228,7 @@ needs to be displayed, e.g. “Log in with <Facebook>”.
|
||||
autoCorrect="off"
|
||||
className="TextField-root TextField-colorRegular"
|
||||
disabled={false}
|
||||
name="auth.integrations.oidc.0.clientID"
|
||||
name="auth.integrations.oidc.clientID"
|
||||
onChange={[Function]}
|
||||
placeholder=""
|
||||
spellCheck={false}
|
||||
@@ -1314,7 +1263,7 @@ needs to be displayed, e.g. “Log in with <Facebook>”.
|
||||
autoCorrect="off"
|
||||
className="TextField-root TextField-colorRegular"
|
||||
disabled={false}
|
||||
name="auth.integrations.oidc.0.clientSecret"
|
||||
name="auth.integrations.oidc.clientSecret"
|
||||
onChange={[Function]}
|
||||
placeholder=""
|
||||
spellCheck={false}
|
||||
@@ -1358,7 +1307,7 @@ the remaining fields. You may also enter the information manually.
|
||||
autoCorrect="off"
|
||||
className="TextField-root TextField-colorRegular"
|
||||
disabled={false}
|
||||
name="auth.integrations.oidc.0.issuer"
|
||||
name="auth.integrations.oidc.issuer"
|
||||
onChange={[Function]}
|
||||
placeholder=""
|
||||
spellCheck={false}
|
||||
@@ -1368,7 +1317,7 @@ the remaining fields. You may also enter the information manually.
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorPrimary Button-variantFilled"
|
||||
disabled={false}
|
||||
id="configure-auth-oidc-discover-0"
|
||||
id="configure-auth-oidc-discover"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
@@ -1408,7 +1357,7 @@ the remaining fields. You may also enter the information manually.
|
||||
autoCorrect="off"
|
||||
className="TextField-root TextField-colorRegular"
|
||||
disabled={false}
|
||||
name="auth.integrations.oidc.0.authorizationURL"
|
||||
name="auth.integrations.oidc.authorizationURL"
|
||||
onChange={[Function]}
|
||||
placeholder=""
|
||||
spellCheck={false}
|
||||
@@ -1443,7 +1392,7 @@ the remaining fields. You may also enter the information manually.
|
||||
autoCorrect="off"
|
||||
className="TextField-root TextField-colorRegular"
|
||||
disabled={false}
|
||||
name="auth.integrations.oidc.0.tokenURL"
|
||||
name="auth.integrations.oidc.tokenURL"
|
||||
onChange={[Function]}
|
||||
placeholder=""
|
||||
spellCheck={false}
|
||||
@@ -1478,7 +1427,7 @@ the remaining fields. You may also enter the information manually.
|
||||
autoCorrect="off"
|
||||
className="TextField-root TextField-colorRegular"
|
||||
disabled={false}
|
||||
name="auth.integrations.oidc.0.jwksURI"
|
||||
name="auth.integrations.oidc.jwksURI"
|
||||
onChange={[Function]}
|
||||
placeholder=""
|
||||
spellCheck={false}
|
||||
@@ -1519,8 +1468,8 @@ the remaining fields. You may also enter the information manually.
|
||||
checked={true}
|
||||
className="CheckBox-input"
|
||||
disabled={false}
|
||||
id="auth.integrations.oidc.0.targetFilter.admin"
|
||||
name="auth.integrations.oidc.0.targetFilter.admin"
|
||||
id="auth.integrations.oidc.targetFilter.admin"
|
||||
name="auth.integrations.oidc.targetFilter.admin"
|
||||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
@@ -1528,7 +1477,7 @@ the remaining fields. You may also enter the information manually.
|
||||
/>
|
||||
<label
|
||||
className="CheckBox-label"
|
||||
htmlFor="auth.integrations.oidc.0.targetFilter.admin"
|
||||
htmlFor="auth.integrations.oidc.targetFilter.admin"
|
||||
>
|
||||
<span
|
||||
className="CheckBox-labelSpan"
|
||||
@@ -1544,8 +1493,8 @@ the remaining fields. You may also enter the information manually.
|
||||
checked={true}
|
||||
className="CheckBox-input"
|
||||
disabled={false}
|
||||
id="auth.integrations.oidc.0.targetFilter.stream"
|
||||
name="auth.integrations.oidc.0.targetFilter.stream"
|
||||
id="auth.integrations.oidc.targetFilter.stream"
|
||||
name="auth.integrations.oidc.targetFilter.stream"
|
||||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
@@ -1553,7 +1502,7 @@ the remaining fields. You may also enter the information manually.
|
||||
/>
|
||||
<label
|
||||
className="CheckBox-label"
|
||||
htmlFor="auth.integrations.oidc.0.targetFilter.stream"
|
||||
htmlFor="auth.integrations.oidc.targetFilter.stream"
|
||||
>
|
||||
<span
|
||||
className="CheckBox-labelSpan"
|
||||
@@ -1588,8 +1537,8 @@ integration to register for a new account.
|
||||
checked={false}
|
||||
className="CheckBox-input"
|
||||
disabled={false}
|
||||
id="auth.integrations.oidc.0.allowRegistration"
|
||||
name="auth.integrations.oidc.0.allowRegistration"
|
||||
id="auth.integrations.oidc.allowRegistration"
|
||||
name="auth.integrations.oidc.allowRegistration"
|
||||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
@@ -1597,7 +1546,7 @@ integration to register for a new account.
|
||||
/>
|
||||
<label
|
||||
className="CheckBox-label"
|
||||
htmlFor="auth.integrations.oidc.0.allowRegistration"
|
||||
htmlFor="auth.integrations.oidc.allowRegistration"
|
||||
>
|
||||
<span
|
||||
className="CheckBox-labelSpan"
|
||||
@@ -1616,7 +1565,7 @@ integration to register for a new account.
|
||||
exports[`prevents admin lock out 1`] = `
|
||||
<div
|
||||
className="CallOut-root CallOut-colorError CallOut-fullWidth"
|
||||
data-test="configure-auth-submitError"
|
||||
data-testid="configure-auth-submitError"
|
||||
>
|
||||
<span>
|
||||
Please enable at least one authentication integration for Talk Admin
|
||||
@@ -1627,7 +1576,7 @@ exports[`prevents admin lock out 1`] = `
|
||||
exports[`regenerate sso key 1`] = `
|
||||
<div
|
||||
className="HorizontalGutter-root FormField-root HorizontalGutter-half"
|
||||
data-test="configure-auth-sso-key"
|
||||
data-testid="configure-auth-sso-key"
|
||||
>
|
||||
<label
|
||||
className="Typography-root Typography-inputLabel Typography-colorTextPrimary InputLabel-root"
|
||||
@@ -1688,7 +1637,7 @@ and all signed-in users will be signed out.
|
||||
exports[`renders configure auth 1`] = `
|
||||
<div
|
||||
className="MainLayout-root"
|
||||
data-test="configure-container"
|
||||
data-testid="configure-container"
|
||||
>
|
||||
<form
|
||||
autoComplete="off"
|
||||
@@ -1736,7 +1685,7 @@ exports[`renders configure auth 1`] = `
|
||||
>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeRegular Button-colorSuccess Button-variantFilled Button-disabled"
|
||||
data-test="configure-sideBar-saveChanges"
|
||||
data-testid="configure-sideBar-saveChanges"
|
||||
disabled={true}
|
||||
onBlur={[Function]}
|
||||
onFocus={[Function]}
|
||||
@@ -2000,7 +1949,7 @@ integration to register for a new account.
|
||||
</div>
|
||||
<div
|
||||
className="ConfigBox-root"
|
||||
data-test="configure-auth-oidc-container-0"
|
||||
data-testid="configure-auth-oidc-container"
|
||||
>
|
||||
<div
|
||||
className="Flex-root ConfigBox-title Flex-flex Flex-justifySpaceBetween"
|
||||
@@ -2018,11 +1967,11 @@ integration to register for a new account.
|
||||
className="CheckBox-root"
|
||||
>
|
||||
<input
|
||||
checked=""
|
||||
checked={false}
|
||||
className="CheckBox-input"
|
||||
disabled={false}
|
||||
id="auth.integrations.oidc.0.enabled"
|
||||
name="auth.integrations.oidc.0.enabled"
|
||||
id="auth.integrations.oidc.enabled"
|
||||
name="auth.integrations.oidc.enabled"
|
||||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
@@ -2030,7 +1979,7 @@ integration to register for a new account.
|
||||
/>
|
||||
<label
|
||||
className="CheckBox-label CheckBox-labelLight"
|
||||
htmlFor="auth.integrations.oidc.0.enabled"
|
||||
htmlFor="auth.integrations.oidc.enabled"
|
||||
>
|
||||
<span
|
||||
className="CheckBox-labelSpan"
|
||||
@@ -2071,23 +2020,6 @@ integration to register for a new account.
|
||||
>
|
||||
Redirect URI
|
||||
</label>
|
||||
<div
|
||||
className="Typography-root Typography-detail Typography-colorTextSecondary ConfigDescription-description"
|
||||
>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter"
|
||||
>
|
||||
<span
|
||||
aria-hidden="true"
|
||||
className="Icon-root OIDCConfig-redirectDescriptionIcon Icon-sm"
|
||||
>
|
||||
error
|
||||
</span>
|
||||
<div>
|
||||
For OpenID Connect, your Redirect URI will not appear until you after you save this integration.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="Flex-root Flex-flex Flex-halfItemGutter Flex-alignCenter Flex-directionRow"
|
||||
>
|
||||
@@ -2097,7 +2029,7 @@ integration to register for a new account.
|
||||
placeholder=""
|
||||
readOnly={true}
|
||||
type="text"
|
||||
value=""
|
||||
value="http://localhost/oidc/callback"
|
||||
/>
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorPrimary Button-variantFilled"
|
||||
@@ -2138,7 +2070,7 @@ needs to be displayed, e.g. “Log in with <Facebook>”.
|
||||
autoCorrect="off"
|
||||
className="TextField-root TextField-colorRegular"
|
||||
disabled={true}
|
||||
name="auth.integrations.oidc.0.name"
|
||||
name="auth.integrations.oidc.name"
|
||||
onChange={[Function]}
|
||||
placeholder=""
|
||||
spellCheck={false}
|
||||
@@ -2160,7 +2092,7 @@ needs to be displayed, e.g. “Log in with <Facebook>”.
|
||||
autoCorrect="off"
|
||||
className="TextField-root TextField-colorRegular"
|
||||
disabled={true}
|
||||
name="auth.integrations.oidc.0.clientID"
|
||||
name="auth.integrations.oidc.clientID"
|
||||
onChange={[Function]}
|
||||
placeholder=""
|
||||
spellCheck={false}
|
||||
@@ -2182,7 +2114,7 @@ needs to be displayed, e.g. “Log in with <Facebook>”.
|
||||
autoCorrect="off"
|
||||
className="TextField-root TextField-colorRegular"
|
||||
disabled={true}
|
||||
name="auth.integrations.oidc.0.clientSecret"
|
||||
name="auth.integrations.oidc.clientSecret"
|
||||
onChange={[Function]}
|
||||
placeholder=""
|
||||
spellCheck={false}
|
||||
@@ -2213,7 +2145,7 @@ the remaining fields. You may also enter the information manually.
|
||||
autoCorrect="off"
|
||||
className="TextField-root TextField-colorRegular"
|
||||
disabled={true}
|
||||
name="auth.integrations.oidc.0.issuer"
|
||||
name="auth.integrations.oidc.issuer"
|
||||
onChange={[Function]}
|
||||
placeholder=""
|
||||
spellCheck={false}
|
||||
@@ -2223,7 +2155,7 @@ the remaining fields. You may also enter the information manually.
|
||||
<button
|
||||
className="BaseButton-root Button-root Button-sizeSmall Button-colorPrimary Button-variantFilled Button-disabled"
|
||||
disabled={true}
|
||||
id="configure-auth-oidc-discover-0"
|
||||
id="configure-auth-oidc-discover"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
@@ -2250,7 +2182,7 @@ the remaining fields. You may also enter the information manually.
|
||||
autoCorrect="off"
|
||||
className="TextField-root TextField-colorRegular"
|
||||
disabled={true}
|
||||
name="auth.integrations.oidc.0.authorizationURL"
|
||||
name="auth.integrations.oidc.authorizationURL"
|
||||
onChange={[Function]}
|
||||
placeholder=""
|
||||
spellCheck={false}
|
||||
@@ -2272,7 +2204,7 @@ the remaining fields. You may also enter the information manually.
|
||||
autoCorrect="off"
|
||||
className="TextField-root TextField-colorRegular"
|
||||
disabled={true}
|
||||
name="auth.integrations.oidc.0.tokenURL"
|
||||
name="auth.integrations.oidc.tokenURL"
|
||||
onChange={[Function]}
|
||||
placeholder=""
|
||||
spellCheck={false}
|
||||
@@ -2294,7 +2226,7 @@ the remaining fields. You may also enter the information manually.
|
||||
autoCorrect="off"
|
||||
className="TextField-root TextField-colorRegular"
|
||||
disabled={true}
|
||||
name="auth.integrations.oidc.0.jwksURI"
|
||||
name="auth.integrations.oidc.jwksURI"
|
||||
onChange={[Function]}
|
||||
placeholder=""
|
||||
spellCheck={false}
|
||||
@@ -2322,8 +2254,8 @@ the remaining fields. You may also enter the information manually.
|
||||
checked={true}
|
||||
className="CheckBox-input"
|
||||
disabled={true}
|
||||
id="auth.integrations.oidc.0.targetFilter.admin"
|
||||
name="auth.integrations.oidc.0.targetFilter.admin"
|
||||
id="auth.integrations.oidc.targetFilter.admin"
|
||||
name="auth.integrations.oidc.targetFilter.admin"
|
||||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
@@ -2331,7 +2263,7 @@ the remaining fields. You may also enter the information manually.
|
||||
/>
|
||||
<label
|
||||
className="CheckBox-label"
|
||||
htmlFor="auth.integrations.oidc.0.targetFilter.admin"
|
||||
htmlFor="auth.integrations.oidc.targetFilter.admin"
|
||||
>
|
||||
<span
|
||||
className="CheckBox-labelSpan"
|
||||
@@ -2347,8 +2279,8 @@ the remaining fields. You may also enter the information manually.
|
||||
checked={true}
|
||||
className="CheckBox-input"
|
||||
disabled={true}
|
||||
id="auth.integrations.oidc.0.targetFilter.stream"
|
||||
name="auth.integrations.oidc.0.targetFilter.stream"
|
||||
id="auth.integrations.oidc.targetFilter.stream"
|
||||
name="auth.integrations.oidc.targetFilter.stream"
|
||||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
@@ -2356,7 +2288,7 @@ the remaining fields. You may also enter the information manually.
|
||||
/>
|
||||
<label
|
||||
className="CheckBox-label"
|
||||
htmlFor="auth.integrations.oidc.0.targetFilter.stream"
|
||||
htmlFor="auth.integrations.oidc.targetFilter.stream"
|
||||
>
|
||||
<span
|
||||
className="CheckBox-labelSpan"
|
||||
@@ -2391,8 +2323,8 @@ integration to register for a new account.
|
||||
checked={false}
|
||||
className="CheckBox-input"
|
||||
disabled={true}
|
||||
id="auth.integrations.oidc.0.allowRegistration"
|
||||
name="auth.integrations.oidc.0.allowRegistration"
|
||||
id="auth.integrations.oidc.allowRegistration"
|
||||
name="auth.integrations.oidc.allowRegistration"
|
||||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
onFocus={[Function]}
|
||||
@@ -2400,7 +2332,7 @@ integration to register for a new account.
|
||||
/>
|
||||
<label
|
||||
className="CheckBox-label"
|
||||
htmlFor="auth.integrations.oidc.0.allowRegistration"
|
||||
htmlFor="auth.integrations.oidc.allowRegistration"
|
||||
>
|
||||
<span
|
||||
className="CheckBox-labelSpan"
|
||||
@@ -2465,7 +2397,7 @@ integration to register for a new account.
|
||||
>
|
||||
<div
|
||||
className="HorizontalGutter-root FormField-root HorizontalGutter-half"
|
||||
data-test="configure-auth-sso-key"
|
||||
data-testid="configure-auth-sso-key"
|
||||
>
|
||||
<label
|
||||
className="Typography-root Typography-inputLabel Typography-colorTextPrimary InputLabel-root"
|
||||
@@ -2895,7 +2827,7 @@ integration to register for a new account.
|
||||
</div>
|
||||
<div
|
||||
className="ConfigBox-root"
|
||||
data-test="configure-auth-facebook-container"
|
||||
data-testid="configure-auth-facebook-container"
|
||||
>
|
||||
<div
|
||||
className="Flex-root ConfigBox-title Flex-flex Flex-justifySpaceBetween"
|
||||
|
||||
@@ -138,7 +138,7 @@ it("prevents stream lock out", async () => {
|
||||
// Submit button should not be disabled because we canceled the submit.
|
||||
expect(
|
||||
testRenderer.root.findByProps({
|
||||
"data-test": "configure-sideBar-saveChanges",
|
||||
"data-testid": "configure-sideBar-saveChanges",
|
||||
}).props.disabled
|
||||
).toBe(true);
|
||||
expect(stubCancel.calledOnce).toBe(true);
|
||||
@@ -175,82 +175,52 @@ it("change settings", async () => {
|
||||
),
|
||||
},
|
||||
Mutation: {
|
||||
updateSettings: createSinonStub(s =>
|
||||
s.callsFake((_: any, data: any) => {
|
||||
expect(data.input.settings.auth.integrations.facebook).toEqual({
|
||||
enabled: true,
|
||||
allowRegistration: true,
|
||||
targetFilter: {
|
||||
admin: true,
|
||||
stream: true,
|
||||
},
|
||||
clientID: "myClientID",
|
||||
clientSecret: "myClientSecret",
|
||||
});
|
||||
settingsRecord = merge({}, settingsRecord, data.input.settings);
|
||||
return {
|
||||
settings: settingsRecord,
|
||||
clientMutationId: data.input.clientMutationId,
|
||||
};
|
||||
})
|
||||
),
|
||||
createOIDCAuthIntegration: createSinonStub(s =>
|
||||
s.callsFake((_: any, data: any) => {
|
||||
expect(data.input.configuration).toEqual({
|
||||
enabled: true,
|
||||
allowRegistration: false,
|
||||
targetFilter: {
|
||||
admin: true,
|
||||
stream: true,
|
||||
},
|
||||
name: "name",
|
||||
clientID: "clientID",
|
||||
clientSecret: "clientSecret",
|
||||
issuer: "http://issuer.com",
|
||||
jwksURI: "http://issuer.com/jwksURI",
|
||||
authorizationURL: "http://issuer.com/authorizationURL",
|
||||
tokenURL: "http://issuer.com/tokenURL",
|
||||
});
|
||||
(settingsRecord.auth.integrations.oidc as any).push({
|
||||
id: "generatedID",
|
||||
enabled: false,
|
||||
callbackURL: "http://localhost/oidc/callback",
|
||||
...data.input.configuration,
|
||||
});
|
||||
return {
|
||||
settings: settingsRecord,
|
||||
clientMutationId: data.input.clientMutationId,
|
||||
};
|
||||
})
|
||||
),
|
||||
updateOIDCAuthIntegration: createSinonStub(s =>
|
||||
s.callsFake((_: any, data: any) => {
|
||||
expect(data.input.configuration).toEqual({
|
||||
enabled: true,
|
||||
allowRegistration: false,
|
||||
targetFilter: {
|
||||
admin: true,
|
||||
stream: true,
|
||||
},
|
||||
name: "name",
|
||||
clientID: "clientID",
|
||||
clientSecret: "clientSecret2",
|
||||
issuer: "http://issuer.com",
|
||||
jwksURI: "http://issuer.com/jwksURI",
|
||||
authorizationURL: "http://issuer.com/authorizationURL",
|
||||
tokenURL: "http://issuer.com/tokenURL",
|
||||
});
|
||||
(settingsRecord.auth.integrations.oidc[0] as any) = merge(
|
||||
{},
|
||||
settingsRecord.auth.integrations.oidc[0],
|
||||
data.input.configuration
|
||||
);
|
||||
return {
|
||||
integration: settingsRecord.auth.integrations.oidc[0],
|
||||
settings: settingsRecord,
|
||||
clientMutationId: data.input.clientMutationId,
|
||||
};
|
||||
})
|
||||
updateSettings: createSinonStub(
|
||||
s =>
|
||||
s.onFirstCall().callsFake((_: any, data: any) => {
|
||||
expect(data.input.settings.auth.integrations.facebook).toEqual({
|
||||
enabled: true,
|
||||
allowRegistration: true,
|
||||
targetFilter: {
|
||||
admin: true,
|
||||
stream: true,
|
||||
},
|
||||
clientID: "myClientID",
|
||||
clientSecret: "myClientSecret",
|
||||
});
|
||||
settingsRecord = merge(settingsRecord, data.input.settings);
|
||||
return {
|
||||
settings: settingsRecord,
|
||||
clientMutationId: data.input.clientMutationId,
|
||||
};
|
||||
}),
|
||||
s =>
|
||||
s.onSecondCall().callsFake((_: any, data: any) => {
|
||||
expect(data.input.settings.auth.integrations.oidc).toEqual({
|
||||
enabled: true,
|
||||
allowRegistration: false,
|
||||
targetFilter: {
|
||||
admin: true,
|
||||
stream: true,
|
||||
},
|
||||
name: "name",
|
||||
clientID: "clientID",
|
||||
clientSecret: "clientSecret",
|
||||
issuer: "http://issuer.com",
|
||||
jwksURI: "http://issuer.com/jwksURI",
|
||||
authorizationURL: "http://issuer.com/authorizationURL",
|
||||
tokenURL: "http://issuer.com/tokenURL",
|
||||
});
|
||||
(settingsRecord.auth.integrations.oidc as any) = merge(
|
||||
settingsRecord.auth.integrations.oidc,
|
||||
data.input.configuration
|
||||
);
|
||||
return {
|
||||
integration: settingsRecord.auth.integrations.oidc,
|
||||
settings: settingsRecord,
|
||||
clientMutationId: data.input.clientMutationId,
|
||||
};
|
||||
})
|
||||
),
|
||||
},
|
||||
});
|
||||
@@ -269,13 +239,13 @@ it("change settings", async () => {
|
||||
limitSnapshotTo("configure-auth-facebook-container", testRenderer.toJSON())
|
||||
).toMatchSnapshot("enable facebook configure box");
|
||||
|
||||
// Send form, this will perform creating an initial oidc record and update settings.
|
||||
// Send form
|
||||
testRenderer.root.findByProps({ id: "configure-form" }).props.onSubmit();
|
||||
|
||||
// Submit button should be disabled.
|
||||
expect(
|
||||
testRenderer.root.findByProps({
|
||||
"data-test": "configure-sideBar-saveChanges",
|
||||
"data-testid": "configure-sideBar-saveChanges",
|
||||
}).props.disabled
|
||||
).toBe(true);
|
||||
|
||||
@@ -293,73 +263,54 @@ it("change settings", async () => {
|
||||
|
||||
// Now let's enable oidc
|
||||
testRenderer.root
|
||||
.find(inputPredicate("auth.integrations.oidc.0.enabled"))
|
||||
.find(inputPredicate("auth.integrations.oidc.enabled"))
|
||||
.props.onChange({});
|
||||
|
||||
expect(
|
||||
limitSnapshotTo("configure-auth-oidc-container-0", testRenderer.toJSON())
|
||||
limitSnapshotTo("configure-auth-oidc-container", testRenderer.toJSON())
|
||||
).toMatchSnapshot("enable oidc configure box");
|
||||
|
||||
// Try to submit form, this will give validation error messages.
|
||||
testRenderer.root.findByProps({ id: "configure-form" }).props.onSubmit();
|
||||
expect(
|
||||
limitSnapshotTo("configure-auth-oidc-container-0", testRenderer.toJSON())
|
||||
limitSnapshotTo("configure-auth-oidc-container", testRenderer.toJSON())
|
||||
).toMatchSnapshot("oidc validation errors");
|
||||
|
||||
// Fill form
|
||||
testRenderer.root
|
||||
.find(inputPredicate("auth.integrations.oidc.0.name"))
|
||||
.find(inputPredicate("auth.integrations.oidc.name"))
|
||||
.props.onChange("name");
|
||||
testRenderer.root
|
||||
.find(inputPredicate("auth.integrations.oidc.0.clientID"))
|
||||
.find(inputPredicate("auth.integrations.oidc.clientID"))
|
||||
.props.onChange("clientID");
|
||||
testRenderer.root
|
||||
.find(inputPredicate("auth.integrations.oidc.0.clientSecret"))
|
||||
.find(inputPredicate("auth.integrations.oidc.clientSecret"))
|
||||
.props.onChange("clientSecret");
|
||||
testRenderer.root
|
||||
.find(inputPredicate("auth.integrations.oidc.0.issuer"))
|
||||
.find(inputPredicate("auth.integrations.oidc.issuer"))
|
||||
.props.onChange("http://issuer.com");
|
||||
|
||||
// Discover the rest.
|
||||
testRenderer.root
|
||||
.find(inputPredicate("configure-auth-oidc-discover-0"))
|
||||
.find(inputPredicate("configure-auth-oidc-discover"))
|
||||
.props.onClick();
|
||||
await timeout();
|
||||
|
||||
// Try to submit again, this should work now.
|
||||
testRenderer.root.findByProps({ id: "configure-form" }).props.onSubmit();
|
||||
expect(
|
||||
limitSnapshotTo("configure-auth-oidc-container-0", testRenderer.toJSON())
|
||||
limitSnapshotTo("configure-auth-oidc-container", testRenderer.toJSON())
|
||||
).toMatchSnapshot("during submit: oidc without errors");
|
||||
|
||||
// Disable other fields while submitting
|
||||
// We are only testing for one here right now..
|
||||
expect(
|
||||
testRenderer.root.find(inputPredicate("auth.integrations.oidc.0.enabled"))
|
||||
testRenderer.root.find(inputPredicate("auth.integrations.oidc.enabled"))
|
||||
.props.disabled
|
||||
).toBe(true);
|
||||
await timeout();
|
||||
expect(
|
||||
testRenderer.root.find(inputPredicate("auth.integrations.oidc.0.enabled"))
|
||||
.props.disabled
|
||||
).toBe(false);
|
||||
|
||||
// Change clientSecret
|
||||
testRenderer.root
|
||||
.find(inputPredicate("auth.integrations.oidc.0.clientSecret"))
|
||||
.props.onChange("clientSecret2");
|
||||
|
||||
testRenderer.root.findByProps({ id: "configure-form" }).props.onSubmit();
|
||||
|
||||
// Disable other fields while submitting
|
||||
// We are only testing for one here right now..
|
||||
expect(
|
||||
testRenderer.root.find(inputPredicate("auth.integrations.oidc.0.enabled"))
|
||||
.props.disabled
|
||||
).toBe(true);
|
||||
await timeout();
|
||||
expect(
|
||||
testRenderer.root.find(inputPredicate("auth.integrations.oidc.0.enabled"))
|
||||
testRenderer.root.find(inputPredicate("auth.integrations.oidc.enabled"))
|
||||
.props.disabled
|
||||
).toBe(false);
|
||||
});
|
||||
|
||||
+5
-5
@@ -2,7 +2,7 @@
|
||||
|
||||
exports[`loads more 1`] = `
|
||||
<div
|
||||
data-test="decisionHistory-container"
|
||||
data-testid="decisionHistory-container"
|
||||
>
|
||||
<div
|
||||
className="Flex-root Title-root Flex-flex Flex-alignCenter"
|
||||
@@ -227,7 +227,7 @@ exports[`loads more 1`] = `
|
||||
|
||||
exports[`opens popover when clicked on button showing loading state 1`] = `
|
||||
<div
|
||||
data-test="decisionHistory-loading-container"
|
||||
data-testid="decisionHistory-loading-container"
|
||||
>
|
||||
<div
|
||||
className="Flex-root Title-root Flex-flex Flex-alignCenter"
|
||||
@@ -259,7 +259,7 @@ exports[`opens popover when clicked on button showing loading state 1`] = `
|
||||
|
||||
exports[`render popover content 1`] = `
|
||||
<div
|
||||
data-test="decisionHistory-container"
|
||||
data-testid="decisionHistory-container"
|
||||
>
|
||||
<div
|
||||
className="Flex-root Title-root Flex-flex Flex-alignCenter"
|
||||
@@ -434,12 +434,12 @@ exports[`render popover content 1`] = `
|
||||
exports[`renders decision history popover button 1`] = `
|
||||
<div
|
||||
className="Popover-root"
|
||||
data-test="decisionHistory-popover"
|
||||
data-testid="decisionHistory-popover"
|
||||
>
|
||||
<button
|
||||
aria-controls="decision-history-popover"
|
||||
className="BaseButton-root DecisionHistoryButton-historyIcon"
|
||||
data-test="decisionHistory-toggle"
|
||||
data-testid="decisionHistory-toggle"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
|
||||
@@ -86,7 +86,7 @@ const createTestRenderer = async (resolver: any = {}) => {
|
||||
async function createTestRendererAndOpenPopover() {
|
||||
const testRenderer = await createTestRenderer();
|
||||
const toggle = testRenderer.root.findByProps({
|
||||
"data-test": "decisionHistory-toggle",
|
||||
"data-testid": "decisionHistory-toggle",
|
||||
})!;
|
||||
toggle.props.onClick();
|
||||
return testRenderer;
|
||||
|
||||
@@ -11,7 +11,6 @@ export const settings = {
|
||||
enabled: false,
|
||||
},
|
||||
integrations: {
|
||||
oidc: [],
|
||||
local: {
|
||||
enabled: true,
|
||||
allowRegistration: true,
|
||||
@@ -52,6 +51,15 @@ export const settings = {
|
||||
clientSecret: "",
|
||||
callbackURL: "http://localhost/facebook/callback",
|
||||
},
|
||||
oidc: {
|
||||
enabled: false,
|
||||
allowRegistration: false,
|
||||
targetFilter: {
|
||||
admin: true,
|
||||
stream: true,
|
||||
},
|
||||
callbackURL: "http://localhost/oidc/callback",
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -5,7 +5,10 @@ import { timeout } from "talk-common/utils";
|
||||
import { TalkContext } from "talk-framework/lib/bootstrap";
|
||||
|
||||
import { LOCAL_ID } from "talk-framework/lib/relay";
|
||||
import { replaceHistoryLocation } from "talk-framework/testHelpers";
|
||||
import {
|
||||
createAuthToken,
|
||||
replaceHistoryLocation,
|
||||
} from "talk-framework/testHelpers";
|
||||
|
||||
import create from "./create";
|
||||
import {
|
||||
@@ -116,16 +119,7 @@ it("submits form successfully", async () => {
|
||||
.find(inputPredicate("password"))
|
||||
.props.onChange({ target: { value: "testtest" } });
|
||||
|
||||
const authToken = `${btoa(
|
||||
JSON.stringify({
|
||||
alg: "HS256",
|
||||
typ: "JWT",
|
||||
})
|
||||
)}.${btoa(
|
||||
JSON.stringify({
|
||||
jti: "31b26591-4e9a-4388-a7ff-e1bdc5d97cce",
|
||||
})
|
||||
)}`;
|
||||
const authToken = createAuthToken();
|
||||
|
||||
const restMock = sinon.mock(context.rest);
|
||||
restMock
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
exports[`navigation bar renders navigation bar (empty queues) 1`] = `
|
||||
<div
|
||||
className="SubBar-root"
|
||||
data-test="moderate-subBar-container"
|
||||
data-testid="moderate-subBar-container"
|
||||
>
|
||||
<div
|
||||
className="Flex-root SubBar-container Flex-flex Flex-justifyCenter Flex-alignCenter"
|
||||
@@ -33,7 +33,7 @@ exports[`navigation bar renders navigation bar (empty queues) 1`] = `
|
||||
</span>
|
||||
<span
|
||||
className="Counter-root Counter-colorInherit"
|
||||
data-test="moderate-navigation-reported-count"
|
||||
data-testid="moderate-navigation-reported-count"
|
||||
>
|
||||
<span
|
||||
className="Counter-text"
|
||||
@@ -62,7 +62,7 @@ exports[`navigation bar renders navigation bar (empty queues) 1`] = `
|
||||
</span>
|
||||
<span
|
||||
className="Counter-root Counter-colorInherit"
|
||||
data-test="moderate-navigation-pending-count"
|
||||
data-testid="moderate-navigation-pending-count"
|
||||
>
|
||||
<span
|
||||
className="Counter-text"
|
||||
@@ -91,7 +91,7 @@ exports[`navigation bar renders navigation bar (empty queues) 1`] = `
|
||||
</span>
|
||||
<span
|
||||
className="Counter-root Counter-colorInherit"
|
||||
data-test="moderate-navigation-unmoderated-count"
|
||||
data-testid="moderate-navigation-unmoderated-count"
|
||||
>
|
||||
<span
|
||||
className="Counter-text"
|
||||
@@ -129,7 +129,7 @@ exports[`navigation bar renders navigation bar (empty queues) 1`] = `
|
||||
exports[`rejected queue accepts comment in rejected queue: count should be 1 1`] = `
|
||||
<span
|
||||
className="Counter-root Counter-colorInherit"
|
||||
data-test="moderate-navigation-reported-count"
|
||||
data-testid="moderate-navigation-reported-count"
|
||||
>
|
||||
<span
|
||||
className="Counter-text"
|
||||
@@ -142,7 +142,7 @@ exports[`rejected queue accepts comment in rejected queue: count should be 1 1`]
|
||||
exports[`rejected queue accepts comment in rejected queue: dangling 1`] = `
|
||||
<div
|
||||
className="Card-root ModerateCard-root ModerateCard-dangling"
|
||||
data-test="moderate-comment-comment-0"
|
||||
data-testid="moderate-comment-comment-0"
|
||||
>
|
||||
<div
|
||||
className="Flex-root Flex-flex"
|
||||
@@ -285,7 +285,7 @@ exports[`rejected queue accepts comment in rejected queue: dangling 1`] = `
|
||||
exports[`rejected queue renders rejected queue with comments 1`] = `
|
||||
<div
|
||||
className="MainLayout-root"
|
||||
data-test="moderate-main-container"
|
||||
data-testid="moderate-main-container"
|
||||
>
|
||||
<main
|
||||
className="Moderate-main"
|
||||
@@ -295,7 +295,7 @@ exports[`rejected queue renders rejected queue with comments 1`] = `
|
||||
>
|
||||
<div
|
||||
className="Card-root ModerateCard-root"
|
||||
data-test="moderate-comment-comment-0"
|
||||
data-testid="moderate-comment-comment-0"
|
||||
>
|
||||
<div
|
||||
className="Flex-root Flex-flex"
|
||||
@@ -435,7 +435,7 @@ exports[`rejected queue renders rejected queue with comments 1`] = `
|
||||
</div>
|
||||
<div
|
||||
className="Card-root ModerateCard-root"
|
||||
data-test="moderate-comment-comment-1"
|
||||
data-testid="moderate-comment-comment-1"
|
||||
>
|
||||
<div
|
||||
className="Flex-root Flex-flex"
|
||||
@@ -582,7 +582,7 @@ exports[`rejected queue renders rejected queue with comments 1`] = `
|
||||
exports[`rejected queue renders rejected queue with comments and load more 1`] = `
|
||||
<div
|
||||
className="Card-root ModerateCard-root"
|
||||
data-test="moderate-comment-comment-2"
|
||||
data-testid="moderate-comment-comment-2"
|
||||
>
|
||||
<div
|
||||
className="Flex-root Flex-flex"
|
||||
@@ -738,7 +738,7 @@ exports[`rejected queue renders rejected queue with comments and load more 1`] =
|
||||
exports[`reported queue accepts comment in reported queue: count should be 1 1`] = `
|
||||
<span
|
||||
className="Counter-root Counter-colorInherit"
|
||||
data-test="moderate-navigation-reported-count"
|
||||
data-testid="moderate-navigation-reported-count"
|
||||
>
|
||||
<span
|
||||
className="Counter-text"
|
||||
@@ -751,7 +751,7 @@ exports[`reported queue accepts comment in reported queue: count should be 1 1`]
|
||||
exports[`reported queue accepts comment in reported queue: dangling 1`] = `
|
||||
<div
|
||||
className="Card-root ModerateCard-root ModerateCard-dangling"
|
||||
data-test="moderate-comment-comment-0"
|
||||
data-testid="moderate-comment-comment-0"
|
||||
>
|
||||
<div
|
||||
className="Flex-root Flex-flex"
|
||||
@@ -894,7 +894,7 @@ exports[`reported queue accepts comment in reported queue: dangling 1`] = `
|
||||
exports[`reported queue rejects comment in reported queue: count should be 1 1`] = `
|
||||
<span
|
||||
className="Counter-root Counter-colorInherit"
|
||||
data-test="moderate-navigation-reported-count"
|
||||
data-testid="moderate-navigation-reported-count"
|
||||
>
|
||||
<span
|
||||
className="Counter-text"
|
||||
@@ -907,7 +907,7 @@ exports[`reported queue rejects comment in reported queue: count should be 1 1`]
|
||||
exports[`reported queue rejects comment in reported queue: dangling 1`] = `
|
||||
<div
|
||||
className="Card-root ModerateCard-root ModerateCard-dangling"
|
||||
data-test="moderate-comment-comment-0"
|
||||
data-testid="moderate-comment-comment-0"
|
||||
>
|
||||
<div
|
||||
className="Flex-root Flex-flex"
|
||||
@@ -1050,7 +1050,7 @@ exports[`reported queue rejects comment in reported queue: dangling 1`] = `
|
||||
exports[`reported queue renders empty reported queue 1`] = `
|
||||
<div
|
||||
className="MainLayout-root"
|
||||
data-test="moderate-main-container"
|
||||
data-testid="moderate-main-container"
|
||||
>
|
||||
<main
|
||||
className="Moderate-main"
|
||||
@@ -1065,7 +1065,7 @@ exports[`reported queue renders empty reported queue 1`] = `
|
||||
exports[`reported queue renders reported queue with comments 1`] = `
|
||||
<div
|
||||
className="MainLayout-root"
|
||||
data-test="moderate-main-container"
|
||||
data-testid="moderate-main-container"
|
||||
>
|
||||
<main
|
||||
className="Moderate-main"
|
||||
@@ -1075,7 +1075,7 @@ exports[`reported queue renders reported queue with comments 1`] = `
|
||||
>
|
||||
<div
|
||||
className="Card-root ModerateCard-root"
|
||||
data-test="moderate-comment-comment-0"
|
||||
data-testid="moderate-comment-comment-0"
|
||||
>
|
||||
<div
|
||||
className="Flex-root Flex-flex"
|
||||
@@ -1215,7 +1215,7 @@ exports[`reported queue renders reported queue with comments 1`] = `
|
||||
</div>
|
||||
<div
|
||||
className="Card-root ModerateCard-root"
|
||||
data-test="moderate-comment-comment-1"
|
||||
data-testid="moderate-comment-comment-1"
|
||||
>
|
||||
<div
|
||||
className="Flex-root Flex-flex"
|
||||
@@ -1361,7 +1361,7 @@ exports[`reported queue renders reported queue with comments 1`] = `
|
||||
exports[`reported queue renders reported queue with comments and load more 1`] = `
|
||||
<div
|
||||
className="Card-root ModerateCard-root"
|
||||
data-test="moderate-comment-comment-2"
|
||||
data-testid="moderate-comment-comment-2"
|
||||
>
|
||||
<div
|
||||
className="Flex-root Flex-flex"
|
||||
@@ -1522,7 +1522,7 @@ exports[`reported queue renders reported queue with comments and load more 1`] =
|
||||
exports[`single comment view accepts single comment 1`] = `
|
||||
<div
|
||||
className="Card-root ModerateCard-root"
|
||||
data-test="moderate-comment-comment-0"
|
||||
data-testid="moderate-comment-comment-0"
|
||||
>
|
||||
<div
|
||||
className="Flex-root Flex-flex"
|
||||
@@ -1665,7 +1665,7 @@ exports[`single comment view accepts single comment 1`] = `
|
||||
exports[`single comment view rejects single comment 1`] = `
|
||||
<div
|
||||
className="Card-root ModerateCard-root"
|
||||
data-test="moderate-comment-comment-0"
|
||||
data-testid="moderate-comment-comment-0"
|
||||
>
|
||||
<div
|
||||
className="Flex-root Flex-flex"
|
||||
@@ -1807,7 +1807,7 @@ exports[`single comment view rejects single comment 1`] = `
|
||||
|
||||
exports[`single comment view renders single comment view 1`] = `
|
||||
<div
|
||||
data-test="single-moderate-container"
|
||||
data-testid="single-moderate-container"
|
||||
>
|
||||
<div
|
||||
className="SubBar-root SingleModerate-subBar SubBar-gutterBegin SubBar-gutterEnd"
|
||||
@@ -1843,7 +1843,7 @@ exports[`single comment view renders single comment view 1`] = `
|
||||
>
|
||||
<div
|
||||
className="Card-root ModerateCard-root"
|
||||
data-test="moderate-comment-comment-0"
|
||||
data-testid="moderate-comment-comment-0"
|
||||
>
|
||||
<div
|
||||
className="Flex-root Flex-flex"
|
||||
|
||||
@@ -181,7 +181,7 @@ describe("reported queue", () => {
|
||||
expect(comments.length).toBe(previousCount + 1);
|
||||
|
||||
// Verify last one added was our new one
|
||||
expect(comments[comments.length - 1].props["data-test"]).toBe(
|
||||
expect(comments[comments.length - 1].props["data-testid"]).toBe(
|
||||
`moderate-comment-${reportedComments[2].id}`
|
||||
);
|
||||
|
||||
@@ -453,7 +453,7 @@ describe("rejected queue", () => {
|
||||
expect(comments.length).toBe(previousCount + 1);
|
||||
|
||||
// Verify last one added was our new one
|
||||
expect(comments[comments.length - 1].props["data-test"]).toBe(
|
||||
expect(comments[comments.length - 1].props["data-testid"]).toBe(
|
||||
`moderate-comment-${rejectedComments[2].id}`
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user