mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
chore: update ng cli, make e2e run sucessfully
This commit is contained in:
@@ -4,12 +4,12 @@ describe('button', function () {
|
||||
browser.get('/button');
|
||||
});
|
||||
it('should prevent click handlers from executing when disabled', function () {
|
||||
element(by.id('testButton')).click();
|
||||
expect(element(by.id('clickCounter')).getText()).toEqual('1');
|
||||
element(by.id('test-button')).click();
|
||||
expect(element(by.id('click-counter')).getText()).toEqual('1');
|
||||
|
||||
element(by.id('disableToggle')).click();
|
||||
element(by.id('testButton')).click();
|
||||
expect(element(by.id('clickCounter')).getText()).toEqual('1');
|
||||
element(by.id('disable-toggle')).click();
|
||||
element(by.id('test-button')).click();
|
||||
expect(element(by.id('click-counter')).getText()).toEqual('1');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"add-stream": "^1.0.0",
|
||||
"angular-cli": "^1.0.0-beta.5",
|
||||
"angular-cli": "^1.0.0-beta.6",
|
||||
"broccoli-autoprefixer": "^4.1.0",
|
||||
"broccoli-funnel": "^1.0.1",
|
||||
"broccoli-merge-trees": "^1.1.1",
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<a href="http://www.google.com" md-button color="primary">link</a>
|
||||
<a href="http://www.google.com" md-raised-button>link</a>
|
||||
<a href="http://www.google.com" md-button color="primary">SEARCH</a>
|
||||
<a href="http://www.google.com" md-raised-button>SEARCH</a>
|
||||
<a href="http://www.google.com" md-fab>
|
||||
<md-icon class="md-24">check</md-icon>
|
||||
</a>
|
||||
@@ -61,13 +61,15 @@
|
||||
|
||||
<section>
|
||||
<div>
|
||||
<p>isDisabled: {{isDisabled}}, clickCounter: <span id="clickCounter">{{clickCounter}}</span></p>
|
||||
<button md-raised-button (click)="isDisabled=!isDisabled" id="disableToggle">Disable buttons</button>
|
||||
<button md-raised-button (click)="button1.focus()" id="disableToggle">Focus 1</button>
|
||||
<button md-raised-button (click)="button2.focus()" id="disableToggle">Focus 2</button>
|
||||
<button md-raised-button (click)="button3.focus()" id="disableToggle">Focus 3</button>
|
||||
<p>isDisabled: {{isDisabled}}, clickCounter: <span>{{clickCounter}}</span></p>
|
||||
<button md-raised-button (click)="isDisabled=!isDisabled">
|
||||
Disable buttons
|
||||
</button>
|
||||
<button md-raised-button (click)="button1.focus()">Focus 1</button>
|
||||
<button md-raised-button (click)="button2.focus()">Focus 2</button>
|
||||
<button md-raised-button (click)="button3.focus()">Focus 3</button>
|
||||
</div>
|
||||
<button md-button #button1 [disabled]="isDisabled" (click)="clickCounter=clickCounter+1" id="testButton">off</button>
|
||||
<button md-button #button1 [disabled]="isDisabled" (click)="clickCounter=clickCounter+1">off</button>
|
||||
<button md-button color="primary" [disabled]="isDisabled">off</button>
|
||||
<a href="http://www.google.com" #button2 md-button color="accent" [disabled]="isDisabled">off</a>
|
||||
<button md-raised-button #button3 color="primary" [disabled]="isDisabled">off</button>
|
||||
@@ -80,15 +82,11 @@
|
||||
</button>
|
||||
</section>
|
||||
<section>
|
||||
Link
|
||||
<a href="http://www.google.com" md-button color="primary">link</a>
|
||||
Button
|
||||
<button md-button>flat</button>
|
||||
<a href="http://www.google.com" md-button color="primary">SEARCH</a>
|
||||
<button md-button>DANCE</button>
|
||||
</section>
|
||||
<section>
|
||||
Link
|
||||
<a href="http://www.google.com" md-raised-button color="primary">link</a>
|
||||
Button
|
||||
<button md-raised-button>button</button>
|
||||
<a href="http://www.google.com" md-raised-button color="primary">SEARCH</a>
|
||||
<button md-raised-button>DANCE</button>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!doctype html>
|
||||
{{!-- This file is an handlebar file that gets filled at build time. --}}
|
||||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
@@ -1,12 +1,31 @@
|
||||
<section>
|
||||
|
||||
<div>
|
||||
<p>isDisabled: {{isDisabled}}, clickCounter: <span id="clickCounter">{{clickCounter}}</span></p>
|
||||
<button md-raised-button (click)="isDisabled=!isDisabled" id="disableToggle">Disable buttons</button>
|
||||
<p>
|
||||
isDisabled: {{isDisabled}}, clickCounter:
|
||||
<span id="click-counter">{{clickCounter}}</span>
|
||||
</p>
|
||||
<button md-raised-button (click)="isDisabled=!isDisabled" id="disable-toggle">
|
||||
Disable buttons
|
||||
</button>
|
||||
</div>
|
||||
<button md-button [disabled]="isDisabled" (click)="clickCounter=clickCounter+1" id="testButton">off</button>
|
||||
<button md-button color="primary" [disabled]="isDisabled">off</button>
|
||||
<a href="http://www.google.com" md-button color="accent" [disabled]="isDisabled">off</a>
|
||||
<button md-raised-button color="primary" [disabled]="isDisabled">off</button>
|
||||
|
||||
<button md-button [disabled]="isDisabled" (click)="clickCounter=clickCounter+1" id="test-button">
|
||||
off
|
||||
</button>
|
||||
|
||||
<button md-button color="primary" [disabled]="isDisabled">
|
||||
off
|
||||
</button>
|
||||
|
||||
<a href="http://www.google.com" md-button color="accent" [disabled]="isDisabled">
|
||||
off
|
||||
</a>
|
||||
|
||||
<button md-raised-button color="primary" [disabled]="isDisabled">
|
||||
off
|
||||
</button>
|
||||
|
||||
<button md-mini-fab [disabled]="isDisabled">
|
||||
<md-icon class="md-24">check</md-icon>
|
||||
</button>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!doctype html>
|
||||
{{!-- This file is an handlebar file that gets filled at build time. --}}
|
||||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
@@ -9,19 +9,16 @@ require('ts-node').register({
|
||||
|
||||
const E2E_BASE_URL = process.env['E2E_BASE_URL'] || 'http://localhost:4200';
|
||||
const config = {
|
||||
// TODO(jelbourn): add back plugin for a11y assersions once it supports specifying AXS options.
|
||||
useAllAngular2AppRoots: true,
|
||||
plugins: [{
|
||||
chromeA11YDevTools: {
|
||||
treatWarningsAsFailures: true
|
||||
},
|
||||
package: 'protractor-accessibility-plugin'
|
||||
}],
|
||||
specs: [ path.join(__dirname, '../e2e/**/*.e2e.ts') ],
|
||||
baseUrl: E2E_BASE_URL
|
||||
baseUrl: E2E_BASE_URL,
|
||||
allScriptsTimeout: 22000,
|
||||
getPageTimeout: 20000,
|
||||
};
|
||||
|
||||
|
||||
if (process.env['TRAVIS'] !== undefined) {
|
||||
if (process.env['TRAVIS']) {
|
||||
const key = require('../scripts/sauce/sauce_config');
|
||||
config.sauceUser = process.env['SAUCE_USERNAME'];
|
||||
config.sauceKey = key;
|
||||
|
||||
Reference in New Issue
Block a user