Skip to content

Commit

Permalink
Merge from dev to master (#2285)
Browse files Browse the repository at this point in the history
* 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)
  • Loading branch information
hartra344 authored Feb 2, 2018
1 parent d9cf26a commit 9638c8c
Show file tree
Hide file tree
Showing 262 changed files with 13,146 additions and 1,978 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ language: node_js
node_js:
- "6.9"
before_script:
- npm install -g --silent @angular/cli@1.1.3
- npm install -g --silent @angular/cli@1.2.6
- npm install -g --silent yarn
script:
- cd server && yarn install && yarn run gulp build-all && tsc && cd ../AzureFunctions.AngularClient && yarn install && ng build -prod
6 changes: 5 additions & 1 deletion AzureFunctions.AngularClient/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
// Place your settings in this file to overwrite default and user settings.
{}
{
"[typescript]": {
"editor.formatOnSave": true
}
}
133 changes: 68 additions & 65 deletions AzureFunctions.AngularClient/package.json
Original file line number Diff line number Diff line change
@@ -1,67 +1,70 @@
{
"name": "azure-functions-client",
"version": "0.0.0",
"license": "MIT",
"angular-cli": {},
"scripts": {
"ng": "ng",
"watch": "ng b -w",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"bundle-report": "webpack-bundle-analyzer ../azurefunctions/ng-full/stats.json"
},
"private": true,
"dependencies": {
"@angular/common": "^4.0.0",
"@angular/compiler": "^4.0.0",
"@angular/core": "^4.0.0",
"@angular/forms": "^4.0.0",
"@angular/http": "^4.0.0",
"@angular/platform-browser": "^4.0.0",
"@angular/platform-browser-dynamic": "^4.0.0",
"@angular/router": "^4.0.0",
"@ngx-translate/core": "^6.0.1",
"angular2-uuid": "^1.1.1",
"azure-mobile-apps-client": "^2.0.1",
"bootstrap": "^3.3.7",
"core-js": "^2.4.1",
"font-awesome": "^4.7.0",
"jsonschema": "^1.1.1",
"marked": "^0.3.9",
"moment": "^2.17.0",
"monaco-editor": "^0.10.0",
"ng-sidebar": "^6.0.1",
"ng2-cookies": "^1.0.3",
"ng2-file-upload": "~1.2.1",
"ng2-popover": "^0.0.14",
"node-sass": "^4.7.2",
"rxjs": "^5.1.0",
"swagger-editor": "git+https://github.com/azure/swagger-editor.git#ff974a50cc7c756f0a96a66f1e92f1286324c549",
"ts-helpers": "^1.1.1",
"zone.js": "^0.8.4"
},
"devDependencies": {
"@angular/cli": "^1.1.3",
"@angular/compiler-cli": "^4.0.0",
"@types/jasmine": "2.5.38",
"@types/jsonschema": "^1.1.1",
"@types/node": "~6.0.60",
"codelyzer": "~2.0.0",
"jasmine-core": "~2.5.2",
"jasmine-spec-reporter": "~3.2.0",
"karma": "~1.4.1",
"karma-chrome-launcher": "~2.0.0",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^0.2.0",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.0",
"ts-node": "~2.0.0",
"tslint": "~4.5.0",
"typescript": "^2.4.1",
"webpack-bundle-analyzer": "^2.9.0"
}
"name": "azure-functions-client",
"version": "0.0.0",
"license": "MIT",
"angular-cli": {},
"scripts": {
"ng": "ng",
"watch": "ng b -w",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"bundle-report": "webpack-bundle-analyzer ../azurefunctions/ng-full/stats.json"
},
"private": true,
"dependencies": {
"@angular/common": "^4.0.0",
"@angular/compiler": "^4.0.0",
"@angular/core": "^4.0.0",
"@angular/forms": "^4.0.0",
"@angular/http": "^4.0.0",
"@angular/platform-browser": "^4.0.0",
"@angular/platform-browser-dynamic": "^4.0.0",
"@angular/router": "^4.0.0",
"@ngx-translate/core": "^6.0.1",
"angular2-uuid": "^1.1.1",
"azure-mobile-apps-client": "^2.0.1",
"bootstrap": "^3.3.7",
"core-js": "^2.4.1",
"font-awesome": "^4.7.0",
"jsonschema": "^1.1.1",
"marked": "^0.3.9",
"moment": "^2.17.0",
"monaco-editor": "^0.10.0",
"ng-sidebar": "^6.0.1",
"ng2-cookies": "^1.0.3",
"ng2-file-upload": "~1.2.1",
"ng2-popover": "^0.0.14",
"node-sass": "^4.7.2",
"rxjs": "^5.1.0",
"swagger-editor": "git+https://github.com/azure/swagger-editor.git#ff974a50cc7c756f0a96a66f1e92f1286324c549",
"ts-helpers": "^1.1.1",
"zone.js": "^0.8.4",
"ng-sidebar": "^6.0.1",
"lodash": "4.17.4"
},
"devDependencies": {
"@angular/cli": "^1.1.3",
"@angular/compiler-cli": "^4.0.0",
"@types/jasmine": "2.5.38",
"@types/jsonschema": "^1.1.1",
"@types/node": "~6.0.60",
"@types/lodash": "^4.14.80",
"codelyzer": "~2.0.0",
"jasmine-core": "~2.5.2",
"jasmine-spec-reporter": "~3.2.0",
"karma": "~1.4.1",
"karma-chrome-launcher": "~2.0.0",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^0.2.0",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.0",
"ts-node": "~2.0.0",
"tslint": "~4.5.0",
"typescript": "^2.4.1",
"webpack-bundle-analyzer": "^2.9.0"
}
}
1 change: 1 addition & 0 deletions AzureFunctions.AngularClient/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import 'rxjs/add/operator/distinctUntilChanged';
import 'rxjs/add/operator/do';
import 'rxjs/add/operator/filter';
import 'rxjs/add/operator/first';
import 'rxjs/add/observable/forkJoin';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/merge';
import 'rxjs/add/operator/mergeMap';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
:host {
height: auto;
width: 100%;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<ng-content></ng-content>
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
/**
* Created by marc on 20.05.17.
*/
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
import {WizardCompletionStepComponent} from './wizard-completion-step.component';
import {ViewChild, Component} from '@angular/core';
import {WizardComponent} from './wizard.component';
import {MovingDirection} from '../util/moving-direction.enum';
import {By} from '@angular/platform-browser';
import {WizardModule} from '../wizard.module';

@Component({
selector: 'test-wizard',
template: `
<wizard>
<wizard-step title='Steptitle 1' (stepEnter)="enterInto($event, 1)" (stepExit)="exitFrom($event, 1)">Step 1</wizard-step>
<wizard-step title='Steptitle 2' [canExit]="isValid"
optionalStep (stepEnter)="enterInto($event, 2)" (stepExit)="exitFrom($event, 2)">Step 2</wizard-step>
<wizard-completion-step title='Completion steptitle 3' (stepEnter)="enterInto($event, 3)">Step 3</wizard-completion-step>
</wizard>
`
})
class WizardTestComponent {
@ViewChild(WizardComponent)
public wizard: WizardComponent;

public isValid: any = true;

public eventLog: Array<string> = new Array<string>();

enterInto(direction: MovingDirection, destination: number): void {
this.eventLog.push(`enter ${MovingDirection[direction]} ${destination}`);
}

exitFrom(direction: MovingDirection, source: number): void {
this.eventLog.push(`exit ${MovingDirection[direction]} ${source}`);
}
}

describe('WizardCompletionStepComponent', () => {
let wizardTest: WizardTestComponent;
let wizardTestFixture: ComponentFixture<WizardTestComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [WizardTestComponent],
imports: [WizardModule]
}).compileComponents();
}));

