Skip to content
Snippets Groups Projects
Commit 7c5bb2a8 authored by Roland Golla's avatar Roland Golla Committed by Christian Kuhn
Browse files

[TASK] Enable codeception and add simple mouse test

Resolves: #73216
Releases: master
Change-Id: I0390afebbf296748452dd85a0fd5f34fb53adff4
Reviewed-on: https://review.typo3.org/46566


Reviewed-by: default avatarOliver Hader <oliver.hader@typo3.org>
Reviewed-by: default avatarFrank Naegler <frank.naegler@typo3.org>
Tested-by: default avatarFrank Naegler <frank.naegler@typo3.org>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 67358929
Branches
Tags
No related merge requests found
......@@ -51,7 +51,9 @@
},
"require-dev": {
"phpunit/phpunit": "~4.8.0",
"mikey179/vfsStream": "1.6.0"
"mikey179/vfsStream": "1.6.0",
"codeception/codeception": "^2.1",
"se/selenium-server-standalone": "~2.48.2"
},
"suggest": {
"ext-gd": "GDlib/Freetype is required for building images with text (GIFBUILDER) and can also be used to scale images",
......
This diff is collapsed.
......@@ -2,8 +2,9 @@ actor: Tester
paths:
tests: Configuration/Acceptance
log: ../../../../typo3temp/var/logs/codeception
data: ''
data: Configuration/Acceptance/Data
support: Configuration/Acceptance/Support
envs: Configuration/Acceptance/Envs
settings:
colors: true
memory_limit: 1024M
......
<?php
namespace Helper;
// here you can define custom actions
// all public methods declared in helper class will be available in $I
class Functional extends \Codeception\Module
{
}
<?php
namespace Helper;
// here you can define custom actions
// all public methods declared in helper class will be available in $I
class Unit extends \Codeception\Module
{
}
class_name: AcceptanceTester
modules:
enabled:
- PhpBrowser:
url: http://localhost:8000
- \Helper\Acceptance
\ No newline at end of file
- WebDriver
- \Helper\Acceptance
- Asserts
- \Helper\Unit
config:
WebDriver:
window_size: 1024x768
url: http://localhost:8000
browser: firefox
http_proxy: direct
\ No newline at end of file
<?php
$I = new AcceptanceTester($scenario);
$I->wantTo('I want to see the TYPO3 backend login form');
$I->amOnPage('/typo3/index.php');
$I->see('Login', '#t3-login-submit');
$I->fillField('#t3-username', 'admin');
$I->fillField('#t3-password', 'joh316');
<?php
/**
* This tests login mouse over button.
*/
$I = new AcceptanceTester($scenario);
$I->wantTo('check login functions');
$I->amOnPage('/typo3');
$I->waitForElement('#t3-username');
$I->wantTo('mouse over css change login button');
$bs = $I->executeInSelenium(function(\Facebook\WebDriver\Remote\RemoteWebDriver $webdriver) {
return $webdriver->findElement(WebDriverBy::cssSelector('#t3-login-submit'))->getCSSValue('box-shadow');
});
$I->moveMouseOver('#t3-login-submit');
$I->wait(1);
$bsmo = $I->executeInSelenium(function(\Facebook\WebDriver\Remote\RemoteWebDriver $webdriver) {
return $webdriver->findElement(WebDriverBy::cssSelector('#t3-login-submit'))->getCSSValue('box-shadow');
});
$this->assertFalse($bs == $bsmo);
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment