Skip to content

Commit

Permalink
Merge pull request #8 from evangelion1204/3_composer_adjustments
Browse files Browse the repository at this point in the history
Updates of namespaces and composer.json
  • Loading branch information
Alexander Obuhovich committed Aug 18, 2014
2 parents 432e6b5 + 4b6f331 commit 2e651b5
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 23 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
BehatQAToolsExtension
=====================
BehatExtension
==============
10 changes: 3 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,14 @@
"name": "qa-tools/behat-extension",
"description": "QA-Tools extension for Behat",
"type": "library",
"keywords": ["behat","bdd","page","qa-tools","PageObject","HtmlElements"],
"keywords": ["Behat","BDD","page","QA-Tools","PageObject","HtmlElements"],
"homepage": "https://github.com/qa-tools/behat-extension",
"license": "BSD-3-Clause",
"require": {
"php": ">=5.3.1",
"behat/mink-extension": "*",
"behat/mink-extension": "~2.0@dev",
"qa-tools/qa-tools": "*@dev"
},
"minimum-stability": "dev",
"config": {
"bin-dir": "bin/"
},
"require-dev": {
"aik099/coding-standard": "dev-master",
"mockery/mockery": "~0.9"
Expand All @@ -25,7 +21,7 @@
},
"autoload-dev": {
"psr-0": {
"QATools\\behat": "tests/"
"tests\\QATools\\BehatExtension": "tests/"
}
},
"extra": {
Expand Down
5 changes: 3 additions & 2 deletions tests/QATools/behat/behat.yml → example/behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ default:
Behat\MinkExtension:
default_session: selenium2
javascript_session: selenium2
base_url: 'http://localhost'

selenium2: ~

evangelion1204\QAToolsExtension:
QATools\BehatExtension:
qa_tools:
base_url: 'http://localhost'
namespace:
pages: QATools\behat\pages
pages: pages
users:
test:
firstname: michael
Expand Down
26 changes: 26 additions & 0 deletions example/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "qa-tools/behat-extension-example",
"license": "BSD-3-Clause",
"require": {
"php": ">=5.3.1",
"qa-tools/qa-tools": "~1.0@dev",
"qa-tools/behat-extension": "~1.0@dev",
"mindplay/annotations": "~1.2@dev",
"behat/mink": "~1.5@dev",
"behat/mink-selenium2-driver": "~1.1@dev"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/qa-tools/behat-extension"
}
],
"autoload-dev": {
"psr-0": {
"pages": ""
}
},
"config": {
"bin-dir": "bin/"
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

use QATools\BehatExtension\Context\IQAToolsContext;
use QATools\BehatExtension\Context\QAToolsContext;

class MainContext extends IQAToolsContext
class MainContext extends QAToolsContext
{
protected static $folder = __DIR__;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# frontend/features/login.feature
Feature: Login
In order to use our site
In order to use the website site
As a website user
I need to login successfully

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @copyright Michael Geppert <[email protected]>
*/

namespace QATools\behat\pages;
namespace pages;


use QATools\QATools\HtmlElements\TypifiedPage;
Expand All @@ -17,7 +17,7 @@
/**
* Class TestPage
*
* @page-url('http://test.qa-tools.io/tests/aik099/QATools/HtmlElementsLive/Element/')
* @page-url('/example/fixtures/')
*/
class TestPage extends TypifiedPage
{
Expand All @@ -26,7 +26,7 @@ class TestPage extends TypifiedPage
* Input elements.
*
* @var WebElement
* @find-by('css' => '[name*=test]')
* @find-by('css' => 'input[name*=test]')
*/
protected $inputs;

Expand All @@ -38,10 +38,11 @@ class TestPage extends TypifiedPage
public function enter()
{
$this->inputs->click();
}

foreach ( $this->inputs as $input ) {
$input->click();
}
public function waitFor($timeout, $callback)
{
return ;
}

}
2 changes: 1 addition & 1 deletion src/QATools/BehatExtension/Context/QAToolsContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use Behat\Behat\Context\Context;
use QATools\BehatExtension\QATools;

class IQAToolsContext implements Context, IQAToolsAwareContext
class QAToolsContext implements Context, IQAToolsAwareContext
{

/**
Expand Down
1 change: 0 additions & 1 deletion src/QATools/BehatExtension/QATools.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
use QATools\QATools\HtmlElements\TypifiedPageFactory;
use QATools\QATools\PageObject\Config\Config;
use QATools\QATools\PageObject\Page;
use QATools\QATools\PageObject\PageFactory;

class QATools
{
Expand Down

0 comments on commit 2e651b5

Please sign in to comment.