Skip to content

Commit

Permalink
[TASK] Add first test in backend
Browse files Browse the repository at this point in the history
  • Loading branch information
einpraegsam committed Dec 20, 2024
1 parent dd1ed11 commit ad61cc5
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 2 deletions.
15 changes: 15 additions & 0 deletions Tests/Acceptance/_support/Helper/BackendTester.php
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');
}
}
1 change: 1 addition & 0 deletions Tests/Acceptance/acceptance.suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ modules:
acceptInsecureCerts: true
'goog:chromeOptions':
args: ["--no-sandbox", "--headless", "--disable-gpu", "--ignore-certificate-errors"]
- \In2code\Lux\Tests\Helper\BackendTester
step_decorators: ~
21 changes: 21 additions & 0 deletions Tests/Acceptance/acceptance/Backend/BackendLoginCest.php
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');
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace In2code\Lux\Tests\Acceptance;
namespace In2code\Lux\Tests\Acceptance\Frontend;

use In2code\Lux\Tests\AcceptanceTester;

class FirstCest
class SimpleHomepageCest
{
public function checkHomepage(AcceptanceTester $I)
{
Expand Down

0 comments on commit ad61cc5

Please sign in to comment.