Skip to content

Commit

Permalink
test(slow-information-renderer): add flakey e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
robt1019 committed Apr 23, 2019
1 parent c6df727 commit 549b051
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 14 deletions.
6 changes: 5 additions & 1 deletion angular.json
Expand Up @@ -61,6 +61,10 @@
"configurations": {
"production": {
"browserTarget": "slow-information-renderer:build:production"
},
"e2e": {
"browserTarget": "slow-information-renderer:build:production",
"port": 4201
}
}
},
Expand Down Expand Up @@ -100,7 +104,7 @@
"options": {
"cypressConfig": "apps/slow-information-renderer-e2e/cypress.json",
"tsConfig": "apps/slow-information-renderer-e2e/tsconfig.e2e.json",
"devServerTarget": "slow-information-renderer:serve"
"devServerTarget": "slow-information-renderer:serve:e2e"
},
"configurations": {
"production": {
Expand Down
4 changes: 0 additions & 4 deletions apps/slow-information-renderer-e2e/src/fixtures/example.json

This file was deleted.

@@ -1,9 +1,8 @@
import { getGreeting } from '../support/app.po';

describe('Hello Nx', () => {
describe('slow-information-renderer', () => {
beforeEach(() => cy.visit('/'));

it('should display welcome message', () => {
getGreeting().contains('Welcome to slow-information-renderer!');
it('should display an interesting fact when the button is clicked', () => {
cy.get('#interestingFactButton').click();
cy.get('#interestingFact');
});
});
@@ -1,8 +1,11 @@
<h1>You want facts!?!</h1>
<h2>Because we got em</h2>
<h3>Seriously</h3>
<button (click)="getSlowInformation()">Click le button</button>
<button (click)="getSlowInformation()" id="interestingFactButton">
Click le button
</button>
<p
id="interestingFact"
*ngIf="(slowInformation | async)"
[ngClass]="{
wow: (slowInformation | async)?.fact.interestLevel === 'interesting',
Expand Down
@@ -1,7 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { SlowInformationService } from '../slow-information.service';
import { Observable, BehaviorSubject } from 'rxjs';
import { Component } from '@angular/core';
import { SlowInformation } from '@wtfisanapi/slow-ass-api';
import { BehaviorSubject } from 'rxjs';
import { SlowInformationService } from '../slow-information.service';

@Component({
selector: 'wtfisanapi-slow-information',
Expand Down

0 comments on commit 549b051

Please sign in to comment.