Skip to content

Commit

Permalink
test(landing): e2e tests for landing screen
Browse files Browse the repository at this point in the history
  • Loading branch information
mnzaki committed Sep 12, 2019
1 parent 51ac0de commit d268196
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
20 changes: 20 additions & 0 deletions e2e/01_new_user/01_landing.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { expect } from 'detox'

describe('Landing', () => {
describe('Landing Screen', () => {
it('should show a landingCarousel', async () => {
const landingCarousel = element(by.id('landingCarousel'))
await expect(landingCarousel).toBeVisible()
})

it('should show a getStarted button', async () => {
const getStarted = element(by.id('getStarted'))
await expect(getStarted).toBeVisible()
})

it('should show a recoverIdentity button', async () => {
const recoverIdentity = element(by.id('recoverIdentity'))
await expect(recoverIdentity).toBeVisible()
})
})
})
3 changes: 3 additions & 0 deletions src/ui/landing/components/landing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ export class LandingComponent extends React.Component<Props> {
return (
<Container style={styles.mainContainer}>
<Carousel
testID="landingCarousel"
data={landingSlides}
renderItem={this.renderItem}
lockScrollWhileSnapping
Expand All @@ -136,6 +137,7 @@ export class LandingComponent extends React.Component<Props> {
/>
<View style={styles.bottomSection}>
<Button
testID="getStarted"
onPress={this.props.handleGetStarted}
style={{
container: styles.mainButtonContainer,
Expand All @@ -145,6 +147,7 @@ export class LandingComponent extends React.Component<Props> {
upperCase={false}
/>
<Button
testID="recoverIdentity"
onPress={this.props.handleRecover}
style={{
container: styles.recoverButtonContainer,
Expand Down

0 comments on commit d268196

Please sign in to comment.