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 HomePage from '../elements/pages/HomePage'; | |
| describe('Sign In', () => { | |
| it('should show an error message on empty input', () => { | |
| const home = new HomePage(); | |
| home.visit(); | |
| const signIn = home.goToSignIn(); | |
| signIn.submit(); |
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
| class SignInPage { | |
| visit() { | |
| cy.visit('/signin'); | |
| } | |
| getEmailError() { | |
| return cy.get(`[data-testid=SignInEmailError]`); | |
| } | |
| getPasswordError() { |
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
| class Header { | |
| getSignInLink() { | |
| return cy.get(`[data-testid=SignInLink]`); | |
| } | |
| } | |
| export default Header; |
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 Header from './Headers'; | |
| import SignInPage from './SignIn'; | |
| class HomePage { | |
| constructor() { | |
| this.header = new Header(); | |
| } | |
| visit() { | |
| cy.visit('/'); |
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
| set nocompatible " be improved, required | |
| filetype off " required | |
| " set the runtime path to include Vundle and initialize | |
| set rtp+=~/.config/nvim/bundle/Vundle.vim | |
| call vundle#begin() " required | |
| Plugin 'VundleVim/Vundle.vim' " required | |
| " =================== | |
| " my plugins 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 { graphql, commitMutation } from 'react-relay'; | |
| import { getEnvironment } from 'react-releasy'; | |
| const environment = getEnvironment(); | |
| const mutation = graphql` | |
| mutation ChangeNameMutation($input: ChangeNameInput!) { | |
| ChangeName(input: $input) { | |
| me { | |
| id |
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 { QueryRenderer, graphql } from 'react-relay'; | |
| import { withReleasy } from 'react-releasy'; | |
| const MyComponent = ({ environment }) => ( | |
| <QueryRenderer | |
| environment={environment} | |
| query={graphql` | |
| query MyComponentMeQuery { | |
| me { |
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 { graphql } from 'react-relay'; | |
| import { query } from 'react-releasy'; | |
| const MyComponent = ({ error, isFetching, me }) => { | |
| if (error) { | |
| return `Error: ${error.message}`; | |
| } | |
| if (isFetching) { | |
| return 'Loading...'; |
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 { ReleasyProvider } from 'react-releasy'; | |
| ReactDOM.render( | |
| <ReleasyProvider config={config}> | |
| <MyApplication /> | |
| </ReleasyProvider>, | |
| document.getElementById('root'), | |
| ); |
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 { Config, InMemoryCache, Link } from 'react-releasy'; | |
| const link = new Link({ | |
| url: 'https://yourserveraddress.com/graphql', | |
| }); | |
| const cache = new InMemoryCache(); | |
| const config = new Config({ | |
| link, |