Skip to content

Commit

Permalink
webdriverio client
Browse files Browse the repository at this point in the history
  • Loading branch information
Bamieh committed Sep 30, 2018
1 parent 5687297 commit ee7e719
Show file tree
Hide file tree
Showing 14 changed files with 64 additions and 56 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<p align="center">
<a href="#">
<img alt="reflow logo" src="https://github.com/Bamieh/reflow/raw/master/reflow.png" width="230" height="80" />
</a>
<img alt="reflow logo" src="https://github.com/Bamieh/reflow/raw/master/reflow.png" width="230" height="80" />
</p>

<p align="center">
Expand Down Expand Up @@ -29,6 +27,14 @@ $ npm install
$ npm run lerna:bootstrap
```

### Reflow Architecture

<p align="center">
<a href="#reflow-architecture">
<img alt="reflow architecture" src="https://github.com/Bamieh/reflow/raw/master/reflow_arch.png" />
</a>
</p>

### Components

Reflow is made to work at scale. Each individual component of the framework is designed to work in a distributed environment and scale individually.
Expand Down
2 changes: 1 addition & 1 deletion packages/reflow-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"prepare": "npm run clean && npm run build",
"test": "cross-env TS_NODE_FILES=true TS_NODE_PROJECT=./tsconfig.spec.json mocha",
"test:coverage": "nyc npm run test",
"test:watch": "cross-env TS_NODE_PROJECT=./tsconfig.spec.json mocha --watch --reporter=nyan --growl",
"test:watch": "cross-env TS_NODE_FILES=true TS_NODE_PROJECT=./tsconfig.spec.json mocha --watch --reporter=nyan --growl",
"build": "tsc",
"clean": "rimraf lib",
"watch": "tsc -w"
Expand Down
8 changes: 5 additions & 3 deletions packages/reflow-client/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export
interface ClientConfig {
remoteOptions?: webdriverio.RemoteOptions
// connection: any,
// capability: any,
// capabilities: webdriverio.RemoteOptions,
// config: any,
// customActions: any,
}
Expand All @@ -17,10 +17,12 @@ interface ClientConfig {
export
async function createClient(clientConfig: ClientConfig) {
const {
remoteOptions,
// remoteOptions,
capabilities,
} = clientConfig;
console.log('capabilities::', capabilities)

const client = webdriverio.remote(remoteOptions);
const client = webdriverio.remote(capabilities);
return client;
// const {
// capability,
Expand Down
7 changes: 0 additions & 7 deletions packages/reflow-client/test/base-client/fixtures/gallery.js

This file was deleted.

7 changes: 0 additions & 7 deletions packages/reflow-client/test/base-client/index.spec.ts

This file was deleted.

3 changes: 0 additions & 3 deletions packages/reflow-client/test/base-client/logger.spec.ts

This file was deleted.

19 changes: 0 additions & 19 deletions packages/reflow-client/test/base-client/page-objects.spec.ts

This file was deleted.

10 changes: 10 additions & 0 deletions packages/reflow-client/test/fixture/caps.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"desiredCapabilities": {
"browserName": "chrome",
"platform": "LINUX",
"platformName": "LINUX",
"seleniumProtocol": "WebDriver",
"applicationName": "TheShip Debug",
"version": "66.0.3359.117"
}
}
12 changes: 9 additions & 3 deletions packages/reflow-client/test/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
/// <reference path="typings/caps.d.ts" />
import * as capabilities from './fixture/caps.json';

import {
createClient,
ClientConfig,
} from '../src/index';

describe('Reflow|Client', function() {
let client;
it("creates a reflow client", function() {
before(function() {
const clientConfig:ClientConfig = {

}
capabilities,
};
client = createClient(clientConfig);
console.log('client::', client)
})
it("sda", function() {

});
})
1 change: 1 addition & 0 deletions packages/reflow-client/test/setup.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/// <reference path="typings/globals.d.ts" />

import * as chai from 'chai';
import * as sinon from 'sinon'
import * as sinonChai from 'sinon-chai'
Expand Down
4 changes: 4 additions & 0 deletions packages/reflow-client/test/typings/caps.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare module "*.json" {
const value: any;
export default value;
}
9 changes: 0 additions & 9 deletions packages/reflow-client/test/typings/webdriverio.d.ts

This file was deleted.

26 changes: 25 additions & 1 deletion packages/reflow-client/typings/webdriverio.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,31 @@ declare module "webdriverio" {
function remote(params?: RemoteOptions, remoteModifier?: any): any;

export
interface RemoteOptions {
interface DesiredCapabilities {
}

export
interface RemoteOptions {
desiredCapabilities: DesiredCapabilities,
logLevel?: any,
logOutput?: any,
protocol?: any,
host?: any,
port?: any,
path?: any,
agent?: any,
proxy?: any,
baseUrl?: any,
connectionRetryTimeout?: any,
connectionRetryCount?: any,
coloredLogs?: any,
deprecationWarnings?: any,
bail?: any,
screenshotPath?: any,
screenshotOnReject?: any,
waitforTimeout?: any,
waitforInterval?: any,
queryParams?: any,
headers?: any,
}
}
Binary file added reflow_arch.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ee7e719

Please sign in to comment.