Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge from dev to master #2285

Merged
merged 39 commits into from
Feb 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
e52deeb
Making sure selected option in DropDownComponent matches the selected…
andimarc Jan 16, 2018
81a106c
Add CRM headers (#2225)
Jan 19, 2018
481a96b
Revert "Check referer before checking X-MS-CLIENT-PRINCIPAL-NAME (#22…
ehamai Jan 19, 2018
38d282a
add keyboard controls to download function app
patricklee2 Jan 18, 2018
8fab5a3
CRM headers only on create and delete (#2226)
Jan 22, 2018
5dd1ee1
Tentatively remove MSA login for Try Functions
fashaikh Jan 22, 2018
ec9c7e6
Merge master -> dev
ehamai Jan 22, 2018
214f563
update icon (#2236)
Jan 22, 2018
ce73b61
Use ARM url specified from Ibiza for national clouds (#2239)
ehamai Jan 23, 2018
34bd66c
Experimental Language Toggle (#2238)
Jan 23, 2018
fa9a9ef
Add TIP1 to accepted origins (#2242)
Jan 23, 2018
b3a1ef4
Handling namespace for embedded scenario (#2237)
ehamai Jan 23, 2018
59cafd5
Fixes #1592 - [Accessibility] Screen reader does not read tree node o…
ehamai Jan 23, 2018
41d9478
Minor embedded updates (#2245)
Jan 23, 2018
7351b77
Fixing runtime upgrade warning string
ehamai Jan 24, 2018
daa8bdd
Updating Ibiza redirect URL's (#2247)
ehamai Jan 24, 2018
8980e48
Minor fixes to disable some features that don't work in national clou…
ehamai Jan 24, 2018
5ac2a92
Fix all functions caching (#2250)
Jan 25, 2018
2a4e514
Change SiteManage component to open the new App Service Plan blade
ehamai Jan 25, 2018
19c8812
Change Destroy to Delete (#2252)
Jan 25, 2018
e91941f
Fixing build
ehamai Jan 25, 2018
5ddd57b
Add durable resources (#2251)
Jan 26, 2018
99aefcc
CICD Rework ( Deployment Center) (#2205)
hartra344 Jan 29, 2018
c0b2f38
Stop showing invalid connection string types, except when already con…
andimarc Jan 27, 2018
07178ae
Merge branch 'master' into dev
andimarc Jan 29, 2018
451b41d
Adding build badges
hartra344 Jan 29, 2018
818f530
Fixing windows local server running (#2268)
Jan 30, 2018
015b266
Fixes #2267 and Fixes #2227 Adding mime type for static json files fo…
hartra344 Jan 30, 2018
d21d198
Embedded updates (#2271)
Jan 30, 2018
7a194d6
Add ibiza support for deployment center (#2272)
hartra344 Jan 30, 2018
96825b7
Updated settings file to format TS files on save
ehamai Jan 30, 2018
557aa62
Fixing deployment center to load itself rather than app settings
hartra344 Jan 30, 2018
be27e4f
Merge branch 'dev' of github.com:Azure/azure-functions-ux into dev
hartra344 Jan 30, 2018
6cafb29
Adding site service and generalizing conditional-http-client (#2266)
ehamai Jan 30, 2018
4a327e6
Removing deployment center auth state check from returning auth tokens
hartra344 Jan 30, 2018
56c4ba2
Merge branch 'dev' of github.com:Azure/azure-functions-ux into dev
hartra344 Jan 30, 2018
020ef0d
Adding telemetry for AppSettings and creating base FeatureComponent (…
ehamai Feb 2, 2018
9024e69
Whitelist update and accessibility updates (#2273)
Feb 2, 2018
29d2c27
Making sure the form control and displayed value are in sync for the …
andimarc Feb 2, 2018
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
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