Skip to content

Instantly share code, notes, and snippets.

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();
class SignInPage {
visit() {
cy.visit('/signin');
}
getEmailError() {
return cy.get(`[data-testid=SignInEmailError]`);
}
getPasswordError() {
class Header {
getSignInLink() {
return cy.get(`[data-testid=SignInLink]`);
}
}
export default Header;
import Header from './Headers';
import SignInPage from './SignIn';
class HomePage {
constructor() {
this.header = new Header();
}
visit() {
cy.visit('/');
@felippepuhle
felippepuhle / init.vim
Last active June 12, 2018 13:04
nvim config
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
" ===================
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
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 {
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...';
import { ReleasyProvider } from 'react-releasy';
ReactDOM.render(
<ReleasyProvider config={config}>
<MyApplication />
</ReleasyProvider>,
document.getElementById('root'),
);
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,