Skip to content

Commit

Permalink
Update home page to make it responsive; Update copy
Browse files Browse the repository at this point in the history
  • Loading branch information
JackNeto committed Nov 17, 2019
1 parent dc197ba commit 9239297
Show file tree
Hide file tree
Showing 7 changed files with 157 additions and 261 deletions.
15 changes: 15 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"@vx/scale": "0.0.192",
"@vx/shape": "0.0.192",
"@vx/tooltip": "0.0.192",
"aos": "^2.3.4",
"big.js": "^5.2.2",
"blockstack": "^19.2.5",
"chroma-js": "^2.1.0",
Expand Down Expand Up @@ -140,4 +141,4 @@
}
}
}
}
}
16 changes: 8 additions & 8 deletions src/__tests__/routes.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ describe('Routes', () => {
<Routes />
</Provider>
))
expect(getByText('Insight into your finances, without sacrificing your data')).toBeInTheDocument()
expect(getByText('Your Personal Finances Simple & Private')).toBeInTheDocument()
expect(history.entries.map((e) => e.pathname)).toEqual(['/'])
expect(queryByText((_, element) => element.tagName.toLowerCase() === 'header')).not.toBeInTheDocument()
})
Expand All @@ -91,17 +91,17 @@ describe('Routes', () => {
), { route: '/handle-login' })
expect(blockstackUserSession.handlePendingSignIn).toHaveBeenCalled()
await wait(() => expect(historyPushSpy).toHaveBeenCalled())
expect(getByText('Insight into your finances, without sacrificing your data')).toBeInTheDocument()
expect(getByText('Your Personal Finances Simple & Private')).toBeInTheDocument()
expect(history.entries.map((e) => e.pathname)).toEqual(['/handle-login', '/'])
})

it.only('redirects to home page if not logged in', () => {
it('redirects to home page if not logged in', () => {
const { history, getByText } = renderWithRouter((
<Provider store={store}>
<Routes />
</Provider>
), { route: '/dashboard' })
expect(getByText('Insight into your finances, without sacrificing your data')).toBeInTheDocument()
expect(getByText('Your Personal Finances Simple & Private')).toBeInTheDocument()
expect(history.entries.map((e) => e.pathname)).toEqual(['/'])
})
})
Expand All @@ -113,7 +113,7 @@ describe('Routes', () => {
<Routes />
</Provider>
))
expect(getByText('Insight into your finances, without sacrificing your data')).toBeInTheDocument()
expect(getByText('Your Personal Finances Simple & Private')).toBeInTheDocument()
expect(getByText('Sign in with Blockstack')).toBeInTheDocument()

// Login with blockstack
Expand All @@ -127,7 +127,7 @@ describe('Routes', () => {
// Logout
fireEvent.click(getByTestId('userNavButton'))
fireEvent.click(getByTestId('logoutButton'))
await waitForElement(() => getByText('Insight into your finances, without sacrificing your data'))
await waitForElement(() => getByText('Your Personal Finances Simple & Private'))
expect(queryByText((_, element) => element.tagName.toLowerCase() === 'header')).not.toBeInTheDocument()
expect(persistor).toBeNull()
})
Expand All @@ -138,7 +138,7 @@ describe('Routes', () => {
<Routes />
</Provider>
))
expect(getByText('Insight into your finances, without sacrificing your data')).toBeInTheDocument()
expect(getByText('Your Personal Finances Simple & Private')).toBeInTheDocument()
expect(getByText('Sign in with Blockstack')).toBeInTheDocument()

// Login with blockstack
Expand All @@ -153,7 +153,7 @@ describe('Routes', () => {
blockstackUserSession.isUserSignedIn.mockReturnValue(false)
fireEvent.click(getByTestId('userNavButton'))
fireEvent.click(getByTestId('logoutButton'))
await waitForElement(() => getByText('Insight into your finances, without sacrificing your data'))
await waitForElement(() => getByText('Your Personal Finances Simple & Private'))
expect(persistor).toBeNull()
})

Expand Down
7 changes: 0 additions & 7 deletions src/common/LoginButton/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,7 @@ const LoginButton = () => {
</Tooltip>
)}
{ user.isAuthenticatedWith === 'guest' && (
<<<<<<< HEAD
<Avatar alt={user.name} src={user.pictureUrl} />
=======
<Avatar
src={user.pictureUrl}
alt={user.name}
/>
>>>>>>> initial updates
)}
<Button
ref={anchorRef}
Expand Down
2 changes: 1 addition & 1 deletion src/core/Landing/__tests__/LandingCard.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('LandingCard', () => {
</Provider>
)
expect(getByText('Sign in with Blockstack')).toBeInTheDocument()
expect(getByText('Don\'t sign in yet')).toBeInTheDocument()
expect(getByText('Sign in as guest user')).toBeInTheDocument()
})

it('handles login with blockstack', async () => {
Expand Down
2 changes: 1 addition & 1 deletion src/core/Landing/__tests__/index.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ describe('Landing page', () => {
</BrowserRouter>
</Provider>
)
expect(getByText('Insight into your finances, without sacrificing your data')).toBeInTheDocument()
expect(getByText('Your Personal Finances Simple & Private')).toBeInTheDocument()
})
})

0 comments on commit 9239297

Please sign in to comment.