From 2579c62e6375ae5ed6ced72ee8d779b6690ea800 Mon Sep 17 00:00:00 2001 From: Aaron Goff Date: Thu, 26 Mar 2020 16:32:56 -0400 Subject: [PATCH] Spelling errors Convert postman to .md and .json Add mochawesome to package.json --- README.md | 4 ++-- jsLibrary/multipleDevices/multi.js | 4 ++-- jsLibrary/package.json | 1 + jsLibrary/tests/test_7-EpisodePicker.js | 2 +- jsLibrary/uTest/test_rokuLibrary.js | 4 ++-- sample/Postman/README.md | 11 +++++++++++ sample/Postman/README.txt | 17 ----------------- ...river_endpoints => WebDriver_endpoints.json} | 0 8 files changed, 19 insertions(+), 24 deletions(-) create mode 100644 sample/Postman/README.md delete mode 100644 sample/Postman/README.txt rename sample/Postman/{WebDriver_endpoints => WebDriver_endpoints.json} (100%) diff --git a/README.md b/README.md index 2037a1d..701484b 100644 --- a/README.md +++ b/README.md @@ -160,7 +160,7 @@ To install the [Roku Robot Framework Library](https://developer.roku.com/docs/de To install the [Roku JavaScript Library](https://developer.roku.com/docs/developer-program/dev-tools/automated-channel-testing/javascript-library.md) and test it on one or more devices, follow these steps: -1. Download and install the [node.js](https://nodejs.org/en/) JavaScript runtime envrionment. +1. Download and install the [node.js](https://nodejs.org/en/) JavaScript runtime environment. 2. Download and install the [Yarn](https://classic.yarnpkg.com/en/docs/install) JavaScript package manager. @@ -168,7 +168,7 @@ To install the [Roku JavaScript Library](https://developer.roku.com/docs/develo yarn install -4. To use the [Mocha](https://mochajs.org/) JavaScript test framework and run tests on multiple devcies, globally install Mocha and [Mochawesome](https://www.npmjs.com/package/mochawesome): +4. To use the [Mocha](https://mochajs.org/) JavaScript test framework and run tests on multiple devices, globally install Mocha and [Mochawesome](https://www.npmjs.com/package/mochawesome): yarn global add mocha yarn global add mochawesome diff --git a/jsLibrary/multipleDevices/multi.js b/jsLibrary/multipleDevices/multi.js index eb260d4..2518f73 100644 --- a/jsLibrary/multipleDevices/multi.js +++ b/jsLibrary/multipleDevices/multi.js @@ -44,8 +44,8 @@ function startTest(cmds, config) { const executeCmd = isWin ? 'mocha.cmd' : 'mocha'; cmds.forEach(({options, name}) => { let child = spawn(executeCmd, [`${test}`,'--reporter', 'mochawesome', '--reporter-options', `reportDir=${outputdir},reportFilename=${name}`, options]); - child.on('error', (messasge) => { - console.log(`${name} error: ${messasge}`); + child.on('error', (message) => { + console.log(`${name} error: ${message}`); }); child.stdout.on('data', (data) => { console.log(`${name} stdout:\n${data}`); diff --git a/jsLibrary/package.json b/jsLibrary/package.json index 57aad48..5dfb3a4 100644 --- a/jsLibrary/package.json +++ b/jsLibrary/package.json @@ -7,6 +7,7 @@ "chai": "4.2.0", "form-data": "3.0.0", "mocha": "7.0.1", + "mochawesome": "5.0.0", "nock": "12.0.1" } } diff --git a/jsLibrary/tests/test_7-EpisodePicker.js b/jsLibrary/tests/test_7-EpisodePicker.js index da1428f..2922ecf 100644 --- a/jsLibrary/tests/test_7-EpisodePicker.js +++ b/jsLibrary/tests/test_7-EpisodePicker.js @@ -52,7 +52,7 @@ describe('test_7-EpisodePicker', () => { expect(res).equal(true); }); - it('Verify is Categort list loaded', async function() { + it('Verify is Category list loaded', async function() { this.timeout(50000); await library.sendKey('select', 3); const res = await library.verifyIsScreenLoaded({'elementData': [{'using': 'tag', 'value': 'CategoryListView'}]}); diff --git a/jsLibrary/uTest/test_rokuLibrary.js b/jsLibrary/uTest/test_rokuLibrary.js index c57735c..014ef13 100644 --- a/jsLibrary/uTest/test_rokuLibrary.js +++ b/jsLibrary/uTest/test_rokuLibrary.js @@ -337,7 +337,7 @@ describe('rokuLibrary tests', () => { } }); - it('test verify is playack started success', async () => { + it('test verify is playback started success', async () => { nock(baseUrl) .get(`/${sessionId}/player`) .reply(200, respWithPlayerInfo); @@ -345,7 +345,7 @@ describe('rokuLibrary tests', () => { expect(result).to.equal(true); }); - it('test verify is playack started error', async () => { + it('test verify is playback started error', async () => { nock(baseUrl) .get(`/${sessionId}/player`) .reply(500, responseWithError); diff --git a/sample/Postman/README.md b/sample/Postman/README.md new file mode 100644 index 0000000..3f9f273 --- /dev/null +++ b/sample/Postman/README.md @@ -0,0 +1,11 @@ +# WebDriver Postman collection + +1. Side load [Roku Recommends](../../channels/Roku_Recommends.zip) sample channel. +2. [WebDriver_endpoints.json](./WebDriver_endpoints.json) file should be imported as Postman collection. +3. Start instance of [Roku WebDriver.](../../README.md#Getting started) +4. Open "create session" request and populate `ip` field in request body with your Roku Device IP address. +5. Execute "create session" request to create new session. +6. Execute any other requests +7. Execute "delete session" request to remove session. + + diff --git a/sample/Postman/README.txt b/sample/Postman/README.txt deleted file mode 100644 index f3bf623..0000000 --- a/sample/Postman/README.txt +++ /dev/null @@ -1,17 +0,0 @@ -WebDriver Postman collection - -1.) Side load Roku Recommends sample channel. - -2.) WebDriver_endpoints file should be imported as Postman collection. - -3.) Open "create session" request and populate "ip" field in request body with your Roku Device IP adress. - -4.) Start instance of Roku webDriver. - -5.) Execute "create session" request to create new session. - -6.) Exucute all other request. - -7.) Execute "delete session" request to remove session. - - diff --git a/sample/Postman/WebDriver_endpoints b/sample/Postman/WebDriver_endpoints.json similarity index 100% rename from sample/Postman/WebDriver_endpoints rename to sample/Postman/WebDriver_endpoints.json