File tree Expand file tree Collapse file tree 5 files changed +9
-5
lines changed
Expand file tree Collapse file tree 5 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ class AddVinForm extends React.Component {
2424 render ( ) {
2525 const { handleSubmit, submitting} = this . props ;
2626 return (
27- < Form onSubmit = { handleSubmit ( this . onCreate . bind ( this ) ) } >
27+ < Form onSubmit = { handleSubmit ( this . onCreate . bind ( this ) ) } id = "add-vin-form" >
2828 < Input name = "value" label = "VIN number" validate = { validateVin } />
2929 < Input name = "notes" label = "Notes" />
3030 < Button text = "Save" type = "submit" loading = { submitting } />
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ export default class VinNumberCard extends React.Component {
2424 < Card . Content >
2525 < Card . Header > VIN # { vin . value } </ Card . Header >
2626 < Card . Meta > { vin . friendlyCreationDate ( ) } </ Card . Meta >
27+ < Card . Description > { vin . notes } </ Card . Description >
2728 </ Card . Content >
2829 < Card . Content extra >
2930 < Button . Group fluid >
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ export const VinNumberFields = new SimpleSchema({
1111 } ,
1212 notes : {
1313 type : String ,
14+ optional : true
1415 }
1516} ) ;
1617
Original file line number Diff line number Diff line change @@ -4,9 +4,8 @@ import {addVin} from '/imports/api/vinNumbers/methods';
44const isSeededAlready = ( ) => VinNumbers . find ( ) . count ( ) > 1 ;
55
66const dummyVins = [
7- { value : 'Vin1' , notes : 'Note1' } ,
8- { value : 'Vin2' , notes : 'Note2' } ,
9- { value : 'Vin3' , notes : 'Note3' } ,
7+ { value : '5GZCZ43D13S812715' , notes : 'First' } ,
8+ { value : 'SGZCZ43D13S812715' , notes : 'Second' } ,
109] ;
1110
1211const seedVinNumbers = ( ) => {
Original file line number Diff line number Diff line change @@ -9,10 +9,13 @@ module.exports = {
99 console . log ( 'Executing test `before` hook' ) ;
1010 } ,
1111
12- // @todo #2:30min Implement 'Add VIN number' test
1312 'Add a VIN number' : function ( browser ) {
1413 browser
1514 . goHome ( )
15+ . waitForElementVisible ( '#add-vin-form' )
16+ . setValue ( '#add-vin-form input[name=value]' , 'SGZCZ43D13S812715' )
17+ . setValue ( '#add-vin-form input[name=notes]' , 'Submitted by Nightwatch' )
18+ . click ( '#add-vin-form button' )
1619 . end ( ) ;
1720 }
1821} ;
You can’t perform that action at this time.
0 commit comments