This repository has been archived by the owner on Jan 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial release of dkdeploy-cucumber v4.0.0
- Loading branch information
0 parents
commit f93b9f8
Showing
39 changed files
with
1,146 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
*.gem | ||
*.rbc | ||
.bundle | ||
.config | ||
.yardoc | ||
InstalledFiles | ||
_yardoc | ||
coverage | ||
doc/ | ||
lib/bundler/man | ||
pkg | ||
rdoc | ||
spec/reports | ||
test/tmp | ||
test/version_tmp | ||
tmp | ||
.lock | ||
Gemfile.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
AllCops: | ||
Exclude: | ||
- 'tmp/**/*' | ||
- 'config/**/*' | ||
- 'vendor/**/*' | ||
TargetRubyVersion: 2.2 | ||
GlobalVars: | ||
AllowedVariables: [] | ||
MethodLength: | ||
Max: 25 | ||
LineLength: | ||
Max: 200 | ||
SpecialGlobalVars: | ||
Enabled: false | ||
BracesAroundHashParameters: | ||
Enabled: false | ||
CyclomaticComplexity: | ||
Max: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
sudo: false | ||
language: ruby | ||
cache: bundler | ||
rvm: | ||
- 2.2 | ||
- 2.3.4 | ||
- 2.4.1 | ||
|
||
before_install: | ||
- gem install bundler --no-document | ||
|
||
script: | ||
- bundle exec rubocop --display-cop-names --extra-details | ||
- bundle exec cucumber | ||
- bundle exec cucumber --profile negative |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
This project adheres to [Semantic Versioning](http://semver.org/). | ||
|
||
## [4.0.0]- 2017-08-28 | ||
### Summary | ||
|
||
- first public release | ||
|
||
[Unreleased]: https://github.com/dkdeploy/dkdeploy-cucumber/compare/master...develop | ||
[4.0.0]: https://github.com/dkdeploy/dkdeploy-cucumber/releases/tag/v4.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# dkdeploy CONTRIBUTORS | ||
|
||
The dkdeploy core maintainers would like to recognize following contributors (in alphabetic order): | ||
|
||
- Sascha Egerer | ||
- Christoph Gerold | ||
- Johannes Goslar | ||
- Kieran Hayes | ||
- Wilfried Irßlinger | ||
- Thomas Jahnke | ||
- Gleb Levitin | ||
- Luka Lüdicke | ||
- Nicolai Reuschling | ||
- Lars Tode | ||
- Timo Webler | ||
- Mike Zaschka |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
source 'https://rubygems.org' | ||
|
||
# Specify your gem's dependencies in dkdeploy-cucumber.gemspec | ||
gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Copyright (c) 2014-2017 dkd Internet Service GmbH, Frankfurt am Main (Germany), https://dkd.de | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
![dkdeploy](assets/dkdeploy-logo.png) | ||
|
||
# Dkdeploy::Cucumber | ||
|
||
[![Build Status](https://api.travis-ci.org/dkdeploy/dkdeploy-cucumber.svg?branch=develop)](https://travis-ci.org/repositories/dkdeploy/dkdeploy-cucumber) | ||
[![Gem Version](https://badge.fury.io/rb/dkdeploy-cucumber.svg)](https://badge.fury.io/rb/dkdeploy-cucumber) [![Inline docs](http://inch-ci.org/github/dkdeploy/dkdeploy-cucumber.svg?branch=develop)](http://inch-ci.org/github/dkdeploy/dkdeploy-cucumber) | ||
|
||
## Description | ||
|
||
This Rubygem `dkdeploy-cucumber` defines Cucumber steps for browser tests. | ||
Tests are run with `capybara` and PhantomJS. | ||
|
||
## Installation | ||
|
||
Add this line to your application's Gemfile: | ||
|
||
gem 'dkdeploy-cucumber', '~> 4.0' | ||
|
||
And then execute: | ||
|
||
$ bundle | ||
|
||
Or install it yourself as: | ||
|
||
$ gem install dkdeploy-cucumber | ||
|
||
## Usage | ||
|
||
You can see usage examples in the `features` directory. | ||
|
||
## Testing | ||
|
||
## Prerequisite | ||
|
||
`rvm` to test against multiple Ruby versions. | ||
|
||
### Running tests | ||
|
||
1. Run `bundle exec rubocop` | ||
2. Run `bundle exec cucumber` | ||
3. Run `bundle exec cucumber --profile negative` | ||
|
||
### Running tests | ||
|
||
1. Checking coding styles (`rubocop`) | ||
2. Running Cucumber tests (`cucumber`) | ||
|
||
## Contributing | ||
|
||
1. Install [git flow](https://github.com/nvie/gitflow) | ||
2. If project is not checked out already do git clone `[email protected]:dkdeploy/dkdeploy-cucumber.git` | ||
3. Checkout origin develop branch (`git checkout --track -b develop origin/develop`) | ||
4. Git flow initialze `git flow init -d` | ||
5. Installing gems `bundle update` | ||
6. Create new feature branch (`git flow feature start my-new-feature`) | ||
7. Run tests (README.md Testing) | ||
8. Commit your changes (`git commit -am 'Add some feature'`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
require 'bundler/gem_tasks' |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
default: --profile normal | ||
normal: --tags ~@should_fail | ||
negative: --tags @should_fail --wip # Run test that check correct negative outcomes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# coding: utf-8 | ||
|
||
lib = File.expand_path('../lib', __FILE__) | ||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) | ||
require 'dkdeploy/cucumber/version' | ||
|
||
Gem::Specification.new do |spec| | ||
spec.name = 'dkdeploy-cucumber' | ||
spec.version = Dkdeploy::Cucumber::Version | ||
spec.license = 'MIT' | ||
spec.authors = ['Gleb Levitin', 'Timo Webler', 'Johannes Goslar', 'Luka Lüdicke'] | ||
spec.email = %w[[email protected] [email protected] [email protected] [email protected]] | ||
spec.description = 'dkdeploy Cucumber step definitions' | ||
spec.summary = 'Cucumber step definitions for browser tests' | ||
spec.homepage = 'https://github.com/dkdeploy/dkdeploy-cucumber' | ||
spec.required_ruby_version = '~> 2.2' | ||
|
||
spec.files = `git ls-files`.split($/) | ||
spec.executables = spec.files.grep(%r{^bin\/}) { |f| File.basename(f) } | ||
spec.test_files = spec.files.grep(%r{^(test|spec|features)\/}) | ||
spec.require_paths = ['lib'] | ||
|
||
spec.add_development_dependency 'bundler' | ||
spec.add_development_dependency 'rake' | ||
spec.add_development_dependency 'rack', '~> 2.0' | ||
spec.add_development_dependency 'rubocop', '~> 0.48.1' | ||
spec.add_development_dependency 'rspec', '~> 3.6' | ||
spec.add_development_dependency 'capybara', '~> 2.15.1' | ||
spec.add_development_dependency 'phantomjs', '~> 2.1.1.0' | ||
spec.add_development_dependency 'poltergeist', '~> 1.16.0' | ||
|
||
spec.add_dependency 'cucumber', '~> 2.4' | ||
spec.add_dependency 'rspec-expectations', '~> 3.6' | ||
spec.add_dependency 'launchy', '~> 2.4.3' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
Feature: Click | ||
Background: | ||
Given I am on "click.html" | ||
|
||
Scenario: click button | ||
Then I should not see "changed" | ||
When I press "b1" | ||
Then I should see "changed" | ||
|
||
@should_fail | ||
Scenario: click button fail | ||
When I press "b3" | ||
|
||
Scenario: click button within context | ||
Then I should not see "changed2" | ||
When I press "b2" within "#scope" | ||
Then I should see "changed2" | ||
|
||
@should_fail | ||
Scenario: click button within context fail | ||
When I press "b1" within "#wrong" | ||
|
||
Scenario: click on element | ||
Then I should not see "changed3" | ||
When I click on element "#clickelement" | ||
Then I should see "changed3" | ||
|
||
@should_fail | ||
Scenario: click on element fail | ||
When I click on element "#clickelement123" | ||
|
||
Scenario: follow link | ||
Given I am on "click1.html" | ||
Then I should not see "link2site" | ||
When I follow "link" | ||
Then I should see "link2site" | ||
|
||
@should_fail | ||
Scenario: follow link fail | ||
Given I am on "click1.html" | ||
When I follow "link123" | ||
|
||
Scenario: click xpath | ||
Given I am on "click1.html" | ||
Then I should not see "link2site" | ||
When I click xpath "/html/body/ul/li[2]/a" | ||
Then I should see "link2site" | ||
|
||
@should_fail | ||
Scenario: click xpath fail | ||
Given I am on "click1.html" | ||
When I click xpath "/html/body/ul/li[5]/a" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
Feature: Content Checks | ||
Background: | ||
Given I am on "content.html" | ||
|
||
Scenario: see something | ||
Then I should see "something" | ||
|
||
@should_fail | ||
Scenario: see something fail | ||
Then I should see "otherthing" | ||
|
||
Scenario: do not see something | ||
Then I should not see "otherthing" | ||
|
||
@should_fail | ||
Scenario: do not see something fail | ||
Then I should not see "something" | ||
|
||
Scenario: see regexp | ||
Then I should see /so.{2}th.ng/ | ||
|
||
@should_fail | ||
Scenario: see regexp fail | ||
Then I should see /so.{3}th.ng/ | ||
|
||
Scenario: not see regexp | ||
Then I should not see /murks/ | ||
|
||
@should_fail | ||
Scenario: not see regexp fail | ||
Then I should not see /thing/ | ||
|
||
Scenario: Date | ||
Then I should see a date within "#date" | ||
|
||
@should_fail | ||
Scenario: Date fail | ||
Then I should see a date within "#falsedate" | ||
|
||
Scenario: Visible | ||
Then the element "#p1" should be visible | ||
|
||
@should_fail | ||
Scenario: Visible fail | ||
Then the element "#p2" should be visible | ||
|
||
Scenario: Invisible | ||
Then the element "#p2" should not be visible | ||
|
||
@should_fail | ||
Scenario: Invisible fail | ||
Then the element "#p1" should not be visible | ||
|
||
Scenario: Hover | ||
Then I should see "before" within "#p3" | ||
When I hover over "#hover" | ||
Then I should see "after" within "#p3" | ||
|
||
@should_fail | ||
Scenario: Hover fail | ||
Then I should see "before" within "#p3" | ||
When I hover over "#hover3" | ||
|
||
Scenario: At least | ||
Then I should have at least 6 "p" within "body" | ||
|
||
|
||
Scenario: JSON content | ||
Given I am on "content.json" | ||
Then I should see JSON: | ||
""" | ||
{ | ||
"test": 1 | ||
} | ||
""" | ||
|
||
@should_fail | ||
Scenario: JSON content fail | ||
Given I am on "content.json" | ||
Then I should see JSON: | ||
""" | ||
{ | ||
"test": 2 | ||
} | ||
""" | ||
|
||
Scenario: exact page title | ||
Given I am on "content.html" | ||
Then the page should have a title of "Empty html" | ||
|
||
Scenario: page title matching regex | ||
Given I am on "content.html" | ||
Then the page title should match /Empty/ | ||
Then the page title should match /(\s){1}/ | ||
Then the page title should match /html/ |
Oops, something went wrong.