Skip to content

Commit 9638c8c

Browse files
authored
Merge from dev to master (#2285)
* Making sure selected option in DropDownComponent matches the selected option in the native select element (fixes #2060) * Add CRM headers (#2225) * Revert "Check referer before checking X-MS-CLIENT-PRINCIPAL-NAME (#2218)" This reverts commit 300746c. * add keyboard controls to download function app * CRM headers only on create and delete (#2226) * rp update * add headers only on create and delete calls * pr updates and add headers for get entities * update delete calls to include headers * Tentatively remove MSA login for Try Functions * update icon (#2236) fixes #2235 * Use ARM url specified from Ibiza for national clouds (#2239) * Revert "Revert "Check referer before checking X-MS-CLIENT-PRINCIPAL-NAME (#2218)"" This reverts commit 481a96b. * Use ARM url specified from Ibiza for national clouds * Fixing CR comments * Experimental Language Toggle (#2238) * Experimental Language Toggle * pr updates * Add TIP1 to accepted origins (#2242) * Handling namespace for embedded scenario (#2237) * Fixes #1592 - [Accessibility] Screen reader does not read tree node options when in focus (#2221) * Minor embedded updates (#2245) * update templates and filter out errors * remove retrieve option * Fixing runtime upgrade warning string * Updating Ibiza redirect URL's (#2247) * Minor fixes to disable some features that don't work in national clouds (#2249) * Fix all functions caching (#2250) * Fix all functions caching on create * update function create calls * nit update * Change SiteManage component to open the new App Service Plan blade * Change Destroy to Delete (#2252) * Fixing build * Add durable resources (#2251) * CICD Rework ( Deployment Center) (#2205) * CICD Rework * Fixing a build break and updating the portal-resources.ts file * Fixing Resources from a bad merge * Adding flag in tsc to not check lib typings * correcting import casing for linux build server * Fixing issues in build with unused variables * Polish adjustments dashboard tables and auto refreshing of data * adding state to bitbucket and github oauth * cleaned up deployment detail log and fixed some translate pipes * removing unused variables to make compiler happy * removing bad debug logging from server code * Made first pass at a basic summary page * adding some support for summary of Local Git Choice * first pass at PR Comments, any that are currently marked resolved should be fixed here * Adjustments based on PR comments * Fixing build break * Update travis.yml angular cli * Removing nodejs server auth and making pug use minified * adding production check for optimized js files * adding AI support on the server * fixing azure head pug * Fixing some bugs around loading * Fixing PR changes * Hiding Deployment Center behind a feature flag * Fixing build breaks from last commit * adjustments based on PR comments * Last of PR comments * Fixing file name casing issues for linux builds * securing session cookie * fixing file names to match our format * Addressing PR Comment * Stop showing invalid connection string types, except when already configured (fixes #2248) * Adding build badges * Fixing windows local server running (#2268) * Fixes #2267 and Fixes #2227 Adding mime type for static json files for iisnode (#2269) * Let NodeJS handle static file loading * Trying different fix * Embedded updates (#2271) * Add preview and update editor name for embedded * Add ibiza support for deployment center (#2272) * Let NodeJS handle static file loading * Trying different fix * Adding support for loading deployment center inside of ibiza * fixing build * build fixes * Updated settings file to format TS files on save * Fixing deployment center to load itself rather than app settings * Adding site service and generalizing conditional-http-client (#2266) * Adding site service and generalizing conditional-http-client * Removing arm-preconditions * Moving precondition.ts back to where it was originally * Removing deployment center auth state check from returning auth tokens * Adding telemetry for AppSettings and creating base FeatureComponent (#2280) * Adding telemetry for AppSettings and creating base FeatureComponent * Updating with code review comments * Added parent component concept to make sure we log feature timings only when a parent exists to represent the entire feature * Whitelist update and accessibility updates (#2273) * whitelist update and accessibility updates * remove comment * pr updates * Making sure the form control and displayed value are in sync for the AutoSwapSlotName dropdown (fixes #2275)
1 parent d9cf26a commit 9638c8c

File tree

262 files changed

+13146
-1978
lines changed

Some content is hidden

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

262 files changed

+13146
-1978
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ language: node_js
22
node_js:
33
- "6.9"
44
before_script:
5-
- npm install -g --silent @angular/cli@1.1.3
5+
- npm install -g --silent @angular/cli@1.2.6
66
- npm install -g --silent yarn
77
script:
88
- cd server && yarn install && yarn run gulp build-all && tsc && cd ../AzureFunctions.AngularClient && yarn install && ng build -prod
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
// Place your settings in this file to overwrite default and user settings.
2-
{}
2+
{
3+
"[typescript]": {
4+
"editor.formatOnSave": true
5+
}
6+
}
+68-65
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,70 @@
11
{
2-
"name": "azure-functions-client",
3-
"version": "0.0.0",
4-
"license": "MIT",
5-
"angular-cli": {},
6-
"scripts": {
7-
"ng": "ng",
8-
"watch": "ng b -w",
9-
"start": "ng serve",
10-
"build": "ng build",
11-
"test": "ng test",
12-
"lint": "ng lint",
13-
"e2e": "ng e2e",
14-
"bundle-report": "webpack-bundle-analyzer ../azurefunctions/ng-full/stats.json"
15-
},
16-
"private": true,
17-
"dependencies": {
18-
"@angular/common": "^4.0.0",
19-
"@angular/compiler": "^4.0.0",
20-
"@angular/core": "^4.0.0",
21-
"@angular/forms": "^4.0.0",
22-
"@angular/http": "^4.0.0",
23-
"@angular/platform-browser": "^4.0.0",
24-
"@angular/platform-browser-dynamic": "^4.0.0",
25-
"@angular/router": "^4.0.0",
26-
"@ngx-translate/core": "^6.0.1",
27-
"angular2-uuid": "^1.1.1",
28-
"azure-mobile-apps-client": "^2.0.1",
29-
"bootstrap": "^3.3.7",
30-
"core-js": "^2.4.1",
31-
"font-awesome": "^4.7.0",
32-
"jsonschema": "^1.1.1",
33-
"marked": "^0.3.9",
34-
"moment": "^2.17.0",
35-
"monaco-editor": "^0.10.0",
36-
"ng-sidebar": "^6.0.1",
37-
"ng2-cookies": "^1.0.3",
38-
"ng2-file-upload": "~1.2.1",
39-
"ng2-popover": "^0.0.14",
40-
"node-sass": "^4.7.2",
41-
"rxjs": "^5.1.0",
42-
"swagger-editor": "git+https://github.com/azure/swagger-editor.git#ff974a50cc7c756f0a96a66f1e92f1286324c549",
43-
"ts-helpers": "^1.1.1",
44-
"zone.js": "^0.8.4"
45-
},
46-
"devDependencies": {
47-
"@angular/cli": "^1.1.3",
48-
"@angular/compiler-cli": "^4.0.0",
49-
"@types/jasmine": "2.5.38",
50-
"@types/jsonschema": "^1.1.1",
51-
"@types/node": "~6.0.60",
52-
"codelyzer": "~2.0.0",
53-
"jasmine-core": "~2.5.2",
54-
"jasmine-spec-reporter": "~3.2.0",
55-
"karma": "~1.4.1",
56-
"karma-chrome-launcher": "~2.0.0",
57-
"karma-cli": "~1.0.1",
58-
"karma-coverage-istanbul-reporter": "^0.2.0",
59-
"karma-jasmine": "~1.1.0",
60-
"karma-jasmine-html-reporter": "^0.2.2",
61-
"protractor": "~5.1.0",
62-
"ts-node": "~2.0.0",
63-
"tslint": "~4.5.0",
64-
"typescript": "^2.4.1",
65-
"webpack-bundle-analyzer": "^2.9.0"
66-
}
2+
"name": "azure-functions-client",
3+
"version": "0.0.0",
4+
"license": "MIT",
5+
"angular-cli": {},
6+
"scripts": {
7+
"ng": "ng",
8+
"watch": "ng b -w",
9+
"start": "ng serve",
10+
"build": "ng build",
11+
"test": "ng test",
12+
"lint": "ng lint",
13+
"e2e": "ng e2e",
14+
"bundle-report": "webpack-bundle-analyzer ../azurefunctions/ng-full/stats.json"
15+
},
16+
"private": true,
17+
"dependencies": {
18+
"@angular/common": "^4.0.0",
19+
"@angular/compiler": "^4.0.0",
20+
"@angular/core": "^4.0.0",
21+
"@angular/forms": "^4.0.0",
22+
"@angular/http": "^4.0.0",
23+
"@angular/platform-browser": "^4.0.0",
24+
"@angular/platform-browser-dynamic": "^4.0.0",
25+
"@angular/router": "^4.0.0",
26+
"@ngx-translate/core": "^6.0.1",
27+
"angular2-uuid": "^1.1.1",
28+
"azure-mobile-apps-client": "^2.0.1",
29+
"bootstrap": "^3.3.7",
30+
"core-js": "^2.4.1",
31+
"font-awesome": "^4.7.0",
32+
"jsonschema": "^1.1.1",
33+
"marked": "^0.3.9",
34+
"moment": "^2.17.0",
35+
"monaco-editor": "^0.10.0",
36+
"ng-sidebar": "^6.0.1",
37+
"ng2-cookies": "^1.0.3",
38+
"ng2-file-upload": "~1.2.1",
39+
"ng2-popover": "^0.0.14",
40+
"node-sass": "^4.7.2",
41+
"rxjs": "^5.1.0",
42+
"swagger-editor": "git+https://github.com/azure/swagger-editor.git#ff974a50cc7c756f0a96a66f1e92f1286324c549",
43+
"ts-helpers": "^1.1.1",
44+
"zone.js": "^0.8.4",
45+
"ng-sidebar": "^6.0.1",
46+
"lodash": "4.17.4"
47+
},
48+
"devDependencies": {
49+
"@angular/cli": "^1.1.3",
50+
"@angular/compiler-cli": "^4.0.0",
51+
"@types/jasmine": "2.5.38",
52+
"@types/jsonschema": "^1.1.1",
53+
"@types/node": "~6.0.60",
54+
"@types/lodash": "^4.14.80",
55+
"codelyzer": "~2.0.0",
56+
"jasmine-core": "~2.5.2",
57+
"jasmine-spec-reporter": "~3.2.0",
58+
"karma": "~1.4.1",
59+
"karma-chrome-launcher": "~2.0.0",
60+
"karma-cli": "~1.0.1",
61+
"karma-coverage-istanbul-reporter": "^0.2.0",
62+
"karma-jasmine": "~1.1.0",
63+
"karma-jasmine-html-reporter": "^0.2.2",
64+
"protractor": "~5.1.0",
65+
"ts-node": "~2.0.0",
66+
"tslint": "~4.5.0",
67+
"typescript": "^2.4.1",
68+
"webpack-bundle-analyzer": "^2.9.0"
69+
}
6770
}

AzureFunctions.AngularClient/src/app/app.module.ts

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import 'rxjs/add/operator/distinctUntilChanged';
1717
import 'rxjs/add/operator/do';
1818
import 'rxjs/add/operator/filter';
1919
import 'rxjs/add/operator/first';
20+
import 'rxjs/add/observable/forkJoin';
2021
import 'rxjs/add/operator/map';
2122
import 'rxjs/add/operator/merge';
2223
import 'rxjs/add/operator/mergeMap';
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
:host {
2+
height: auto;
3+
width: 100%;
4+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<ng-content></ng-content>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
/**
2+
* Created by marc on 20.05.17.
3+
*/
4+
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
5+
import {WizardCompletionStepComponent} from './wizard-completion-step.component';
6+
import {ViewChild, Component} from '@angular/core';
7+
import {WizardComponent} from './wizard.component';
8+
import {MovingDirection} from '../util/moving-direction.enum';
9+
import {By} from '@angular/platform-browser';
10+
import {WizardModule} from '../wizard.module';
11+
12+
@Component({
13+
selector: 'test-wizard',
14+
template: `
15+
<wizard>
16+
<wizard-step title='Steptitle 1' (stepEnter)="enterInto($event, 1)" (stepExit)="exitFrom($event, 1)">Step 1</wizard-step>
17+
<wizard-step title='Steptitle 2' [canExit]="isValid"
18+
optionalStep (stepEnter)="enterInto($event, 2)" (stepExit)="exitFrom($event, 2)">Step 2</wizard-step>
19+
<wizard-completion-step title='Completion steptitle 3' (stepEnter)="enterInto($event, 3)">Step 3</wizard-completion-step>
20+
</wizard>
21+
`
22+
})
23+
class WizardTestComponent {
24+
@ViewChild(WizardComponent)
25+
public wizard: WizardComponent;
26+
27+
public isValid: any = true;
28+
29+
public eventLog: Array<string> = new Array<string>();
30+
31+
enterInto(direction: MovingDirection, destination: number): void {
32+
this.eventLog.push(`enter ${MovingDirection[direction]} ${destination}`);
33+
}
34+
35+
exitFrom(direction: MovingDirection, source: number): void {
36+
this.eventLog.push(`exit ${MovingDirection[direction]} ${source}`);
37+
}
38+
}
39+
40+
describe('WizardCompletionStepComponent', () => {
41+
let wizardTest: WizardTestComponent;
42+
let wizardTestFixture: ComponentFixture<WizardTestComponent>;
43+
44+
beforeEach(async(() => {
45+
TestBed.configureTestingModule({
46+
declarations: [WizardTestComponent],
47+
imports: [WizardModule]
48+
}).compileComponents();
49+
}));
50+
51+
beforeEach(() => {
52+
wizardTestFixture = TestBed.createComponent(WizardTestComponent);
53+
wizardTest = wizardTestFixture.componentInstance;
54+
wizardTestFixture.detectChanges();
55+
});
56+
57+
it('should create', () => {
58+
expect(wizardTest).toBeTruthy();
59+
expect(wizardTestFixture.debugElement.queryAll(By.css('wizard-step')).length).toBe(2);
60+
expect(wizardTestFixture.debugElement.queryAll(By.css('wizard-completion-step')).length).toBe(1);
61+
});
62+
63+
it('should have correct step title', () => {
64+
expect(wizardTest).toBeTruthy();
65+
expect(wizardTest.wizard.getStepAtIndex(0).title).toBe('Steptitle 1');
66+
expect(wizardTest.wizard.getStepAtIndex(1).title).toBe('Steptitle 2');
67+
expect(wizardTest.wizard.getStepAtIndex(2).title).toBe('Completion steptitle 3');
68+
});
69+
70+
it('should enter first step after initialisation', () => {
71+
expect(wizardTest.eventLog).toEqual(['enter Forwards 1']);
72+
});
73+
74+
it('should enter completion step after first step', () => {
75+
expect(wizardTest.wizard.currentStepIndex).toBe(0);
76+
77+
wizardTest.wizard.goToNextStep();
78+
wizardTestFixture.detectChanges();
79+
80+
expect(wizardTest.wizard.currentStepIndex).toBe(1);
81+
expect(wizardTest.eventLog).toEqual(['enter Forwards 1', 'exit Forwards 1', 'enter Forwards 2']);
82+
83+
wizardTest.wizard.goToNextStep();
84+
wizardTestFixture.detectChanges();
85+
86+
expect(wizardTest.wizard.currentStepIndex).toBe(2);
87+
expect(wizardTest.eventLog).toEqual(['enter Forwards 1', 'exit Forwards 1', 'enter Forwards 2',
88+
'exit Forwards 2', 'enter Forwards 3']);
89+
});
90+
91+
it('should enter completion step after jumping over second optional step', () => {
92+
wizardTest.wizard.goToStep(2);
93+
wizardTestFixture.detectChanges();
94+
95+
expect(wizardTest.eventLog).toEqual(['enter Forwards 1', 'exit Forwards 1', 'enter Forwards 3']);
96+
});
97+
98+
it('should set the wizard as completed after entering the completion step', () => {
99+
wizardTest.wizard.goToStep(2);
100+
wizardTestFixture.detectChanges();
101+
102+
expect(wizardTest.wizard.completed).toBe(true);
103+
});
104+
105+
it('should be unable to leave the completion step', () => {
106+
wizardTest.wizard.goToStep(2);
107+
wizardTestFixture.detectChanges();
108+
109+
expect(wizardTest.wizard.canGoToStep(0)).toBe(false);
110+
expect(wizardTest.wizard.canGoToStep(1)).toBe(false);
111+
});
112+
113+
114+
it('should not be able to leave the completion step in any direction', () => {
115+
wizardTest.isValid = false;
116+
117+
wizardTest.wizard.goToStep(2);
118+
wizardTestFixture.detectChanges();
119+
120+
expect(wizardTest.wizard.currentStepIndex).toBe(2);
121+
expect(wizardTest.wizard.currentStep.canExit).toBe(false);
122+
});
123+
124+
it('should not leave the completion step if it can\'t be exited', () => {
125+
wizardTest.isValid = false;
126+
127+
wizardTest.wizard.goToStep(2);
128+
wizardTestFixture.detectChanges();
129+
130+
expect(wizardTest.wizard.currentStepIndex).toBe(2);
131+
132+
wizardTest.wizard.goToPreviousStep();
133+
wizardTestFixture.detectChanges();
134+
135+
expect(wizardTest.wizard.currentStepIndex).toBe(2);
136+
expect(wizardTest.eventLog)
137+
.toEqual(['enter Forwards 1', 'exit Forwards 1', 'enter Forwards 3', 'enter Stay 3']);
138+
});
139+
});

0 commit comments

Comments
 (0)