Skip to content

Commit

Permalink
added ids
Browse files Browse the repository at this point in the history
  • Loading branch information
dendidibe committed Oct 2, 2023
1 parent 205b171 commit 5bfac1d
Show file tree
Hide file tree
Showing 11 changed files with 45 additions and 11 deletions.
3 changes: 2 additions & 1 deletion client-web/src/components/AppTopNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ const AppTopNav = () => {
onClick={() =>
onRoomFilterClick(item.name as TActiveRoomFilter)
}
id={item.name}
sx={{
color:
item.name === activeRoomFilter
Expand All @@ -262,7 +263,7 @@ const AppTopNav = () => {
</Box>
<Box style={{ marginLeft: "auto" }}>
{!!mainCoinBalance && (
<Link to={"/"} style={{ textDecoration: "none" }}>
<Link to={"/"} style={{ textDecoration: "none" }} id="balance">
<Box
sx={{
marginRight: "10px",
Expand Down
5 changes: 4 additions & 1 deletion client-web/src/pages/NewChat/NewChat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const NewChat: React.FC<INewChat> = ({}) => {
type="file"
onChange={onFileChange}
/>
<label htmlFor="raised-button-file">
<label htmlFor="raised-button-file" id="avatar">
<Avatar
sx={{
backgroundColor: theme.palette.primary.main,
Expand All @@ -134,6 +134,7 @@ const NewChat: React.FC<INewChat> = ({}) => {
}}
label="Chat Name"
name="chatName"
id="chatName"
type="text"
fullWidth
variant="outlined"
Expand All @@ -148,6 +149,7 @@ const NewChat: React.FC<INewChat> = ({}) => {
}}
label="Description"
name="description"
id="description"
type="text"
fullWidth
variant="outlined"
Expand All @@ -165,6 +167,7 @@ const NewChat: React.FC<INewChat> = ({}) => {
>
<Button
variant={"outlined"}
id="submitChat"
disabled={loading}
onClick={() => formik.handleSubmit()}
>
Expand Down
5 changes: 3 additions & 2 deletions client-web/src/pages/Owner/Apps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ export default function Apps({ onRowClick }: Props) {
>
<span style={{ marginLeft: "auto" }}>
<IconButton
id="addApp"
disabled={!isEnoughCoinsToCreateApp || !canCreateApp}
onClick={onAddApp}
size="large"
Expand Down Expand Up @@ -214,10 +215,10 @@ export default function Apps({ onRowClick }: Props) {

}}
>
<IconButton onClick={() => onEdit(app)}>
<IconButton onClick={() => onEdit(app)} id="settings">
<SettingsIcon color="primary" />
</IconButton>
<IconButton onClick={() => history.push('/statistics/' + app._id)}>
<IconButton onClick={() => history.push('/statistics/' + app._id)} id="statistics">
<LeaderboardIcon color="primary" />
</IconButton>
</Box>
Expand Down
3 changes: 3 additions & 0 deletions client-web/src/pages/Privacy/VisibilityTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ export const Visibility: React.FC<VisibilityProps> = ({ handleChangeTab }) => {
disabled={loading === "profile"}
onClick={(event) => handleChangeTab(event, 1)}
variant="contained"
id="manageProfileShares"
>
Manage profile shares
</Button>
Expand Down Expand Up @@ -174,6 +175,8 @@ export const Visibility: React.FC<VisibilityProps> = ({ handleChangeTab }) => {
fullWidth={false}
onClick={(event) => handleChangeTab(event, 2)}
variant="contained"
id="manageDocumentShares"

>
Manage documents shares
</Button>
Expand Down
6 changes: 6 additions & 0 deletions client-web/src/pages/Profile/EditProfileModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ export default function EditProfileModal({ open, setOpen, user }: TProps) {
margin="dense"
label="First Name"
name="firstName"
id="firstName"
variant="standard"
error={
formik.touched.firstName && formik.errors.firstName
Expand All @@ -134,6 +135,7 @@ export default function EditProfileModal({ open, setOpen, user }: TProps) {
margin="dense"
label="Last Name"
name="lastName"
id="lastName"
variant="standard"
error={
formik.touched.lastName && formik.errors.lastName
Expand All @@ -153,6 +155,7 @@ export default function EditProfileModal({ open, setOpen, user }: TProps) {
margin="dense"
label="Profile Description"
name="description"
id="description"
variant="standard"
onChange={formik.handleChange}
onBlur={formik.handleBlur}
Expand All @@ -167,6 +170,7 @@ export default function EditProfileModal({ open, setOpen, user }: TProps) {
<FormControlLabel
checked={formik.values.isProfileOpen}
name="isProfileOpen"
id="isProfileOpen"
control={
<Checkbox
onChange={(e) => {
Expand All @@ -190,6 +194,7 @@ export default function EditProfileModal({ open, setOpen, user }: TProps) {
<FormControlLabel
checked={formik.values.isAssetsOpen || formik.values.isProfileOpen}
name="isAssetsOpen"
id="isAssetsOpen"
control={
<Checkbox
disabled={formik.values.isProfileOpen}
Expand All @@ -206,6 +211,7 @@ export default function EditProfileModal({ open, setOpen, user }: TProps) {
/>
</Tooltip>
<LoadingButton
id="submitProfile"
type="submit"
loading={loading}
variant="contained"
Expand Down
2 changes: 2 additions & 0 deletions client-web/src/pages/Referrals/Referrals.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ const Referrals: React.FC<IReferrals> = ({}) => {
<Button
onClick={onShareClick}
variant={"contained"}
id="shareCode"
startIcon={<ShareIcon />}
>
{link}
Expand Down Expand Up @@ -153,6 +154,7 @@ const Referrals: React.FC<IReferrals> = ({}) => {
<Button
disabled={formik.isSubmitting}
variant={"contained"}
id="submitEarn"
type={"submit"}
>
Earn coins
Expand Down
6 changes: 3 additions & 3 deletions client-web/src/pages/Signon/EmailModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function EmailModal({ open, setOpen, updateUser }: TProps) {
style={{ display: "flex", justifyContent: "space-between" }}
>
Continue with Email
<IconButton onClick={() => setOpen(false)}>
<IconButton onClick={() => setOpen(false)} id="close">
<CloseIcon />
</IconButton>
</DialogTitle>
Expand All @@ -52,8 +52,8 @@ export function EmailModal({ open, setOpen, updateUser }: TProps) {
onChange={handleChange}
aria-label="lab API tabs example"
>
<Tab label="Sign In" value="1" />
<Tab label="Sign Up" value="2" />
<Tab label="Sign In" value="1" id="signIn" />
<Tab label="Sign Up" value="2" id="signUp"/>
</TabList>
</Box>
{/* SIGN IN */}
Expand Down
14 changes: 11 additions & 3 deletions client-web/src/pages/Signon/EmailSignInForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ export function EmailSingInForm(props: TProps) {
const { search } = useLocation();

const searchParams = useMemo(() => new URLSearchParams(search), [search]);
const email = searchParams.get('email')
const email = searchParams.get("email");

const [disable, setDisable] = useState(false);
const [showPassword, setShowPassword] = useState(false);
const { showSnackbar } = useSnackbar();
const formik = useFormik({
initialValues: {
email: email || '',
email: email || "",
password: "",
},
validate,
Expand Down Expand Up @@ -93,6 +93,7 @@ export function EmailSingInForm(props: TProps) {
margin="dense"
label="Email"
name="email"
id="email"
type="email"
fullWidth
variant="standard"
Expand All @@ -109,13 +110,15 @@ export function EmailSingInForm(props: TProps) {
<Input
type={showPassword ? "text" : "password"}
fullWidth
id="password"
name="password"
value={formik.values.password}
onChange={formik.handleChange}
onBlur={formik.handleBlur}
endAdornment={
<InputAdornment position="end">
<IconButton
id="showPassword"
aria-label="toggle password visibility"
onClick={() => setShowPassword((show) => !show)}
>
Expand All @@ -129,7 +132,12 @@ export function EmailSingInForm(props: TProps) {
)}
</FormControl>
<Box sx={{ margin: 2, display: "flex", justifyContent: "center" }}>
<Button disabled={disable} type="submit" variant="contained">
<Button
disabled={disable}
type="submit"
variant="contained"
id="submitEmail"
>
Continue
</Button>
</Box>
Expand Down
4 changes: 4 additions & 0 deletions client-web/src/pages/Signon/EmailSignUpForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export function EmailSignUpForm(props: TProps) {
margin="dense"
label="Email"
name="email"
id="email"
type="email"
value={formik.values.email}
onChange={formik.handleChange}
Expand All @@ -101,6 +102,7 @@ export function EmailSignUpForm(props: TProps) {
margin="dense"
label="First Name"
name="firstName"
id="firstName"
type="text"
fullWidth
variant="standard"
Expand All @@ -118,6 +120,7 @@ export function EmailSignUpForm(props: TProps) {
margin="dense"
label="Last Name"
name="lastName"
id="lastName"
type="text"
fullWidth
variant="standard"
Expand All @@ -136,6 +139,7 @@ export function EmailSignUpForm(props: TProps) {
<LoadingButton
type="submit"
variant="contained"
id="submitEmail"
loading={formik.isSubmitting}
>
Continue
Expand Down
4 changes: 4 additions & 0 deletions client-web/src/pages/Signon/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ export default function Signon() {
onClick={onGoogleClick}
sx={{ margin: 1 }}
fullWidth
id="googleLogin"
variant="contained"
startIcon={<GoogleIcon />}
style={{
Expand All @@ -325,6 +326,7 @@ export default function Signon() {
sx={{ margin: 1 }}
fullWidth
variant="contained"
id="metamaskLogin"
onClick={() => onMetamaskLogin()}
startIcon={<DiamondIcon />}
style={{
Expand All @@ -342,6 +344,8 @@ export default function Signon() {
sx={{ margin: 1, textTransform: "none", fontSize: "16px" }}
fullWidth
variant="contained"
id="regularLogin"

onClick={() => setOpenEmail(true)}
>
Sign In with E-mail
Expand Down
4 changes: 3 additions & 1 deletion client-web/src/pages/UploadDocument/UploadDocument.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ const UploadDocument: React.FC<IUploadDocument> = ({}) => {
/>
<Button
disabled={loading}
id="uploadFile"
color="secondary"
variant="contained"
onClick={() => fileRef?.current?.click()}
Expand All @@ -138,6 +139,7 @@ const UploadDocument: React.FC<IUploadDocument> = ({}) => {
}}
label="Document Name"
name="documentName"
id="documentName"
type="text"
fullWidth
variant="standard"
Expand All @@ -156,7 +158,7 @@ const UploadDocument: React.FC<IUploadDocument> = ({}) => {
}
/>
<Box sx={{ margin: 2, display: "flex", justifyContent: "center" }}>
<Button disabled={loading} type="submit" variant="contained">
<Button id="submitUpload" disabled={loading} type="submit" variant="contained">
Create
</Button>
</Box>
Expand Down

0 comments on commit 5bfac1d

Please sign in to comment.