-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/codeception_tests' into develop
- Loading branch information
Showing
13 changed files
with
226 additions
and
14 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
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 |
---|---|---|
|
@@ -26,3 +26,5 @@ var/ | |
/config/ | ||
/.phpunit.cache/ | ||
/.env.local | ||
/Tests/Acceptance/_output/* | ||
/Tests/Acceptance/_support/_generated/ |
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 |
---|---|---|
@@ -1,3 +1,14 @@ | ||
FROM in2code/php-dev:8.2-fpm | ||
|
||
COPY zz_xdebug.ini /usr/local/etc/php/conf.d/zz_xdebug.ini | ||
|
||
USER root | ||
|
||
# Install CURL extension | ||
RUN apt-get update && apt-get install -y \ | ||
libcurl4-openssl-dev \ | ||
&& docker-php-ext-install curl \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
USER www-data |
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
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
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,25 @@ | ||
<?php | ||
|
||
namespace In2code\Lux\Tests; | ||
|
||
use In2code\Lux\Tests\_generated\AcceptanceTesterActions; | ||
|
||
/** | ||
* Inherited Methods | ||
* @method void wantToTest($text) | ||
* @method void wantTo($text) | ||
* @method void execute($callable) | ||
* @method void expectTo($prediction) | ||
* @method void expect($prediction) | ||
* @method void amGoingTo($argumentation) | ||
* @method void am($role) | ||
* @method void lookForwardTo($achieveValue) | ||
* @method void comment($description) | ||
* @method void pause() | ||
* | ||
* @SuppressWarnings(PHPMD) | ||
*/ | ||
class AcceptanceTester extends \Codeception\Actor | ||
{ | ||
use AcceptanceTesterActions; | ||
} |
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 @@ | ||
<?php | ||
|
||
namespace In2code\Lux\Tests\Helper; | ||
|
||
class BackendTester extends \Codeception\Module | ||
{ | ||
public function loginToBackend($I, $username = 'akellner', $password = 'akellner') | ||
{ | ||
$I->amOnPage('/typo3/'); | ||
$I->fillField('#t3-username', $username); | ||
$I->fillField('#t3-password', $password); | ||
$I->click('Login'); | ||
$I->waitForElement('#typo3-cms-backend-backend-toolbaritems-systeminformationtoolbaritem'); | ||
} | ||
} |
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,19 @@ | ||
actor: AcceptanceTester | ||
modules: | ||
enabled: | ||
- WebDriver: | ||
url: https://local.lux.de | ||
browser: chrome | ||
host: seleniarm-hub | ||
port: 4444 | ||
path: '/wd/hub' | ||
connection_timeout: 5 | ||
restart: true | ||
window_size: maximize | ||
capabilities: | ||
browserName: "chrome" | ||
acceptInsecureCerts: true | ||
'goog:chromeOptions': | ||
args: ["--no-sandbox", "--headless", "--disable-gpu", "--ignore-certificate-errors"] | ||
- \In2code\Lux\Tests\Helper\BackendTester | ||
step_decorators: ~ |
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,21 @@ | ||
<?php | ||
|
||
namespace In2code\Lux\Tests\Acceptance\Backend; | ||
|
||
use In2code\Lux\Tests\AcceptanceTester; | ||
|
||
class BackendLoginCest | ||
{ | ||
public function _before(AcceptanceTester $I) | ||
{ | ||
$I->loginToBackend($I); | ||
} | ||
|
||
public function loginToBackendSuccessfully(AcceptanceTester $I) | ||
{ | ||
$I->see('LUX'); | ||
$I->see('Analyse'); | ||
$I->see('Leads'); | ||
$I->see('Kampagnen'); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
Tests/Acceptance/acceptance/Frontend/SimpleHomepageCest.php
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,14 @@ | ||
<?php | ||
|
||
namespace In2code\Lux\Tests\Acceptance\Frontend; | ||
|
||
use In2code\Lux\Tests\AcceptanceTester; | ||
|
||
class SimpleHomepageCest | ||
{ | ||
public function checkHomepage(AcceptanceTester $I) | ||
{ | ||
$I->amOnPage('/'); | ||
$I->see('Marketing'); | ||
} | ||
} |
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,10 @@ | ||
namespace: In2code\Lux\Tests | ||
paths: | ||
tests: Tests/Acceptance | ||
output: Tests/Acceptance/_output | ||
data: Tests/Acceptance/_data | ||
support: Tests/Acceptance/_support | ||
envs: Tests/Acceptance/_envs | ||
extensions: | ||
enabled: | ||
- Codeception\Extension\RunFailed |
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
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,37 @@ | ||
version: "3.7" | ||
|
||
services: | ||
chrome: | ||
image: seleniarm/node-chromium:4.1.2-20220227 | ||
volumes: | ||
- /dev/shm:/dev/shm | ||
depends_on: | ||
- seleniarm-hub | ||
environment: | ||
- SE_EVENT_BUS_HOST=seleniarm-hub | ||
- SE_EVENT_BUS_PUBLISH_PORT=4442 | ||
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443 | ||
ports: | ||
- ${PORT_CHROME}:5900 | ||
- ${VNC_PORT_CHROME}:5900 # for vnc | ||
|
||
firefox: | ||
image: seleniarm/node-firefox:4.1.2-20220227 | ||
volumes: | ||
- /dev/shm:/dev/shm | ||
depends_on: | ||
- seleniarm-hub | ||
environment: | ||
- SE_EVENT_BUS_HOST=seleniarm-hub | ||
- SE_EVENT_BUS_PUBLISH_PORT=4442 | ||
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443 | ||
ports: | ||
- ${PORT_FIREFOX}:5900 | ||
- ${VNC_PORT_FIREFOX}:5900 # for vnc | ||
|
||
seleniarm-hub: | ||
image: seleniarm/hub:4.1.2-20220227 | ||
ports: | ||
- ${SELENIARM_PORT_4442}:4442 | ||
- ${SELENIARM_PORT_4443}:4443 | ||
- ${SELENIARM_PORT_4444}:4444 |