diff --git a/src/components/AuthPage/ForgotPassword/index.jsx b/src/components/AuthPage/ForgotPassword/index.jsx index 0af4016b..47969859 100644 --- a/src/components/AuthPage/ForgotPassword/index.jsx +++ b/src/components/AuthPage/ForgotPassword/index.jsx @@ -79,7 +79,7 @@ const ForgotPassword = ({ const classes = useStyles(); return ( - + @@ -145,7 +145,7 @@ const ForgotPassword = ({ className="mt-10" type="submit" fullWidth - data-testId="forgotPasswordButton" + data-testid="forgotPasswordButton" disabled={!isValidEmail} > {loading ? "Sending..." : "Send me the link"} diff --git a/src/components/AuthPage/Login/index.jsx b/src/components/AuthPage/Login/index.jsx index edd67f72..593ae526 100644 --- a/src/components/AuthPage/Login/index.jsx +++ b/src/components/AuthPage/Login/index.jsx @@ -119,7 +119,7 @@ const Login = ({ raised className={`${classes.card} `} style={{ background: background }} - data-testId="login" + data-testid="login" > { { justify="center" alignItems="center" className="mt-24" - data-testId="signUpHaveAccount" + data-testid="signUpHaveAccount" > Already have a{" "} diff --git a/src/components/AuthPage/SignUp/signupForm.jsx b/src/components/AuthPage/SignUp/signupForm.jsx index fa47c003..68ebbbdd 100644 --- a/src/components/AuthPage/SignUp/signupForm.jsx +++ b/src/components/AuthPage/SignUp/signupForm.jsx @@ -207,7 +207,7 @@ const SignupForm = () => { )} - + { placeholder="mail@codelabz.com" value={email} onChange={onChangeEmail} - helperText={emailValidateError ? emailValidateErrorMessage : null} + helpertext={emailValidateError ? emailValidateErrorMessage : null} error={emailValidateError} fullWidth - data-testId="signUpEmail" + data-testid="signUpEmail" autoComplete="email" required onFocus={onFocusEmail} @@ -234,7 +234,7 @@ const SignupForm = () => { { value={password} onFocus={onFocusPassword} onChange={onChangePassword} - data-testId="signUpPassword" + data-testid="signUpPassword" autoComplete="new-password" type={showPassword ? "text" : "password"} style={{ marginBottom: "15px" }} @@ -269,7 +269,7 @@ const SignupForm = () => { { error={confirmPasswordValidateError} fullWidth required - data-testId="signUpConfirmPassword" + data-testid="signUpConfirmPassword" value={confirmPassword} onFocus={onFocusConfirmPassword} onChange={onChangeConfirmPassword} @@ -309,7 +309,7 @@ const SignupForm = () => { onChange={() => setAgreed(!agreed)} name="remember" color="primary" - data-testId="TnC" + data-testid="TnC" style={{}} /> } @@ -326,7 +326,7 @@ const SignupForm = () => { color="primary" fullWidth disabled={loading} - data-testId="signUpButton" + data-testid="signUpButton" onClick={onSubmit} style={{ color: "white", diff --git a/src/components/AuthPage/smButton/smButtons.jsx b/src/components/AuthPage/smButton/smButtons.jsx index 226c31f4..f0e1c162 100644 --- a/src/components/AuthPage/smButton/smButtons.jsx +++ b/src/components/AuthPage/smButton/smButtons.jsx @@ -17,7 +17,7 @@ const SmButtons = () => { {user?.displayName} @@ -145,7 +147,7 @@ export default function CardWithPicture({ tutorial }) { variant="h7" className={classes.inline} color="textPrimary" - data-testId="UserOrgName" + data-testid="UserOrgName" > {tutorial?.owner} @@ -157,7 +159,7 @@ export default function CardWithPicture({ tutorial }) { /> - + {tutorial?.title} {tutorial?.summary} @@ -184,7 +186,7 @@ export default function CardWithPicture({ tutorial }) { variant="overline" display="block" className={classes.time} - data-testId="Time" + data-testid="Time" > {"10 min"} @@ -215,16 +217,16 @@ export default function CardWithPicture({ tutorial }) { - + - + - + - + diff --git a/src/components/Card/CardWithoutPicture.jsx b/src/components/Card/CardWithoutPicture.jsx index abc4ecb0..12178aef 100644 --- a/src/components/Card/CardWithoutPicture.jsx +++ b/src/components/Card/CardWithoutPicture.jsx @@ -101,7 +101,7 @@ export default function CardWithoutPicture({ tutorial }) { }; return ( - + @@ -119,7 +119,7 @@ export default function CardWithoutPicture({ tutorial }) { variant="h7" className={classes.inline} color="textPrimary" - data-testId="UserName" + data-testid="UserName" > {user?.displayName} @@ -131,7 +131,7 @@ export default function CardWithoutPicture({ tutorial }) { variant="h7" className={classes.inline} color="textPrimary" - data-testId="UserOrgName" + data-testid="UserOrgName" > {tutorial?.owner} @@ -144,9 +144,9 @@ export default function CardWithoutPicture({ tutorial }) { - + {tutorial?.title} {tutorial?.summary} @@ -173,7 +173,7 @@ export default function CardWithoutPicture({ tutorial }) { variant="overline" display="block" className={classes.time} - data-testId="Time" + data-testid="Time" > {"10 min"} @@ -204,16 +204,16 @@ export default function CardWithoutPicture({ tutorial }) { - + - + - + - + diff --git a/src/components/CardTabs/Events/index.jsx b/src/components/CardTabs/Events/index.jsx index 2605b29b..c3042e55 100644 --- a/src/components/CardTabs/Events/index.jsx +++ b/src/components/CardTabs/Events/index.jsx @@ -37,14 +37,14 @@ const EventsCard = props => {
- + {props.title} {props.events.map(function (event, index) { @@ -54,23 +54,23 @@ const EventsCard = props => { container direction="row" spacing={2} - data-testId={index == 0 ? "upEventBox" : ""} + data-testid={index == 0 ? "upEventBox" : ""} > - + {event.name} {event.date} diff --git a/src/components/CardTabs/Tags/index.jsx b/src/components/CardTabs/Tags/index.jsx index 8a566662..4bbd14d2 100644 --- a/src/components/CardTabs/Tags/index.jsx +++ b/src/components/CardTabs/Tags/index.jsx @@ -41,14 +41,14 @@ const TagCard = props => { const classes = useStyles(); return ( -
+
Popular Tags @@ -61,7 +61,7 @@ const TagCard = props => { label={tag} id={index} className={classes.chip} - data-testId={index === 0 ? "TagsChip" : ""} + data-testid={index === 0 ? "TagsChip" : ""} /> ); })} diff --git a/src/components/CardTabs/Users/UserElement.jsx b/src/components/CardTabs/Users/UserElement.jsx index 2a6c2a9c..c0b1a107 100644 --- a/src/components/CardTabs/Users/UserElement.jsx +++ b/src/components/CardTabs/Users/UserElement.jsx @@ -15,7 +15,7 @@ const UserElement = ({ user, index, useStyles }) => { key: "user" + { index }, mb: 1.5 }} - gutterBottom + gutterbottom="true" > { {user.name} {user.desg} @@ -49,12 +49,12 @@ const UserElement = ({ user, index, useStyles }) => { onClick={() => { setIcon(false); }} - data-testId={index == 0 ? "UserAdd" : ""} - sx={ - icon && { + data-testid={index == 0 ? "UserAdd" : ""} + sx={{ + ...(icon && { cursor: "pointer" - } - } + }) + }} > diff --git a/src/components/CardTabs/Users/index.jsx b/src/components/CardTabs/Users/index.jsx index d6b8e7f5..6bd21658 100644 --- a/src/components/CardTabs/Users/index.jsx +++ b/src/components/CardTabs/Users/index.jsx @@ -36,14 +36,14 @@ const useStyles = makeStyles(theme => ({ const UserCard = props => { const classes = useStyles(); return ( -
+
{props.title} diff --git a/src/components/CodelabCard/index.jsx b/src/components/CodelabCard/index.jsx index 74575bf8..56e91ff6 100644 --- a/src/components/CodelabCard/index.jsx +++ b/src/components/CodelabCard/index.jsx @@ -31,10 +31,10 @@ const CardComponent = ({ maxWidth="sm" className={classes.card} style={{ background: background }} - data-testId="codelabzCard" + data-testid="codelabzCard" > @@ -125,7 +125,7 @@ const CardComponent = ({ xs={6} justify="left" direction="row" - data-testId="codelabzCardButtonGroup" + data-testid="codelabzCardButtonGroup" > {!org ? ( diff --git a/src/components/Dashboard/index.jsx b/src/components/Dashboard/index.jsx index 072dfb21..e8644921 100644 --- a/src/components/Dashboard/index.jsx +++ b/src/components/Dashboard/index.jsx @@ -341,7 +341,7 @@ const Dashboard = ({ background = "white", textColor = "black" }) => { placeholder={displayName || "User Name"} value={name} onChange={event => onChangeName(event.target.value)} - helperText={ + helpertext={ nameValidateError ? nameValidateErrorMessage : null } fullWidth @@ -364,7 +364,7 @@ const Dashboard = ({ background = "white", textColor = "black" }) => { placeholder="User Handle" value={handle} onChange={event => onChangeHandle(event.target.value)} - helperText={ + helpertext={ handleValidateError ? handleValidateErrorMessage : null } fullWidth @@ -416,10 +416,10 @@ const Dashboard = ({ background = "white", textColor = "black" }) => {
{filteredData.length !== 0 && (
- {filteredData.map(item => { + {filteredData.map((item,index) => { return ( -
{ +
{ setCountry(item.name); setCountrySearch(""); }} @@ -485,7 +485,7 @@ const Dashboard = ({ background = "white", textColor = "black" }) => { placeholder="Organiztion Name" value={orgName} onChange={event => onChangeOrgName(event.target.value)} - helperText={ + helpertext={ orgNameValidateError ? orgNameValidateErrorMessage : null @@ -512,7 +512,7 @@ const Dashboard = ({ background = "white", textColor = "black" }) => { placeholder="Organiztion Handle" value={orgHandle} onChange={event => onChangeOrgHandle(event.target.value)} - helperText={ + helpertext={ orgHandleValidateError ? orgHandleValidateErrorMessage : null @@ -564,10 +564,11 @@ const Dashboard = ({ background = "white", textColor = "black" }) => {
{orgFilteredData.length !== 0 && (
- {orgFilteredData.map(item => { - return ( -
{ + {orgFilteredData.map((item,index) => { + return ( +
{ setOrgCountry(item.name); setOrgCountrySearch(""); }} @@ -591,7 +592,7 @@ const Dashboard = ({ background = "white", textColor = "black" }) => { placeholder="Organization Website" value={orgWebsite} onChange={event => onChangeOrgWebsite(event.target.value)} - helperText={ + helpertext={ orgWebsiteValidateError ? orgWebsiteValidateErrorMessage : null diff --git a/src/components/ErrorPages/404.jsx b/src/components/ErrorPages/404.jsx index f73005cb..a1d84e3f 100644 --- a/src/components/ErrorPages/404.jsx +++ b/src/components/ErrorPages/404.jsx @@ -73,7 +73,7 @@ const NotFound = ({ background = "white", textColor = "black" }) => { container className={`row-fullheight ${classes.wrapper}`} style={{ background: background }} - data-testId="errorPage" + data-testid="errorPage" > { {props.elements.map(function (el, index) { return ( - + { const classes = useStyles(); return ( - + Export account data Start export @@ -28,14 +28,14 @@ const UserAccount = () => { Successor settings Add successor @@ -43,14 +43,14 @@ const UserAccount = () => { Deactivate account Delete account diff --git a/src/components/Forms/UserEmail/index.jsx b/src/components/Forms/UserEmail/index.jsx index dc1e0728..5eadb205 100644 --- a/src/components/Forms/UserEmail/index.jsx +++ b/src/components/Forms/UserEmail/index.jsx @@ -53,16 +53,16 @@ const UserEmail = () => { - Add + Add Primary email address - + { displayEmpty inputProps={{ "aria-label": "Without label" }} > - {data.backupEmailOptions.map(email => ( - + {data.backupEmailOptions.map((email, index) => ( + {email} ))} diff --git a/src/components/Forms/UserForm/index.jsx b/src/components/Forms/UserForm/index.jsx index 17d2088e..0bb74f6a 100644 --- a/src/components/Forms/UserForm/index.jsx +++ b/src/components/Forms/UserForm/index.jsx @@ -112,7 +112,7 @@ const UserForm = () => { {countryList[i].name} @@ -191,7 +191,7 @@ const UserForm = () => { }, [firebase, firestore, dispatch, handle]); return ( - + { htmlFor="bootstrap-input" style={{ color: "#000", fontSize: "20px" }} error={nameValidateError} - helperText={nameValidateError ? nameValidateErrorMessage : null} + helpertext={nameValidateError ? nameValidateErrorMessage : null} > Name @@ -218,9 +218,9 @@ const UserForm = () => { value={name} id="bootstrap-input" className={classes.input} - data-testId="name" + data-testid="name" onChange={event => onChangeName(event.target.value)} - helperText={nameValidateError ? nameValidateErrorMessage : null} + helpertext={nameValidateError ? nameValidateErrorMessage : null} /> {nameValidateErrorMessage} @@ -239,7 +239,7 @@ const UserForm = () => { Country of residence @@ -29,7 +29,7 @@ const UserPassword = () => { @@ -37,33 +37,33 @@ const UserPassword = () => { - - + Logout Logout of all other browsers - + Login security Require email verification - + diff --git a/src/components/HomePage/index.jsx b/src/components/HomePage/index.jsx index e8190e6b..4f54ff53 100644 --- a/src/components/HomePage/index.jsx +++ b/src/components/HomePage/index.jsx @@ -198,7 +198,7 @@ function HomePage({ background = "white", textColor = "black" }) { @@ -225,7 +225,7 @@ function HomePage({ background = "white", textColor = "black" }) { @@ -236,14 +236,14 @@ function HomePage({ background = "white", textColor = "black" }) { - + - {tutorials.map(tutorial => { + {tutorials.map((tutorial,index) => { return !tutorial?.featured_image ? ( - + ) : ( - + ); })} @@ -325,7 +325,7 @@ function HomePage({ background = "white", textColor = "black" }) { style={{ width: "100%" }} - data-testId="homepageUpcomingEvents" + data-testid="homepageUpcomingEvents" > @@ -338,7 +338,7 @@ function HomePage({ background = "white", textColor = "black" }) { style={{ width: "100%" }} - data-testId="homepageUsersToFollow" + data-testid="homepageUsersToFollow" > @@ -356,7 +356,7 @@ function HomePage({ background = "white", textColor = "black" }) { border: "none", boxShadow: "none" }} - data-testId="homepageContributors" + data-testid="homepageContributors" > @@ -370,7 +370,7 @@ function HomePage({ background = "white", textColor = "black" }) { style={{ width: "100%" }} - data-testId="homepagePopularEventSidebar" + data-testid="homepagePopularEventSidebar" > diff --git a/src/components/ManageUsers/ResetPassword/PasswordResetForm.jsx b/src/components/ManageUsers/ResetPassword/PasswordResetForm.jsx index bab99650..1d87bdd8 100644 --- a/src/components/ManageUsers/ResetPassword/PasswordResetForm.jsx +++ b/src/components/ManageUsers/ResetPassword/PasswordResetForm.jsx @@ -120,7 +120,7 @@ const PasswordResetForm = ({ actionCode }) => { /> - diff --git a/src/components/MyFeed/Carousel/index.jsx b/src/components/MyFeed/Carousel/index.jsx index 043470f1..0f149834 100644 --- a/src/components/MyFeed/Carousel/index.jsx +++ b/src/components/MyFeed/Carousel/index.jsx @@ -51,10 +51,10 @@ const Carousel = () => { }; return ( -
+
{ /> { {launchedOrgs && launchedOrgs.map((org, index) => { return ( -
+
{ marginTop: 20 }} onClick={() => history.push(`/org/${org.org_handle}`)} - data-testId="codeFeedCarouselCard" + data-testid="codeFeedCarouselCard" > { spaceBetween={20} style={{ padding: "20px 20px" }} > - {tutorials.map((tutorial, i) => { + {tutorials.map((tutorial, index) => { return tutorial == 0 ? ( - + { ) : ( - + diff --git a/src/components/MyFeed/discoverOrgs/OrgExplore.jsx b/src/components/MyFeed/discoverOrgs/OrgExplore.jsx index 169751bc..391b6016 100644 --- a/src/components/MyFeed/discoverOrgs/OrgExplore.jsx +++ b/src/components/MyFeed/discoverOrgs/OrgExplore.jsx @@ -60,7 +60,7 @@ const OrgsExplore = () => { Discover Organizations @@ -86,7 +86,7 @@ const OrgsExplore = () => { style={{ width: "100%" }} - data-testId="explorePageTag" + data-testid="explorePageTag" > diff --git a/src/components/MyFeed/discoverOrgs/components/orgsCarousel.jsx b/src/components/MyFeed/discoverOrgs/components/orgsCarousel.jsx index 75ee20b5..f2c505b3 100644 --- a/src/components/MyFeed/discoverOrgs/components/orgsCarousel.jsx +++ b/src/components/MyFeed/discoverOrgs/components/orgsCarousel.jsx @@ -60,9 +60,9 @@ const OrgsCarousel = () => { spaceBetween={20} style={{ padding: "20px 20px" }} > - {launchedOrgs.map((org, i) => { + {launchedOrgs.map((org, index) => { return org == 0 ? ( - + { ) : ( - + diff --git a/src/components/NavBar/_old/MainNavbar/index.jsx b/src/components/NavBar/_old/MainNavbar/index.jsx index d26df6f2..2d01a7e3 100644 --- a/src/components/NavBar/_old/MainNavbar/index.jsx +++ b/src/components/NavBar/_old/MainNavbar/index.jsx @@ -46,7 +46,7 @@ function MainNavbar() { })); const classes = useStyles(); return ( - +