beforeEach(() => {
wizardTestFixture = TestBed.createComponent(WizardTestComponent);
wizardTest = wizardTestFixture.componentInstance;
wizardTestFixture.detectChanges();
});

it('should create', () => {
expect(wizardTest).toBeTruthy();
expect(wizardTestFixture.debugElement.queryAll(By.css('wizard-step')).length).toBe(2);
expect(wizardTestFixture.debugElement.queryAll(By.css('wizard-completion-step')).length).toBe(1);
});

it('should have correct step title', () => {
expect(wizardTest).toBeTruthy();
expect(wizardTest.wizard.getStepAtIndex(0).title).toBe('Steptitle 1');
expect(wizardTest.wizard.getStepAtIndex(1).title).toBe('Steptitle 2');
expect(wizardTest.wizard.getStepAtIndex(2).title).toBe('Completion steptitle 3');
});

it('should enter first step after initialisation', () => {
expect(wizardTest.eventLog).toEqual(['enter Forwards 1']);
});

it('should enter completion step after first step', () => {
expect(wizardTest.wizard.currentStepIndex).toBe(0);

wizardTest.wizard.goToNextStep();
wizardTestFixture.detectChanges();

expect(wizardTest.wizard.currentStepIndex).toBe(1);
expect(wizardTest.eventLog).toEqual(['enter Forwards 1', 'exit Forwards 1', 'enter Forwards 2']);

wizardTest.wizard.goToNextStep();
wizardTestFixture.detectChanges();

expect(wizardTest.wizard.currentStepIndex).toBe(2);
expect(wizardTest.eventLog).toEqual(['enter Forwards 1', 'exit Forwards 1', 'enter Forwards 2',
'exit Forwards 2', 'enter Forwards 3']);
});

it('should enter completion step after jumping over second optional step', () => {
wizardTest.wizard.goToStep(2);
wizardTestFixture.detectChanges();

expect(wizardTest.eventLog).toEqual(['enter Forwards 1', 'exit Forwards 1', 'enter Forwards 3']);
});

it('should set the wizard as completed after entering the completion step', () => {
wizardTest.wizard.goToStep(2);
wizardTestFixture.detectChanges();

expect(wizardTest.wizard.completed).toBe(true);
});

it('should be unable to leave the completion step', () => {
wizardTest.wizard.goToStep(2);
wizardTestFixture.detectChanges();

expect(wizardTest.wizard.canGoToStep(0)).toBe(false);
expect(wizardTest.wizard.canGoToStep(1)).toBe(false);
});


it('should not be able to leave the completion step in any direction', () => {
wizardTest.isValid = false;

wizardTest.wizard.goToStep(2);
wizardTestFixture.detectChanges();

expect(wizardTest.wizard.currentStepIndex).toBe(2);
expect(wizardTest.wizard.currentStep.canExit).toBe(false);
});

it('should not leave the completion step if it can\'t be exited', () => {
wizardTest.isValid = false;

wizardTest.wizard.goToStep(2);
wizardTestFixture.detectChanges();

expect(wizardTest.wizard.currentStepIndex).toBe(2);

wizardTest.wizard.goToPreviousStep();
wizardTestFixture.detectChanges();

expect(wizardTest.wizard.currentStepIndex).toBe(2);
expect(wizardTest.eventLog)
.toEqual(['enter Forwards 1', 'exit Forwards 1', 'enter Forwards 3', 'enter Stay 3']);
});
});
Loading

0 comments on commit 9638c8c

Please sign in to comment.