Skip to content

Commit ac4fb88

Browse files
timdeschryverbrandonroberts
authored andcommitted
feat(example): make the example app more user friendly (#1508)
Also enables e2e tests for redux-devtools-extension maintainer.
1 parent da1c955 commit ac4fb88

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

projects/example-app/src/app/app.module.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import { reducers, metaReducers } from '@example-app/reducers';
1717
import { schema } from '@example-app/db';
1818

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

2322
@NgModule({
@@ -55,7 +54,9 @@ import { AppRoutingModule } from '@example-app/app-routing.module';
5554
*/
5655
StoreDevtoolsModule.instrument({
5756
name: 'NgRx Book Store App',
58-
logOnly: environment.production,
57+
58+
// In a production build you would want to disable the Store Devtools
59+
// logOnly: environment.production,
5960
}),
6061

6162
/**

projects/example-app/src/app/auth/components/login-form.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export class LoginFormComponent implements OnInit {
8282
@Output() submitted = new EventEmitter<Credentials>();
8383

8484
form: FormGroup = new FormGroup({
85-
username: new FormControl(''),
85+
username: new FormControl('ngrx'),
8686
password: new FormControl(''),
8787
});
8888

projects/example-app/src/app/auth/containers/__snapshots__/login-page.component.spec.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ exports[`Login Page should compile 1`] = `
3535
>
3636
<mat-form-field
3737
_ngcontent-c0=""
38-
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"
38+
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"
3939
>
4040
<div
4141
class="mat-form-field-wrapper"
@@ -68,7 +68,7 @@ exports[`Login Page should compile 1`] = `
6868
6969
<label
7070
aria-owns="mat-input-0"
71-
class="mat-form-field-label ng-tns-c2-0 mat-empty mat-form-field-empty ng-star-inserted"
71+
class="mat-form-field-label ng-tns-c2-0 ng-star-inserted"
7272
for="mat-input-0"
7373
id="mat-form-field-label-1"
7474
ng-reflect-disabled="true"

projects/example-app/src/app/auth/services/auth.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export class AuthService {
1414
* Simulate a failed login to display the error
1515
* message for the login form.
1616
*/
17-
if (username !== 'test') {
17+
if (username !== 'test' && username !== 'ngrx') {
1818
return throwError('Invalid username or password');
1919
}
2020

0 commit comments

Comments
 (0)