forked from tasitlabs/tasit-apps
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
26a6c0d
commit 650c5c3
Showing
5 changed files
with
101 additions
and
31 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import React from "react"; | ||
import NavigationTestUtils from "react-navigation/NavigationTestUtils"; | ||
import { shallow } from "enzyme"; | ||
import EthereumSignUpForm from "./EthereumSignUpForm"; | ||
|
||
describe("EthereumSignUpForm", () => { | ||
jest.useFakeTimers(); | ||
beforeEach(() => { | ||
NavigationTestUtils.resetInternalState(); | ||
}); | ||
|
||
it("renders the component", async () => { | ||
expect(shallow(<EthereumSignUpForm />)).toMatchSnapshot(); | ||
}); | ||
|
||
it("creates a wallet - calling function", async () => { | ||
const wrapper = shallow(<EthereumSignUpForm />); | ||
expect(wrapper.state("address")).toEqual(""); | ||
await wrapper.instance().createAccount(); | ||
expect(wrapper.state("address")).not.toEqual(""); | ||
}); | ||
}); |
70 changes: 70 additions & 0 deletions
70
demo/components/presentational/__snapshots__/EthereumSignUpForm.test.js.snap
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`EthereumSignUpForm renders the component 1`] = ` | ||
<Fragment> | ||
<Component | ||
style={ | ||
Object { | ||
"flexDirection": "row", | ||
} | ||
} | ||
> | ||
<Component | ||
style={ | ||
Object { | ||
"alignItems": "flex-end", | ||
"flex": 1, | ||
} | ||
} | ||
> | ||
<TextInput | ||
allowFontScaling={true} | ||
autoCapitalize="none" | ||
autoCorrect={false} | ||
onChangeText={[Function]} | ||
placeholder="username" | ||
style={ | ||
Object { | ||
"fontSize": 20, | ||
"justifyContent": "flex-start", | ||
"width": 90, | ||
} | ||
} | ||
underlineColorAndroid="transparent" | ||
value="" | ||
/> | ||
</Component> | ||
<Component | ||
style={ | ||
Object { | ||
"flex": 1, | ||
} | ||
} | ||
> | ||
<Component | ||
style={ | ||
Object { | ||
"fontSize": 20, | ||
"justifyContent": "flex-end", | ||
} | ||
} | ||
> | ||
.tasitid.eth | ||
</Component> | ||
</Component> | ||
</Component> | ||
<Component | ||
style={ | ||
Object { | ||
"flexDirection": "row", | ||
"marginTop": 30, | ||
} | ||
} | ||
> | ||
<Button | ||
onPress={[Function]} | ||
title="Continue" | ||
/> | ||
</Component> | ||
</Fragment> | ||
`; |
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
This file was deleted.
Oops, something went wrong.