Skip to content

Commit

Permalink
Release 2.4.5
Browse files Browse the repository at this point in the history
  • Loading branch information
nenes25 committed Feb 15, 2024
1 parent 0e160d8 commit 0f99034
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 29 deletions.
4 changes: 2 additions & 2 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/**
* Module Captcha
* Add (re)captcha on contact and account creation forms
* © Hervé Hennes 2013-2023
* © Hervé Hennes 2013-2024
* https://github.com/nenes25/eicaptcha
* https://www.h-hennes.fr/blog/
*/
- V 2.4.5 - 2023-04-XX #229 Replace override of Authcontroller
- V 2.4.5 - 2024-02-15 #229 Replace override of Authcontroller
#247 Registration check on prestashop 8.x
#221 recaptcha v3 doesn't validate in form added with elementor form builder of warehouse theme
#218 Harmonize and fix licence headers
Expand Down
15 changes: 8 additions & 7 deletions eicaptcha.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,16 +195,17 @@ public function hookHeader(array $params)
protected function renderHeaderV2()
{
if ((
$this->context->controller instanceof AuthController
&& Configuration::get('CAPTCHA_ENABLE_ACCOUNT') == 1
(
$this->context->controller instanceof AuthController
|| $this->context->controller instanceof RegistrationController
)
&& Configuration::get('CAPTCHA_ENABLE_ACCOUNT') == 1
)
||
(
($this->context->controller instanceof ContactController
|| Configuration::get('CAPTCHA_LOAD_EVERYWHERE') == 1
)
&& Configuration::get('CAPTCHA_ENABLE_CONTACT') == 1
)
|| Configuration::get('CAPTCHA_LOAD_EVERYWHERE') == 1
) {
$this->context->controller->registerStylesheet(
'module-eicaptcha',
Expand Down Expand Up @@ -247,9 +248,9 @@ public function renderHeaderV3()
{
if (
($this->context->controller instanceof ContactController
|| Configuration::get('CAPTCHA_LOAD_EVERYWHERE') == 1
&& Configuration::get('CAPTCHA_ENABLE_CONTACT') == 1
)
&& Configuration::get('CAPTCHA_ENABLE_CONTACT') == 1
|| Configuration::get('CAPTCHA_LOAD_EVERYWHERE') == 1
) {
$publicKey = Configuration::get('CAPTCHA_PUBLIC_KEY');
$js = '
Expand Down
3 changes: 2 additions & 1 deletion tests/functionnal/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules/
/node_modules/
/test-results/
/playwright-report/
/playwright/.cache/
/.env
71 changes: 56 additions & 15 deletions tests/functionnal/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions tests/functionnal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@
"license": "ISC",
"devDependencies": {
"@playwright/test": "^1.32.3"
},
"dependencies": {
"dotenv": "^16.3.1"
}
}
9 changes: 5 additions & 4 deletions tests/functionnal/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,23 @@ import { defineConfig, devices } from '@playwright/test';
* Read environment variables from file.
* https://github.com/motdotla/dotenv
*/
// require('dotenv').config();
require('dotenv').config();

/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: './e2e',
fullyParallel: true,
fullyParallel: false,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
workers: 1,
reporter: 'html',
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
baseURL: 'http://www.prestashop74.local/tests/1786/', // Will need to be replaced by a CI or a local url to test
baseURL: process.env.CI_ENVIRONMENT_URL, // Will need to be replaced by a CI or a local url to test
trace: 'on-first-retry',
screenshot: 'only-on-failure',
},
/* Configure projects for major browsers */
projects: [
Expand Down

0 comments on commit 0f99034

Please sign in to comment.