Skip to content

Commit 8e83b0c

Browse files
committed
fixes e2e tests
1 parent 2dde7f9 commit 8e83b0c

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

e2e/app.e2e-spec.ts

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,34 @@
1-
import { AngularReduxChatPage } from './app.po';
1+
import { AngularChatPage } from './app.po';
22
import { browser } from 'protractor';
33

4-
describe('angular-redux-chat App', () => {
5-
let page: AngularReduxChatPage;
4+
describe('angular-rxjs-chat App', () => {
5+
let page: AngularChatPage;
66

77
beforeEach(() => {
8-
page = new AngularReduxChatPage();
8+
page = new AngularChatPage();
99
});
1010

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`);
21+
page.sendMessage('3');
2122

2223
page.clickThread(3);
2324
expect(page.unreadCount()).toMatch(`0`);
2425

25-
page.sendMessage('3');
26-
expect(page.unreadCount()).toMatch(`0`);
27-
2826
page.clickThread(0);
2927
// expect(page.unreadCount()).toMatch(`1`);
3028
// expect(page.getConversationText(3)).toContain(`I waited 3 seconds`);
3129

3230
browser.sleep(5000).then(function() {
33-
expect(page.getConversationText(3)).toContain(`I waited 3 seconds`);
31+
expect(page.getConversationText(0)).toContain(`I waited 3 seconds`);
3432
});
3533
});
3634
});

e2e/app.po.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { browser, element, by } from 'protractor';
22

3-
export class AngularReduxChatPage {
3+
export class AngularChatPage {
44
navigateTo() {
55
return browser.get('/');
66
}

0 commit comments

Comments
 (0)