Add Appveyor builds and webdriver.io tests (tests cover Angular2Spa template only at present)

This commit is contained in:
SteveSandersonMS
2016-12-15 16:38:30 +00:00
parent 6decb30681
commit 67c2cfd84e
9 changed files with 532 additions and 2 deletions

View File

@@ -0,0 +1,12 @@
// Workaround for missing '.value' property on WebdriverIO.Client<RawResult<T>> that should be of type T
// Can't notify TypeScript that the property exists directly, because the interface merging feature doesn't
// appear to support pattern matching in such a way that WebdriverIO.Client<T> is extended only when T
// itself extends RawResult<U> for some U.
export function getValue<T>(client: WebdriverIO.Client<WebdriverIO.RawResult<T>>): T {
return (client as any).value;
}
// The official type declarations for getCssProperty are completely wrong. This function matches runtime behaviour.
export function getCssPropertyValue<T>(client: WebdriverIO.Client<T>, selector: string, cssProperty: string): string {
return (client.getCssProperty(selector, cssProperty) as any).value;
}