Skip to content

Commit e20d9ce

Browse files
committed
Update lint and e2e.
1 parent 2ae5a9a commit e20d9ce

7 files changed

Lines changed: 565 additions & 127 deletions

File tree

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
## Astronomy/Weather Clock
22

33
To test and build the web client project, you can use the following commands:
4+
- "`npm run lint`" to inspect the code with TSLint.
45
- "`npm run build`" to build.
56
- "`npm test`" to run unit tests.
67
- "`npm start`" to serve the app using webpack-dev-server.
7-
- "`npm run e2e`" to run Protractor.
8+
- "`npm run e2e`" to run Protractor for end-to-end tests.
89

910
To run the weather server, use "`npm start`" from within the server directory.
1011

e2e/app.e2e-spec.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@ import { AppPage } from './app.po';
33

44
browser.waitForAngularEnabled(false);
55

6-
describe('my-app App', () => {
6+
describe('aw-clock', () => {
77
let page: AppPage;
88

99
beforeEach(() => {
1010
page = new AppPage();
1111
});
1212

13-
it('should display date', () => {
13+
it('should display time', () => {
1414
page.navigateTo();
15-
expect(page.getDateText()).toMatch(/\w\w\w \d\d\d\d-\d\d-\d\d/);
15+
browser.sleep(2000);
16+
expect(page.getTimeText()).toMatch(/\d\d:\d\d.*/);
1617
});
1718
});

e2e/app.po.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export class AppPage {
55
return browser.get('/');
66
}
77

8-
getDateText() {
9-
return element(by.css('#date')).getText();
8+
getTimeText() {
9+
return element(by.css('#time')).getText();
1010
}
1111
}

0 commit comments

Comments
 (0)