mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
remove webdriverio. Bundles their own types since 5.0.0
This commit is contained in:
@@ -1728,6 +1728,12 @@
|
||||
"sourceRepoURL": "https://github.com/tgdwyer/WebCola",
|
||||
"asOfVersion": "3.2.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "WebdriverIO",
|
||||
"typingsPackageName": "webdriverio",
|
||||
"sourceRepoURL": "git@github.com:webdriverio/webdriverio.git",
|
||||
"asOfVersion": "5.0.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "webgme",
|
||||
"typingsPackageName": "webgme",
|
||||
|
||||
Vendored
-1934
File diff suppressed because it is too large
Load Diff
@@ -1,25 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": false,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"target": "es2015"
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"webdriverio-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
// TODOs
|
||||
"await-promise": false,
|
||||
"no-declare-current-package": false,
|
||||
"no-single-declare-module": false,
|
||||
"unified-signatures": false,
|
||||
"no-unnecessary-class": false,
|
||||
"no-unnecessary-generics": false
|
||||
}
|
||||
}
|
||||
@@ -1,155 +0,0 @@
|
||||
import * as webdriverio from "webdriverio";
|
||||
import { assert } from "chai";
|
||||
|
||||
// Stub mocha functions
|
||||
const { describe, it, before, after, beforeEach, afterEach } = null as any as {
|
||||
[s: string]: ((s: string, cb: (done: any) => void) => void) & ((cb: (done: any) => void) => void) & { only: any, skip: any };
|
||||
};
|
||||
|
||||
describe("my webdriverio tests", () => {
|
||||
let client: webdriverio.Client<void>;
|
||||
|
||||
before(async () => {
|
||||
client = webdriverio.remote({ deprecationWarnings: true, desiredCapabilities: { browserName: "phantomjs" } });
|
||||
await client.init();
|
||||
});
|
||||
|
||||
it("should have the right title - the good old callback way", () => {
|
||||
assert.equal(
|
||||
browser
|
||||
.url("/")
|
||||
.getTitle(),
|
||||
"WebdriverIO - Selenium 2.0 javascript bindings for nodejs"
|
||||
);
|
||||
});
|
||||
|
||||
it("should have the right title - the promise way", () => {
|
||||
return browser
|
||||
.url("/")
|
||||
.getTitle().then((title) => {
|
||||
assert.equal(title, "WebdriverIO - Selenium 2.0 javascript bindings for nodejs");
|
||||
});
|
||||
});
|
||||
|
||||
it("Github test", async () => {
|
||||
await client.url("https://github.com/");
|
||||
await client.waitForVisible('.header-logo-invertocat');
|
||||
|
||||
const elementSize = await client.getElementSize(".header-logo-invertocat");
|
||||
|
||||
assert.isNumber(elementSize.height);
|
||||
assert.isNumber(elementSize.width);
|
||||
assert.strictEqual(elementSize.height, 32);
|
||||
assert.strictEqual(elementSize.width, 32);
|
||||
|
||||
const title = await client.getTitle();
|
||||
assert.isString(title);
|
||||
assert.strictEqual(title, "The world's leading software development platform · GitHub");
|
||||
|
||||
const cssProperty = await client.getCssProperty("a[href='/pricing']", "color");
|
||||
assert.strictEqual(cssProperty.value, "rgba(255,255,255,1)");
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await client.end();
|
||||
});
|
||||
});
|
||||
|
||||
describe("multiremote test", () => {
|
||||
let matrix: webdriverio.Client<void>;
|
||||
|
||||
before(async () => {
|
||||
matrix = webdriverio.multiremote({
|
||||
browserA: {
|
||||
desiredCapabilities: {
|
||||
browserName: "chrome",
|
||||
chromeOptions: {
|
||||
args: [
|
||||
"use-fake-device-for-media-stream",
|
||||
"use-fake-ui-for-media-stream",
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
browserB: {
|
||||
desiredCapabilities: {
|
||||
browserName: "chrome",
|
||||
chromeOptions: {
|
||||
args: [
|
||||
"use-fake-device-for-media-stream",
|
||||
"use-fake-ui-for-media-stream",
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it("clicks a button in a random channel at apprtc", () => {
|
||||
const channel = Math.round(Math.random() * 100000000000);
|
||||
|
||||
matrix
|
||||
.init()
|
||||
.url("https://apprtc.appspot.com/r/" + channel)
|
||||
.click("#confirm-join-button")
|
||||
.pause(5000)
|
||||
.end();
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await matrix.end();
|
||||
});
|
||||
});
|
||||
|
||||
describe("testing feaures with chrome", () => {
|
||||
const options = {
|
||||
desiredCapabilities: {
|
||||
browserName: "chrome",
|
||||
},
|
||||
};
|
||||
|
||||
it("can use selectorExecute", () => {
|
||||
webdriverio
|
||||
.remote(options)
|
||||
.init()
|
||||
.url("https://news.ycombinator.com/")
|
||||
.selectorExecute("//div", (inputs: HTMLElement[], message: string) => {
|
||||
return `${inputs.length} ${message}`;
|
||||
}, "divs on the page")
|
||||
.then((res: string) => {
|
||||
console.log(res);
|
||||
})
|
||||
.end();
|
||||
});
|
||||
|
||||
it("can waitForVisible", () => {
|
||||
webdriverio
|
||||
.remote(options)
|
||||
.init()
|
||||
.url("http://www.google.com/")
|
||||
.waitForVisible("//input[@type='submit']", 5000)
|
||||
.then((visible) => {
|
||||
console.log(visible); // Should return true
|
||||
})
|
||||
.end();
|
||||
});
|
||||
});
|
||||
|
||||
let hooks: webdriverio.Hooks = {};
|
||||
|
||||
hooks = {
|
||||
// Hooks can be a noop function
|
||||
onPrepare: () => undefined,
|
||||
onError() {
|
||||
// Hooks don't have to return a value
|
||||
}
|
||||
};
|
||||
|
||||
hooks.onComplete = async () => {
|
||||
// Hooks can return a promise but the promise can be void
|
||||
};
|
||||
|
||||
hooks.afterTest = async () => {
|
||||
// Hooks can have a promise with a result but it is not typically used
|
||||
return false;
|
||||
};
|
||||
Reference in New Issue
Block a user