Skip to content

Commit

Permalink
feat(example): make the example app more user friendly (#1508)
Browse files Browse the repository at this point in the history
Also enables e2e tests for redux-devtools-extension maintainer.
  • Loading branch information
timdeschryver authored and brandonroberts committed Jan 15, 2019
1 parent da1c955 commit ac4fb88
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions projects/example-app/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import { reducers, metaReducers } from '@example-app/reducers';
import { schema } from '@example-app/db';

import { AppComponent } from '@example-app/core/containers/app.component';
import { environment } from '../environments/environment';
import { AppRoutingModule } from '@example-app/app-routing.module';

@NgModule({
Expand Down Expand Up @@ -55,7 +54,9 @@ import { AppRoutingModule } from '@example-app/app-routing.module';
*/
StoreDevtoolsModule.instrument({
name: 'NgRx Book Store App',
logOnly: environment.production,

// In a production build you would want to disable the Store Devtools
// logOnly: environment.production,
}),

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export class LoginFormComponent implements OnInit {
@Output() submitted = new EventEmitter<Credentials>();

form: FormGroup = new FormGroup({
username: new FormControl(''),
username: new FormControl('ngrx'),
password: new FormControl(''),
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ exports[`Login Page should compile 1`] = `
>
<mat-form-field
_ngcontent-c0=""
class="mat-form-field ng-tns-c2-0 mat-primary mat-form-field-type-mat-input mat-form-field-appearance-legacy mat-form-field-can-float mat-form-field-hide-placeholder ng-untouched ng-pristine ng-valid _mat-animation-noopable"
class="mat-form-field ng-tns-c2-0 mat-primary mat-form-field-type-mat-input mat-form-field-appearance-legacy mat-form-field-can-float mat-form-field-should-float mat-form-field-hide-placeholder ng-untouched ng-pristine ng-valid _mat-animation-noopable"
>
<div
class="mat-form-field-wrapper"
Expand Down Expand Up @@ -68,7 +68,7 @@ exports[`Login Page should compile 1`] = `
<label
aria-owns="mat-input-0"
class="mat-form-field-label ng-tns-c2-0 mat-empty mat-form-field-empty ng-star-inserted"
class="mat-form-field-label ng-tns-c2-0 ng-star-inserted"
for="mat-input-0"
id="mat-form-field-label-1"
ng-reflect-disabled="true"
Expand Down
2 changes: 1 addition & 1 deletion projects/example-app/src/app/auth/services/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class AuthService {
* Simulate a failed login to display the error
* message for the login form.
*/
if (username !== 'test') {
if (username !== 'test' && username !== 'ngrx') {
return throwError('Invalid username or password');
}

Expand Down

0 comments on commit ac4fb88

Please sign in to comment.