Skip to content

Commit

Permalink
Merge branch 'master' into CodeLabzAppBar
Browse files Browse the repository at this point in the history
  • Loading branch information
kushalShukla-web authored Jul 14, 2023
2 parents 55dd68f + 6446e9e commit e74907c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ describe("Forgot Password Page | CodeLabz", () => {

it("empty email ", function () {
cy.visit(`${this.base_url}forgotpassword`);
cy.get("[data-testId=forgotPasswordButton]").click();
cy.contains("The email address is badly formatted.");
cy.should('be.disabled')
cy.get("[data-testId=forgotPasswordButton]").should('be.disabled');
});
it("successfull ", function () {
cy.visit(`${this.base_url}forgotpassword`);
Expand Down
11 changes: 9 additions & 2 deletions src/components/NavBar/new/MiniNavbar/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
} from "@mui/material";
import { makeStyles } from "@mui/styles";
import React, { useCallback, useEffect, useRef, useState } from "react";
import { useLocation } from 'react-router-dom';
import Headroom from "react-headroom";
import BrandName from "../../../../helpers/brandName";
import SearchIcon from "@mui/icons-material/Search";
Expand Down Expand Up @@ -74,6 +75,11 @@ function MiniNavbar() {

const windowSize = useWindowSize();

const location = useLocation();
const routeName = location.pathname;

const excludedRoutes = ['/login', '/signup']

const toggleDrawer = useCallback(state => {
setOpenDrawer(state);
}, []);
Expand Down Expand Up @@ -135,7 +141,8 @@ function MiniNavbar() {
</IconButton>
</Grid>
</Grid>
<Grid style={{ display: "inline-block" }} item xs={12} md={4}>
{!excludedRoutes.includes(routeName) &&
<Grid style={{ display: "inline-block" }} item xs={12} md={4}>
<Paper component={"form"} className={classes.root} elevation={0}>
<IconButton
type="submit"
Expand All @@ -159,7 +166,7 @@ function MiniNavbar() {
placeholder="Search..."
/>
</Paper>
</Grid>
</Grid>}
<Grid item className={classes.gridButton}>
<Button
variant="contained"
Expand Down

0 comments on commit e74907c

Please sign in to comment.