README.me update + minor changes
This commit is contained in:
@ -35,7 +35,6 @@ test('should throw an error if the user is not registered', async t => {
|
||||
// assert user registration failed
|
||||
await t
|
||||
.expect(Selector('H1').withText('Login').exists).ok()
|
||||
.expect(Selector('H1').withText('Dashboard').exists).notOk()
|
||||
.expect(Selector('code').withText(
|
||||
'Invalid credentials.').exists).ok()
|
||||
})
|
||||
@ -62,7 +61,6 @@ test('should allow a user to login', async t => {
|
||||
// assert user is redirected to '/'
|
||||
await t
|
||||
.expect(Selector('H1').withText('Login').exists).notOk()
|
||||
.expect(Selector('H1').withText('Dashboard').exists).ok()
|
||||
|
||||
})
|
||||
|
||||
@ -78,7 +76,6 @@ test('should throw an error if the email is invalid', async t => {
|
||||
// assert user registration failed
|
||||
await t
|
||||
.expect(Selector('H1').withText('Login').exists).ok()
|
||||
.expect(Selector('H1').withText('Dashboard').exists).notOk()
|
||||
.expect(Selector('code').withText(
|
||||
'Invalid credentials.').exists).ok()
|
||||
})
|
||||
@ -95,7 +92,6 @@ test('should throw an error if the password is invalid', async t => {
|
||||
// assert user registration failed
|
||||
await t
|
||||
.expect(Selector('H1').withText('Login').exists).ok()
|
||||
.expect(Selector('H1').withText('Dashboard').exists).notOk()
|
||||
.expect(Selector('code').withText(
|
||||
'Invalid credentials.').exists).ok()
|
||||
})
|
||||
|
@ -37,7 +37,6 @@ test('should allow a user to register', async t => {
|
||||
|
||||
// assert user is redirected to '/'
|
||||
await t
|
||||
.expect(Selector('H1').withText('Dashboard').exists).ok()
|
||||
.expect(Selector('H1').withText('Register').exists).notOk()
|
||||
})
|
||||
|
||||
@ -55,7 +54,6 @@ test('should throw an error if the username is taken', async t => {
|
||||
// assert user registration failed
|
||||
await t
|
||||
.expect(Selector('H1').withText('Register').exists).ok()
|
||||
.expect(Selector('H1').withText('Dashboard').exists).notOk()
|
||||
.expect(Selector('code').withText(
|
||||
'Sorry. That user already exists.').exists).ok()
|
||||
})
|
||||
@ -76,7 +74,6 @@ test('should throw an error if the email is taken', async t => {
|
||||
// assert user registration failed
|
||||
await t
|
||||
.expect(Selector('H1').withText('Register').exists).ok()
|
||||
.expect(Selector('H1').withText('Dashboard').exists).notOk()
|
||||
.expect(Selector('code').withText(
|
||||
'Sorry. That user already exists.').exists).ok()
|
||||
})
|
||||
@ -97,7 +94,6 @@ test('should throw an error if the username is too short', async t => {
|
||||
// assert user registration failed
|
||||
await t
|
||||
.expect(Selector('H1').withText('Register').exists).ok()
|
||||
.expect(Selector('H1').withText('Dashboard').exists).notOk()
|
||||
.expect(Selector('code').withText(
|
||||
'Username: 3 to 12 characters required.').exists).ok()
|
||||
})
|
||||
@ -118,7 +114,6 @@ test('should throw an error if the user is too long', async t => {
|
||||
// assert user registration failed
|
||||
await t
|
||||
.expect(Selector('H1').withText('Register').exists).ok()
|
||||
.expect(Selector('H1').withText('Dashboard').exists).notOk()
|
||||
.expect(Selector('code').withText(
|
||||
'Username: 3 to 12 characters required.').exists).ok()
|
||||
})
|
||||
@ -139,7 +134,6 @@ test('should throw an error if the email is invalid', async t => {
|
||||
// assert user registration failed
|
||||
await t
|
||||
.expect(Selector('H1').withText('Register').exists).ok()
|
||||
.expect(Selector('H1').withText('Dashboard').exists).notOk()
|
||||
.expect(Selector('code').withText(
|
||||
'Valid email must be provided.').exists).ok()
|
||||
})
|
||||
@ -158,7 +152,6 @@ test('should throw an error if passwords don\'t match', async t => {
|
||||
// assert user registration failed
|
||||
await t
|
||||
.expect(Selector('H1').withText('Register').exists).ok()
|
||||
.expect(Selector('H1').withText('Dashboard').exists).notOk()
|
||||
.expect(Selector('code').withText(
|
||||
'Password and password confirmation don\'t match.').exists).ok()
|
||||
})
|
||||
@ -179,7 +172,6 @@ test('should throw an error if the password is too short', async t => {
|
||||
// assert user registration failed
|
||||
await t
|
||||
.expect(Selector('H1').withText('Register').exists).ok()
|
||||
.expect(Selector('H1').withText('Dashboard').exists).notOk()
|
||||
.expect(Selector('code').withText(
|
||||
'Password: 8 characters required.').exists).ok()
|
||||
})
|
||||
|
@ -146,6 +146,10 @@ input, textarea {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.dashboard {
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.sport-img {
|
||||
max-width: 35px;
|
||||
max-height: 35px;
|
||||
|
@ -28,10 +28,6 @@ export default function ActivityCard (props) {
|
||||
</div>
|
||||
)}
|
||||
<div className="col">
|
||||
<p>
|
||||
<i className="fa fa-calendar" aria-hidden="true" />{' '}
|
||||
Start at {activity.activity_date}
|
||||
</p>
|
||||
<p>
|
||||
<i className="fa fa-clock-o" aria-hidden="true" />{' '}
|
||||
Duration: {activity.duration}
|
||||
|
@ -33,12 +33,11 @@ class DashBoard extends React.Component {
|
||||
<Helmet>
|
||||
<title>mpwo - Dashboard</title>
|
||||
</Helmet>
|
||||
<h1 className="page-title">Dashboard</h1>
|
||||
{message ? (
|
||||
<code>{message}</code>
|
||||
) : (
|
||||
(activities.length > 0 && sports.length > 0) ? (
|
||||
<div className="container">
|
||||
<div className="container dashboard">
|
||||
<div className="row">
|
||||
<div className="col-md-4">
|
||||
<Records records={records} sports={sports} />
|
||||
|
Reference in New Issue
Block a user