-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow opening via click on any [data-cookieman-show]
Fixes: #205
- Loading branch information
1 parent
1b5e2b8
commit 8b14085
Showing
6 changed files
with
101 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
page.5 = TEXT | ||
page.5.value = <button data-cookieman-show>Example button: Adjust your cookie preferences</button> |
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
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,51 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the package dmind/cookieman. | ||
* | ||
* For the full copyright and license information, please read the | ||
* LICENSE file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Dmind\Cookieman\Tests\Acceptance\Frontend; | ||
|
||
/* | ||
* This file is part of the TYPO3 CMS project. | ||
* | ||
* It is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU General Public License, either version 2 | ||
* of the License, or any later version. | ||
* | ||
* For the full copyright and license information, please read the | ||
* LICENSE.txt file that was distributed with this source code. | ||
* | ||
* The TYPO3 project - inspiring people to share! | ||
*/ | ||
|
||
use Codeception\Util\Locator; | ||
use Dmind\Cookieman\Tests\Acceptance\Support\AcceptanceTester; | ||
use Exception; | ||
|
||
/** | ||
* Tests opening the popup | ||
*/ | ||
class OpenPopupCest | ||
{ | ||
public const PATH_imprint = '/imprint'; | ||
public const SELECTOR_modal = '#cookieman-modal'; | ||
public const SELECTOR_btnDataCookiemanShow = '[data-cookieman-show]'; | ||
|
||
/** | ||
* @param AcceptanceTester $I | ||
* @throws Exception | ||
*/ | ||
public function openViaClickOnDataCookiemanShowElement(AcceptanceTester $I) | ||
{ | ||
$I->amOnPage(self::PATH_imprint); | ||
$I->waitForJS('return typeof cookieman === "object"', 10); | ||
$I->clickWithLeftButton(['css' => self::SELECTOR_btnDataCookiemanShow]); | ||
$I->waitForElementVisible(self::SELECTOR_modal); | ||
} | ||
} |