This file contains hidden or 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
| Cypress.Commands.add("loggedInAs", uid => { | |
| window.localStorage.setItem("access-token", "pipJxPi2TAPF38GRCh9vSQ"); | |
| window.localStorage.setItem("client", "NWcHIr2W-BrrhaFRylZkRQ"); | |
| window.localStorage.setItem("expiry", "1556099608"); | |
| window.localStorage.setItem("token-type", "Bearer"); | |
| window.localStorage.setItem("uid", uid); | |
| cy.visit("http://localhost:3001"); | |
| }); |
This file contains hidden or 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
| window.localStorage.setItem("access-token", "jVUfYw92zjFCtGMTZilctw"); | |
| window.localStorage.setItem("client", "e_1a0iMA4uG52JMl9f8uog"); | |
| window.localStorage.setItem("expiry", " 1558352526"); | |
| window.localStorage.setItem("token-type", "Bearer"); | |
| window.localStorage.setItem("uid", '[email protected]'); |
This file contains hidden or 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
| window.localStorage.setItem("access-token", "jVUfYw92zjFCtGMTZilctw"); | |
| window.localStorage.setItem("client", "e_1a0iMA4uG52JMl9f8uog"); | |
| window.localStorage.setItem("expiry", " 1558352526"); | |
| window.localStorage.setItem("token-type", "Bearer"); | |
| window.localStorage.setItem("uid", '[email protected]'); |
This file contains hidden or 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
| Cypress.Commands.add("loggedInAs", uid => { | |
| window.localStorage.setItem("access-token", "jVUfYw92zjFCtGMTZilctw"); | |
| window.localStorage.setItem("client", "e_1a0iMA4uG52JMl9f8uog"); | |
| window.localStorage.setItem("expiry", "1558352526"); | |
| window.localStorage.setItem("token-type", "Bearer"); | |
| window.localStorage.setItem("uid", uid); | |
| cy.visit("http://localhost:3001"); | |
| }); |
This file contains hidden or 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
| describe("User can navigate homepage", () => { | |
| before(() => { | |
| cy.loggedInAs('user') | |
| }); | |
| it("Has logo and sessions", () => { | |
| [ | |
| "Logo", | |
| "Log Out", | |
| "Crossfit", |
This file contains hidden or 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
| import { createStore } from "redux"; | |
| const store = createStore() |
This file contains hidden or 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
| // src/redux/reducers/contactReducer.js | |
| const initialState = { | |
| contacts : [ | |
| { name: "John Doe", phone: "073-300-5000", email: "[email protected]" } | |
| ] | |
| } | |
| const contactReducer = (state = initialState, action) => { | |
| return state | |
| } |
This file contains hidden or 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
| import React from "react"; | |
| import ReactDOM from "react-dom"; | |
| import * as serviceWorker from "./serviceWorker"; | |
| import { BrowserRouter } from "react-router-dom"; | |
| import { createStore } from "redux"; | |
| import { Provider } from "react-redux"; | |
| import "./index.css"; | |
| import App from "./App"; | |
| import contactReducer from "./redux/reducers/contactReducer"; |
This file contains hidden or 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
| // src/components/Contact/Contact.js | |
| import React, { Component } from "react"; | |
| import { Link } from "react-router-dom"; | |
| import { connect } from "react-redux"; | |
| import "./Contacts.css"; | |
| export class Contacts extends Component { | |
| render() { |
This file contains hidden or 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
Show hidden characters
| { | |
| "Standard Arrow Function": { | |
| "prefix": "arr", | |
| "body": [ | |
| "const ${1:ArrowFunction} = () => {", | |
| " ", | |
| "}" | |
| ], | |
| "description": "Standard Arrow Function" | |
| } |
OlderNewer