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
let form = [ | |
["input[name=email]", "[email protected]"], | |
["input[name=password]", "password"], | |
["input[name=password_confirmation]", "password"], | |
["input[name=first_name]", "John"], | |
["input[name=last_name]", "Doe"] | |
] | |
form.forEach(element => { | |
cy.get(element[0]).type(element[1]); |
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
cy.get("#session_91").within(() => { | |
cy.contains("Spots booked: 0"); | |
cy.contains("BOOK").click(); | |
}); |
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
beforeEach(() => { | |
cy.server(); | |
cy.route({ | |
method: "GET", | |
url: "http://localhost:3000/sessions?page=1", | |
response: "fixture:sessionpage_1.json" | |
}); | |
cy.route({ | |
method: "GET", | |
url: "http://localhost:3000/sessions?page=2", |
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
REACT_APP_GITHUB_PERSONAL_ACCESS_TOKEN = <insert github personal token here> |
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 './App.css'; | |
import { ApolloClient } from "apollo-boost"; | |
import { ApolloProvider } from "react-apollo"; | |
import MyProfile from './components/MyProfile'; | |
import { setContext } from 'apollo-link-context' | |
import { HttpLink } from 'apollo-link-http' | |
import { InMemoryCache } from 'apollo-boost' | |
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 './App.css'; | |
import { ApolloClient } from "apollo-boost"; | |
import { ApolloProvider } from "react-apollo"; | |
import MyProfile from './components/MyProfile'; | |
const client = new ApolloClient({ | |
}); | |
const App = () => { |
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 { Query } from 'react-apollo' | |
import gql from 'graphql-tag' | |
const GET_CURRENT_USER = gql` | |
{ | |
viewer { | |
login | |
name | |
repositories(first: 10) { |
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
/** | |
* Sample React Native App | |
* https://github.com/facebook/react-native | |
* | |
* @format | |
* @flow | |
*/ | |
import React, {Fragment} from 'react'; | |
import Permissions, {type PermissionStatus} from 'react-native-permissions'; |
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, { Component } from 'react'; | |
import { | |
SafeAreaView, | |
StyleSheet, | |
ScrollView, | |
View, | |
TextInput, | |
Text, | |
StatusBar, | |
Button |
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 decode from "jwt-decode"; | |
var querystring = require("querystring"); | |
const axios = require("axios"); | |
export default class Credentials { | |
getCredentials = () => { | |
const token = this.getToken(); | |
if (!!token && !this.isTokenExpired(token)) { | |
return token; | |
} else { |
OlderNewer