Skip to content
This repository has been archived by the owner on Aug 7, 2019. It is now read-only.

Commit

Permalink
Merge pull request #41 from ReadyTalk/version-4
Browse files Browse the repository at this point in the history
Version 4
  • Loading branch information
thompsnm authored Aug 14, 2016
2 parents 9aa626c + def25f2 commit 271b6a8
Show file tree
Hide file tree
Showing 10 changed files with 193 additions and 170 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
language: node_js
node_js:
- "4.1"
- "4.0"
- "4.4"
- "4.3"
before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- "npm install -g npm@3"
85 changes: 0 additions & 85 deletions Gruntfile.coffee

This file was deleted.

10 changes: 0 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,15 +299,6 @@ Note: The unit tests are the contract for the Step Definition names. Any changes
* Install [Firefox]
* Run `npm install` to download dependencies.
* Run `npm test` to lint all files and run the unit tests.
* This is also the default [Grunt] task

## Running Unit Tests against a specific browser

By default CukeFarm runs unit tests against Firefox. Follow these steps to explicitly test against a particular browser:

* Install the correct browser
* Run `npm install` to download dependencies.
* Run `npm run-script test-<browser>` where `<browser>` is either `firefox` or `chrome`

[Cucumber]:https://www.npmjs.com/package/cucumber
[Protractor]:http://angular.github.io/protractor
Expand All @@ -318,4 +309,3 @@ By default CukeFarm runs unit tests against Firefox. Follow these steps to expli
[WebDriver Page Object]:https://code.google.com/p/selenium/wiki/PageObjects
[node-globules]:https://github.com/cowboy/node-globule
[Firefox]:https://www.mozilla.org/en-US/
[Grunt]:http://gruntjs.com
6 changes: 2 additions & 4 deletions docs/generalStepDefs.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,7 @@ return verifyStepCaptures('I select "Mountain Standard" in the "Time Zone" drop

```
return executeStep('I select "Mountain Standard" in the "Time Zone" drop down list', function() {
expect(element(By.cssContainingText('option', 'Mountain Standard')).isSelected()).to.eventually.equal(true);
expect(element(By.cssContainingText('option', 'Eastern Standard')).isSelected()).to.eventually.equal(false);
return expect(element(By.cssContainingText('option', 'Central Standard')).isSelected()).to.eventually.equal(false);
return Promise.all([expect(element(By.cssContainingText('option', 'Eastern Standard')).isSelected()).to.eventually.equal(false), expect(element(By.cssContainingText('option', 'Central Standard')).isSelected()).to.eventually.equal(false), expect(element(By.cssContainingText('option', 'Mountain Standard')).isSelected()).to.eventually.equal(true)]);
});
```

Expand Down Expand Up @@ -596,7 +594,7 @@ return executeStep('the "Test Span" should contain the text "Fake Text"', functi
with an input should succeed if the element contains the expected text

```
world.currentPage.testInput.sendKeys("Input Text");
element(By.css('input')).sendKeys("Input Text");
return executeStep('the "Test Input" should contain the text "Input Text"', function() {
return expect(currentStepResult.getStatus()).to.equal(Cucumber.Status.PASSED);
});
Expand Down
55 changes: 27 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,43 +1,40 @@
{
"name": "cukefarm",
"version": "3.0.1",
"version": "4.0.0",
"description": "An opinionated template for writing Cucumber tests with Protractor",
"main": "index.js",
"engines": {
"node": ">= 4.3.0",
"npm": "3.10.x"
},
"repository": {
"type": "git",
"url": "https://github.com/ReadyTalk/cukefarm"
},
"dependencies": {
"chai": "^3.4.0",
"chai-as-promised": "^5.0.0",
"q": "^1.0.1"
"chai": "^3.5.0",
"chai-as-promised": "^5.3.0",
"q": "^1.4.1"
},
"author": "Nathan Thompson",
"license": "MIT",
"devDependencies": {
"coffee-script": "^1.9.1",
"coffeelint": "^1.14.2",
"cucumber": "~0.9.0",
"coffee-script": "^1.10.0",
"coffeelint": "^1.15.7",
"cucumber": "^1.2.1",
"docha": "^0.1.2",
"grunt": "^0.4.5",
"grunt-cli": "^0.1.13",
"grunt-coffeelint": "^0.0.13",
"grunt-contrib-coffee": "^0.13.0",
"grunt-express": "^1.4.1",
"grunt-protractor3-runner": "^3.0.0",
"grunt-shell": "^1.1.1",
"jit-grunt": "^0.9.1",
"js-fixtures": "^1.5.1",
"mocha": "^2.3.4",
"protractor-cucumber-framework": "^0.3.0",
"sinon": "^1.10.3",
"sinon-as-promised": "^4.0.0",
"time-grunt": "^1.0.0"
"express": "^4.14.0",
"js-fixtures": "^1.5.3",
"mocha": "^3.0.0",
"protractor": "^4.0.2",
"protractor-cucumber-framework": "^0.6.0",
"sinon": "^1.17.5",
"sinon-as-promised": "^4.0.2"
},
"peerDependencies": {
"cucumber": ">= 0.9 < 1",
"protractor": "^3.0.0",
"protractor-cucumber-framework": "^0.3.0"
"cucumber": "^1.0.0",
"protractor": "^4.0.0",
"protractor-cucumber-framework": "^0.6.0"
},
"homepage": "https://github.com/ReadyTalk/cukefarm",
"keywords": [
Expand All @@ -47,9 +44,11 @@
"selenium"
],
"scripts": {
"prepublish": "grunt coffee:compile",
"test": "grunt",
"test-firefox": "grunt ci:firefox",
"test-chrome": "grunt ci:chrome"
"ci": "npm run lint && npm run test && npm run generateApiDocs",
"compile": "coffee -o lib -c src",
"generateApiDocs": "coffee util/generateApiDocs.coffee",
"lint": "coffeelint -f coffeelint.json src",
"prepublish": "npm run compile",
"test": "npm run compile && coffee util/runProtractorTests.coffee"
}
}
3 changes: 3 additions & 0 deletions spec/conf/protractor.spec.conf.coffee
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
config = require('../../src/protractor.conf.coffee').config

config.capabilities =
browserName: 'firefox'

config.framework = 'mocha'
config.specs = '../**/*.spec.coffee'
config.allScriptsTimeout = 20000
Expand Down
Loading

0 comments on commit 271b6a8

Please sign in to comment.