Skip to content

Commit 54302b1

Browse files
committed
fixes the protractor test
1 parent 56b9b68 commit 54302b1

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

e2e/app.e2e-spec.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,26 @@ describe('ng-book rxjs-chat Example App', function() {
1111
it('should load the page', () => {
1212
page.navigateTo();
1313

14-
expect(page.unreadCount()).toMatch(`3`);
14+
expect(page.unreadCount()).toMatch(`4`);
1515

1616
page.clickThread(1);
17-
expect(page.unreadCount()).toMatch(`2`);
17+
expect(page.unreadCount()).toMatch(`3`);
1818

1919
page.clickThread(2);
20-
expect(page.unreadCount()).toMatch(`1`);
20+
expect(page.unreadCount()).toMatch(`2`);
2121

2222
page.clickThread(3);
2323
expect(page.unreadCount()).toMatch(`0`);
2424

25+
page.clickThread(2);
2526
page.sendMessage('3');
2627
expect(page.unreadCount()).toMatch(`0`);
2728

28-
page.clickThread(0);
29-
// expect(page.unreadCount()).toMatch(`1`);
30-
expect(page.getConversationText(3)).toContain(`I waited 3 seconds`);
29+
page.clickThread(1);
30+
31+
browser.sleep(5000).then(function() {
32+
expect(page.getConversationText(0)).toContain(`I waited 3 seconds`);
33+
});
3134
});
3235

3336
});

webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ function makeConfig(options) {
9797
resolve: {
9898
root: [path.resolve(cwd)],
9999
modulesDirectories: [
100-
'node_modules', 'app', 'app/ts'
100+
'node_modules', 'app', 'app/ts', 'test'
101101
],
102102
extensions: ["", ".ts", ".js", ".json", ".css"],
103103
alias: {

0 commit comments

Comments
 (0)