-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add extra visual error * fix: fix coverage
- Loading branch information
1 parent
155837d
commit 53bba5a
Showing
4 changed files
with
110 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,3 +63,7 @@ | |
/* Individual item */ | ||
.bm-item { | ||
} | ||
|
||
.visual_failure { | ||
transform: rotate(3deg); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,11 @@ import PropTypes from "prop-types"; | |
import { slide as Menu } from "react-burger-menu"; | ||
import { ShoppingCart } from "../utils/shopping-cart"; | ||
import { ROUTES } from "../utils/Constants"; | ||
import { isProblemUser, removeCredentials } from "../utils/Credentials"; | ||
import { | ||
isProblemUser, | ||
isVisualUser, | ||
removeCredentials, | ||
} from "../utils/Credentials"; | ||
import menuClosePng from "../assets/img/close.png"; | ||
import menuCloseSvg from "../assets/svg/[email protected]"; | ||
import menuIconPng from "../assets/img/menu.png"; | ||
|
@@ -19,14 +23,26 @@ const DrawerMenu = ({ history }) => { | |
const aboutLink = isProblemUser() | ||
? "https://saucelabs.com/error/404" | ||
: "https://saucelabs.com/"; | ||
const isVisualFailure = isVisualUser(); | ||
const imageClass = isVisualFailure ? "visual_failure" : ""; | ||
|
||
return ( | ||
<Menu | ||
customBurgerIcon={ | ||
<img src={menuIconPng} srcSet={menuIconSvg} alt="Open Menu" /> | ||
<img | ||
src={menuIconPng} | ||
className={imageClass} | ||
srcSet={menuIconSvg} | ||
alt="Open Menu" | ||
/> | ||
} | ||
customCrossIcon={ | ||
<img src={menuClosePng} srcSet={menuCloseSvg} alt="Close Menu" /> | ||
<img | ||
src={menuClosePng} | ||
className={imageClass} | ||
srcSet={menuCloseSvg} | ||
alt="Close Menu" | ||
/> | ||
} | ||
outerContainerId={"page_wrapper"} | ||
pageWrapId={"contents_wrapper"} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters