Skip to content

Commit 5a7de62

Browse files
authored
Merge pull request #35 from microsoftgraph/refresh
Refreshed tutorial with latest versions
2 parents aca8eee + 18767b9 commit 5a7de62

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+4976
-3748
lines changed

README.md

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,11 @@ If you just want the completed sample generated by following this lab, you can f
1414

1515
- [Completed project](demo)
1616

17-
## Watch the Module
18-
19-
This module has been recorded and is available in the Office Development YouTube channel: [Build Angular SPAs with Microsoft Graph](https://youtu.be/KUPRTTOUzz8)
20-
21-
## Contributors
22-
23-
| Roles | Author(s) |
24-
| ----------------- | --------------------------------------------------------------------------------------------- |
25-
| Code / Tutorial | Jason Johnston (Microsoft) [@jasonjoh](//github.com/jasonjoh) |
26-
| Slides | Jeremy Thake (Microsoft) [@jthake-msft](//github.com/jthake-msft) |
27-
| QA | Andrew Connell (Microsoft MVP, Voitanos) [@andrewconnell](//github.com/andrewconnell) |
28-
| QA | Julie Turner (Microsoft MVP, Sympraxis Consulting) [@juliemturner](//github.com/juliemturner) |
29-
| Sponsor / Support | Jason Johnston (Microsoft) [@jasonjoh](//github.com/jasonjoh) |
30-
3117
## Version history
3218

3319
| Version | Date | Comments |
3420
| ------- | ---------------- | ------------------------------------------------ |
21+
| 1.8 | April 19, 2021 | Updated sample to latest versions |
3522
| 1.7 | October 22, 2020 | Updated sample to latest versions |
3623
| 1.6 | March 16, 2020 | Updated sample to latest versions |
3724
| 1.5 | June 18, 2019 | Updated readme to refreshed screencast recording |

demo/graph-tutorial/.browserslistrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,4 @@ last 2 Edge major versions
1414
last 2 Safari major versions
1515
last 2 iOS major versions
1616
Firefox ESR
17-
not IE 9-10 # Angular support for IE 9-10 has been deprecated and will be removed as of Angular v11. To opt-in, remove the 'not' prefix on this line.
1817
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.

demo/graph-tutorial/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# GraphTutorial
22

3-
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.1.7.
3+
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.2.9.
44

55
## Development server
66

@@ -24,4 +24,4 @@ Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protrac
2424

2525
## Further help
2626

27-
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
27+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.

demo/graph-tutorial/angular.json

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
"projects": {
66
"graph-tutorial": {
77
"projectType": "application",
8-
"schematics": {},
8+
"schematics": {
9+
"@schematics/angular:application": {
10+
"strict": true
11+
}
12+
},
913
"root": "",
1014
"sourceRoot": "src",
1115
"prefix": "app",
@@ -39,21 +43,20 @@
3943
"optimization": true,
4044
"outputHashing": "all",
4145
"sourceMap": false,
42-
"extractCss": true,
4346
"namedChunks": false,
4447
"extractLicenses": true,
4548
"vendorChunk": false,
4649
"buildOptimizer": true,
4750
"budgets": [
4851
{
4952
"type": "initial",
50-
"maximumWarning": "2mb",
51-
"maximumError": "5mb"
53+
"maximumWarning": "500kb",
54+
"maximumError": "1mb"
5255
},
5356
{
5457
"type": "anyComponentStyle",
55-
"maximumWarning": "6kb",
56-
"maximumError": "10kb"
58+
"maximumWarning": "2kb",
59+
"maximumError": "4kb"
5760
}
5861
]
5962
}
@@ -119,6 +122,7 @@
119122
}
120123
}
121124
}
122-
}},
125+
}
126+
},
123127
"defaultProject": "graph-tutorial"
124128
}

demo/graph-tutorial/e2e/protractor.conf.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ exports.config = {
1616
browserName: 'chrome'
1717
},
1818
directConnect: true,
19+
SELENIUM_PROMISE_MANAGER: false,
1920
baseUrl: 'http://localhost:4200/',
2021
framework: 'jasmine',
2122
jasmineNodeOpts: {

demo/graph-tutorial/e2e/src/app.e2e-spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { AppPage } from './app.po';
21
import { browser, logging } from 'protractor';
2+
import { AppPage } from './app.po';
33

44
describe('workspace-project App', () => {
55
let page: AppPage;
@@ -8,9 +8,9 @@ describe('workspace-project App', () => {
88
page = new AppPage();
99
});
1010

11-
it('should display welcome message', () => {
12-
page.navigateTo();
13-
expect(page.getTitleText()).toEqual('graph-tutorial app is running!');
11+
it('should display welcome message', async () => {
12+
await page.navigateTo();
13+
expect(await page.getTitleText()).toEqual('graph-tutorial app is running!');
1414
});
1515

1616
afterEach(async () => {
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { browser, by, element } from 'protractor';
22

33
export class AppPage {
4-
navigateTo(): Promise<unknown> {
5-
return browser.get(browser.baseUrl) as Promise<unknown>;
4+
async navigateTo(): Promise<unknown> {
5+
return browser.get(browser.baseUrl);
66
}
77

8-
getTitleText(): Promise<string> {
9-
return element(by.css('app-root .content span')).getText() as Promise<string>;
8+
async getTitleText(): Promise<string> {
9+
return element(by.css('app-root .content span')).getText();
1010
}
1111
}

demo/graph-tutorial/e2e/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"target": "es2018",
88
"types": [
99
"jasmine",
10-
"jasminewd2",
1110
"node"
1211
]
1312
}

demo/graph-tutorial/karma.conf.js

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,28 @@ module.exports = function (config) {
99
require('karma-jasmine'),
1010
require('karma-chrome-launcher'),
1111
require('karma-jasmine-html-reporter'),
12-
require('karma-coverage-istanbul-reporter'),
12+
require('karma-coverage'),
1313
require('@angular-devkit/build-angular/plugins/karma')
1414
],
1515
client: {
16+
jasmine: {
17+
// you can add configuration options for Jasmine here
18+
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19+
// for example, you can disable the random execution with `random: false`
20+
// or set a specific seed with `seed: 4321`
21+
},
1622
clearContext: false // leave Jasmine Spec Runner output visible in browser
1723
},
18-
coverageIstanbulReporter: {
24+
jasmineHtmlReporter: {
25+
suppressAll: true // removes the duplicated traces
26+
},
27+
coverageReporter: {
1928
dir: require('path').join(__dirname, './coverage/graph-tutorial'),
20-
reports: ['html', 'lcovonly', 'text-summary'],
21-
fixWebpackSourcePaths: true
29+
subdir: '.',
30+
reporters: [
31+
{ type: 'html' },
32+
{ type: 'text-summary' }
33+
]
2234
},
2335
reporters: ['progress', 'kjhtml'],
2436
port: 9876,

0 commit comments

Comments
 (0)