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
import React, {FunctionComponent, useEffect, useRef, useState} from "react"; | |
import {Animated, Easing, TouchableOpacity} from "react-native"; | |
import {theme} from "../../const/theme"; | |
export const Link: FunctionComponent<{ | |
onPress: () => void, | |
useUnderline?: boolean | |
a11yLabel: string, | |
isExternalLink: boolean | |
}> = ({ |
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
// | |
// Paste into: https://xstate.js.org/viz/ | |
// Trying out a state chart to model the idea flow | |
// | |
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions | |
// - XState (all XState exports) |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions | |
// - XState (all XState exports) |
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
// Setup for use with enzyme | |
// Patching console.error so test will fail | |
const Enzyme = require('enzyme'); | |
const Adapter = require('enzyme-adapter-react-16'); | |
Enzyme.configure({ adapter: new Adapter() }); | |
//fix redux saga test plan which needs setTimeout on window | |
global.window.setTimeout = global.setTimeout; |
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
import { configure, getStorybookUI } from '@storybook/react-native'; | |
import React from 'react'; | |
import { getConfig } from 'src/config'; | |
import { | |
allStories, | |
loadStories, | |
} from 'src/test/storybook/storyshots/allStories'; | |
/** | |
* init storybook UI on app startup and returns component ready, but dont display yet |
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
/////////////////// | |
// AUTO GENERATED by createTests.ts | |
// This is the storyshot for the story file | |
// One test file per story to help test watching | |
/////////////////// | |
import { getSnapshotFileName } from '@storybook/addon-storyshots'; | |
import { shallow } from 'enzyme'; | |
import toJson from 'enzyme-to-json'; | |
import React from 'react'; |
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
import { storiesOf } from '@storybook/react-native'; | |
import React from 'react'; | |
import { Text, View } from 'react-native'; | |
const TestComponent: React.SFC<{}> = () => <Text>Hello world!</Text>; | |
/** | |
* A test story for testTemplate to use | |
* | |
* Test Decorator should not be in snapshot be design |
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
import { action } from '@storybook/addon-actions'; | |
import { Store } from 'redux'; | |
import { getInitialState } from '../state'; | |
/** | |
* Ready only mock store with addon actions upon dispatch | |
* | |
* Defaults to having a valid App initial state as imported via state.ts | |
*/ | |
export const getStorybookStore = (): Store<any> => { |
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
import addons from '@storybook/addons'; | |
import { createMockChannel } from 'src/test/storybook/storyshots/mockChannel'; | |
// | |
// This runs to mock things required for the jest snapshot of a story | |
// | |
// In generated test, import this straight as `import 'src/test/storybook/storyshots/setupSnapshotTest'` | |
// Then require mocked storybook methods | |
// `const { configure, getStorybook } = require('@storybook/react-native');` | |
// |
NewerOlder