Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,11 @@ If you just want the completed sample generated by following this lab, you can f

- [Completed project](demo)

## Watch the Module

This module has been recorded and is available in the Office Development YouTube channel: [Build Angular SPAs with Microsoft Graph](https://youtu.be/KUPRTTOUzz8)

## Contributors

| Roles | Author(s) |
| ----------------- | --------------------------------------------------------------------------------------------- |
| Code / Tutorial | Jason Johnston (Microsoft) [@jasonjoh](//github.com/jasonjoh) |
| Slides | Jeremy Thake (Microsoft) [@jthake-msft](//github.com/jthake-msft) |
| QA | Andrew Connell (Microsoft MVP, Voitanos) [@andrewconnell](//github.com/andrewconnell) |
| QA | Julie Turner (Microsoft MVP, Sympraxis Consulting) [@juliemturner](//github.com/juliemturner) |
| Sponsor / Support | Jason Johnston (Microsoft) [@jasonjoh](//github.com/jasonjoh) |

## Version history

| Version | Date | Comments |
| ------- | ---------------- | ------------------------------------------------ |
| 1.8 | April 19, 2021 | Updated sample to latest versions |
| 1.7 | October 22, 2020 | Updated sample to latest versions |
| 1.6 | March 16, 2020 | Updated sample to latest versions |
| 1.5 | June 18, 2019 | Updated readme to refreshed screencast recording |
Expand Down
1 change: 0 additions & 1 deletion demo/graph-tutorial/.browserslistrc
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@ last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
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.
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
4 changes: 2 additions & 2 deletions demo/graph-tutorial/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GraphTutorial

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

## Development server

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

## Further help

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).
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.
18 changes: 11 additions & 7 deletions demo/graph-tutorial/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
"projects": {
"graph-tutorial": {
"projectType": "application",
"schematics": {},
"schematics": {
"@schematics/angular:application": {
"strict": true
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
Expand Down Expand Up @@ -39,21 +43,20 @@
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
"maximumWarning": "500kb",
"maximumError": "1mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "10kb"
"maximumWarning": "2kb",
"maximumError": "4kb"
}
]
}
Expand Down Expand Up @@ -119,6 +122,7 @@
}
}
}
}},
}
},
"defaultProject": "graph-tutorial"
}
1 change: 1 addition & 0 deletions demo/graph-tutorial/e2e/protractor.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ exports.config = {
browserName: 'chrome'
},
directConnect: true,
SELENIUM_PROMISE_MANAGER: false,
baseUrl: 'http://localhost:4200/',
framework: 'jasmine',
jasmineNodeOpts: {
Expand Down
8 changes: 4 additions & 4 deletions demo/graph-tutorial/e2e/src/app.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AppPage } from './app.po';
import { browser, logging } from 'protractor';
import { AppPage } from './app.po';

describe('workspace-project App', () => {
let page: AppPage;
Expand All @@ -8,9 +8,9 @@ describe('workspace-project App', () => {
page = new AppPage();
});

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

afterEach(async () => {
Expand Down
8 changes: 4 additions & 4 deletions demo/graph-tutorial/e2e/src/app.po.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { browser, by, element } from 'protractor';

export class AppPage {
navigateTo(): Promise<unknown> {
return browser.get(browser.baseUrl) as Promise<unknown>;
async navigateTo(): Promise<unknown> {
return browser.get(browser.baseUrl);
}

getTitleText(): Promise<string> {
return element(by.css('app-root .content span')).getText() as Promise<string>;
async getTitleText(): Promise<string> {
return element(by.css('app-root .content span')).getText();
}
}
1 change: 0 additions & 1 deletion demo/graph-tutorial/e2e/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"target": "es2018",
"types": [
"jasmine",
"jasminewd2",
"node"
]
}
Expand Down
20 changes: 16 additions & 4 deletions demo/graph-tutorial/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,28 @@ module.exports = function (config) {
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('karma-coverage'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
jasmine: {
// you can add configuration options for Jasmine here
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
// for example, you can disable the random execution with `random: false`
// or set a specific seed with `seed: 4321`
},
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
jasmineHtmlReporter: {
suppressAll: true // removes the duplicated traces
},
coverageReporter: {
dir: require('path').join(__dirname, './coverage/graph-tutorial'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
subdir: '.',
reporters: [
{ type: 'html' },
{ type: 'text-summary' }
]
},
reporters: ['progress', 'kjhtml'],
port: 9876,
Expand Down
Loading