Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
5739ba0
Added main index.php file and composer.json file.
Nov 4, 2015
6793bb1
Added SeleniumOneToSeleniumToConverter class with it's methods and Se…
Nov 4, 2015
425ebaf
Added method getTestName to SeleniumOneToSeleniumTwoConverter class a…
Nov 5, 2015
b1c6466
Changed SeleniumTwoToBehatMinkFormatter's constructor.
Nov 5, 2015
7c133f9
Changed architechture, now formatting will be done without converting…
narekcat Nov 6, 2015
1d9939a
Added method toBehatMink, it's for changeing every SeleniumOne comman…
Nov 6, 2015
597e57d
Created new architecture, with SeleniumFileParser and Commands Factory.
Nov 9, 2015
22a1ea5
Completed class SeleniumFileParser, created new file for class Seleni…
Nov 9, 2015
c044962
Changed SeleniumRCToMinkFormatter class and BehtaFileGenerataor class
Nov 9, 2015
bd09d38
Completed the application, but it must be tested.
Nov 10, 2015
88f4de6
Fixed some bugs.
Nov 10, 2015
c8559c1
Changed BehatFilesGenerator identifier to BehatTestGenerator, fixed b…
Nov 10, 2015
ed9bce5
Changed fileName to filePath, CommanfFactory wrote without if else, c…
Nov 10, 2015
acf1ea4
Changed nowfile content, now it more readable.
Nov 10, 2015
0e98dae
Added composer autoload and Behat with Mink extension.
Nov 11, 2015
ccc29ec
Changed Commands class name to CommandFactory, created new method in …
Nov 11, 2015
383b057
Changed command classes now they find out what type has selector and …
Nov 11, 2015
32e8735
Changed Behat and Mink versions, changed SeleniumIde command's format…
Nov 11, 2015
e71f797
Worked on Command Type and Select, but there still are problems with …
Nov 12, 2015
b119b68
Chenged event triger script.
Nov 13, 2015
61ee566
Deleted behat with it's additional extensions.
Nov 13, 2015
34e1226
Added version to the package.
Nov 13, 2015
ef546e3
Wrote new test for github.com, added new command classes Type and Typ…
Nov 16, 2015
eb3863a
Changed main namspace of project.
Nov 16, 2015
2deb8b7
Added licence to package.
Nov 16, 2015
0f8e717
Added convert.php file and did some changes into .gitignore.
Nov 17, 2015
4c82708
Fixed typo in composer.json.
Nov 17, 2015
31b0d58
Changed the way how requires composer's autoload.php file, changed th…
Nov 17, 2015
f1f426f
Changed convert.php to conver.
Nov 17, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
/nbproject/
/nbproject/
/vendor/
/bin/behat
/features/
12 changes: 12 additions & 0 deletions behat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
default:
extensions:
Behat\MinkExtension:
# base_url: http://16.feature-sd-7626.website.ls.vu/
# goutte: ~
selenium2: ~
suites:
default:
contexts:
- FeatureContext:
parameters:
base_url: http://php.net
49 changes: 49 additions & 0 deletions bin/convert
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php
/**
* This file is converts input file from SeleniumIde xml format to Behat php format
*/

require_once __DIR__ . '/../../../../vendor/autoload.php';

use Fouraitch\SeleniumIdeFormatter\BehatTestGenerator;

function setTextColor($color)
{
$colors = [
'red' => "\e[1;31m",
'green' => "\e[1;32m"
];
echo $colors[$color];
}

function resetTextColor()
{
echo "\e[0m";
}

try {
if ($_SERVER['argc'] < 2) {
throw new Exception("There are not enough parameters.\n");
}
if ($_SERVER['argc'] > 2) {
throw new Exception("There are too many parameters.\n");
}

$filePath = $_SERVER['argv'][1];
$fileName = strstr($filePath, strrpos($filePath, '/'));
if (preg_match('/^[0-9]/', $fileName)) {
throw new Exception("Test file name must not start with number.\n");
}
if (!file_exists($filePath)) {
throw new Exception("Wrong file name.\n");
}
$testGenerator = new BehatTestGenerator($filePath);
$testGenerator->generate();
setTextColor('green');
echo "Your test converted successfully.\n"
. "Now you can run \"bin/behat features/{$fileName}\"\n";
} catch (Exception $ex) {
setTextColor('red');
echo $ex->getMessage();
}
resetTextColor();
26 changes: 26 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "fouraitch/selenium-ide-php-behat-mink-formatter",
"version": "1.0",
"license": "MIT",
"authors": [
{
"name": "Narek Vardzelyan",
"email": "narek.vardzelyan@of.am"
}
],
"require-dev": {
"behat/behat": "3.*@stable",
"behat/mink": "1.7.*@stable",
"behat/mink-extension": "*",
"behat/mink-goutte-driver": "*",
"behat/mink-selenium2-driver": "*"
},
"minimum-stability": "dev",
"config": {
"bin-dir": "bin/"
},
"autoload": {
"psr-4": {"Fouraitch\\SeleniumIdeFormatter\\": "src/"}
},
"bin": ["bin/convert"]
}
Loading