-
Notifications
You must be signed in to change notification settings - Fork 851
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c650ffb
commit 44a4eb8
Showing
5 changed files
with
57 additions
and
35 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { ElementArrayFinder, ElementFinder } from 'protractor'; | ||
import { browser, by, element } from 'protractor/globals'; | ||
|
||
export class DemoNgTablePage { | ||
dataRows: ElementArrayFinder; | ||
table: ElementFinder; | ||
constructor(private url: string) { | ||
this.table = element(by.css('table[ng-table]')); | ||
this.dataRows = element.all(by.repeater('user in $data')); | ||
} | ||
open() { | ||
browser.get(this.url); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,40 @@ | ||
import { browser, element, by } from 'protractor/globals'; | ||
import { DemoNgTablePage } from './demo-ng-table.po'; | ||
|
||
describe('ng-table - ts+webpack', () => { | ||
it('should render ng-table', () => { | ||
browser.get('http://localhost:8080'); | ||
describe('ng-table', () => { | ||
|
||
const table = element(by.css('table[ng-table]')); | ||
expect(table.isPresent()).toBe(true); | ||
const dataRows = element.all(by.repeater('user in $data')); | ||
expect(dataRows.count()).toBeGreaterThan(0); | ||
describe('es5', () => { | ||
const demoPageUrl = 'es5/index.html'; | ||
it('should render ng-table', () => { | ||
renderTableSpec(demoPageUrl); | ||
}); | ||
}); | ||
|
||
describe('es6-systemjs', () => { | ||
const demoPageUrl = 'es6-systemjs/index.html'; | ||
it('should render ng-table', () => { | ||
renderTableSpec(demoPageUrl); | ||
}); | ||
}); | ||
|
||
describe('es6-webpack', () => { | ||
const demoPageUrl = 'es6-webpack/build/index.html'; | ||
it('should render ng-table', () => { | ||
renderTableSpec(demoPageUrl); | ||
}); | ||
}); | ||
|
||
describe('ts-webpack', () => { | ||
const demoPageUrl = 'ts-webpack/build/index.html'; | ||
it('should render ng-table', () => { | ||
renderTableSpec(demoPageUrl); | ||
}); | ||
}); | ||
|
||
|
||
function renderTableSpec(url: string) { | ||
const demoPage = new DemoNgTablePage(url); | ||
demoPage.open(); | ||
expect(demoPage.table.isPresent()).toBe(true); | ||
expect(demoPage.dataRows.count()).toBeGreaterThan(0); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,6 @@ | |
"suppressImplicitAnyIndexErrors": true | ||
}, | ||
"include": [ | ||
"e2e/**/*", | ||
"src/**/*", | ||
"test/**/*", | ||
"./*" | ||
|