diff --git a/jsx/package.json b/jsx/package.json index fe7487a9..b53f29dd 100644 --- a/jsx/package.json +++ b/jsx/package.json @@ -31,6 +31,9 @@ "@babel/core": "^7.12.3", "@babel/preset-env": "^7.12.11", "@babel/preset-react": "^7.12.10", + "@testing-library/jest-dom": "^5.15.1", + "@testing-library/react": "^12.1.2", + "@testing-library/user-event": "^13.5.0", "babel-loader": "^8.2.1", "bootstrap": "^4.5.3", "css-loader": "^5.0.1", diff --git a/jsx/src/components/AddUser/AddUser.jsx b/jsx/src/components/AddUser/AddUser.jsx index 5be41a51..1178447d 100644 --- a/jsx/src/components/AddUser/AddUser.jsx +++ b/jsx/src/components/AddUser/AddUser.jsx @@ -25,7 +25,7 @@ const AddUser = (props) => { return ( <> -
+
{errorAlert != null ? (
@@ -58,6 +58,7 @@ const AddUser = (props) => { id="add-user-textarea" rows="3" placeholder="usernames separated by line" + data-testid="user-textarea" onBlur={(e) => { let split_users = e.target.value.split("\n"); setUsers(split_users); @@ -66,10 +67,11 @@ const AddUser = (props) => {

setAdmin(e.target.checked)} + checked={admin} + onChange={(e) => setAdmin(!admin)} /> @@ -83,6 +85,7 @@ const AddUser = (props) => {