From 2907bad78eef10d28d3bfa044705832698aa02b6 Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Thu, 19 Oct 2023 15:17:32 -0300 Subject: [PATCH 01/29] Add tests selenium. --- .github/workflows/build.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ab108d5..a1f67f9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,6 +27,13 @@ jobs: secrets: AUTH_TOKEN: ${{ secrets.AUTH_TOKEN }} with: + codeception-command: | + wget -c -nc --retry-connrefused --tries=0 https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.14.0/selenium-server-4.14.1.jar -O selenium-server-standalone.jar + nohup bash -c "java -jar selenium-server-standalone.jar -port 9515 &" && sleep 1; cat nohup.out + wget https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/118.0.5993.70/linux64/chrome-linux64.zip + unzip -o -q chrome-linux64.zip + chromedriver --port=9515 --url-base=wd/hub/ > /dev/null 2>&1& + vendor/bin/codecept run --coverage-xml os: >- ['ubuntu-latest'] php: >- From e192da85efcdfd215b9830f6ca6e88220cf795f9 Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Thu, 19 Oct 2023 15:20:19 -0300 Subject: [PATCH 02/29] Fix test 1. --- .github/workflows/build.yml | 2 +- tests/Acceptance.suite.yml | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a1f67f9..7af2b6d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,7 +29,7 @@ jobs: with: codeception-command: | wget -c -nc --retry-connrefused --tries=0 https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.14.0/selenium-server-4.14.1.jar -O selenium-server-standalone.jar - nohup bash -c "java -jar selenium-server-standalone.jar -port 9515 &" && sleep 1; cat nohup.out + java -jar selenium-server-standalone.jar -port 9515 & sleep 1; wget https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/118.0.5993.70/linux64/chrome-linux64.zip unzip -o -q chrome-linux64.zip chromedriver --port=9515 --url-base=wd/hub/ > /dev/null 2>&1& diff --git a/tests/Acceptance.suite.yml b/tests/Acceptance.suite.yml index 5b697a3..f7e2294 100644 --- a/tests/Acceptance.suite.yml +++ b/tests/Acceptance.suite.yml @@ -5,14 +5,18 @@ # If you need both WebDriver and PHPBrowser tests - create a separate suite. actor: AcceptanceTester -extensions: - enabled: - - Codeception\Extension\RunProcess: - 0: ./yii serve - sleep: 1 modules: enabled: + - Asserts - Filesystem + - WebDriver - Yii2 - - Asserts + config: + WebDriver: + url: 'http://127.0.0.1:8080/' + port: 9515 + browser: chrome + capabilities: + "goog:chromeOptions": + args: ["--headless", "--disable-gpu", "--window-size=1024,768"] step_decorators: ~ From e847d8ed2f987a5392a2331f27002bba2ca372ec Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Thu, 19 Oct 2023 15:23:27 -0300 Subject: [PATCH 03/29] Fix tests 2. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ca56a17..643bb7f 100644 --- a/composer.json +++ b/composer.json @@ -27,6 +27,7 @@ "codeception/lib-innerbrowser": "^4.0", "codeception/module-asserts": "^3.0", "codeception/module-filesystem": "^3.0", + "codeception/module-webdriver": "^4.0", "codeception/module-yii2": "^1.1", "codeception/verify": "^3.0", "maglnet/composer-require-checker": "^4.6", @@ -70,7 +71,6 @@ "codeception/c3": true, "yiisoft/yii2-composer": true, "composer/installers": true, - "hiqdev/composer-config-plugin": true, "oomphinc/composer-installers-extender": true, "yiisoft/config": true } From d4a150fc2f7fb0a2d8dae31b2986d1eed4f9ab97 Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Thu, 19 Oct 2023 15:27:04 -0300 Subject: [PATCH 04/29] Fix tests 3. --- tests/Acceptance.suite.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/Acceptance.suite.yml b/tests/Acceptance.suite.yml index f7e2294..140edb3 100644 --- a/tests/Acceptance.suite.yml +++ b/tests/Acceptance.suite.yml @@ -7,10 +7,11 @@ actor: AcceptanceTester modules: enabled: - - Asserts - - Filesystem - - WebDriver - - Yii2 + - WebDriver + - Yii2: + part: orm + entryScript: index-test.php + cleanup: false config: WebDriver: url: 'http://127.0.0.1:8080/' From 69cf08ce46607d471081a8bc0143b6fcdffb7210 Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Thu, 19 Oct 2023 15:33:30 -0300 Subject: [PATCH 05/29] Fix tests 4. --- public/index.php | 2 +- tests/Acceptance.suite.yml | 34 +++++++++++++++++++--------------- tests/Functional.suite.yml | 8 ++++---- tests/Unit.suite.yml | 8 ++++---- 4 files changed, 28 insertions(+), 24 deletions(-) diff --git a/public/index.php b/public/index.php index a623165..9556eea 100644 --- a/public/index.php +++ b/public/index.php @@ -12,7 +12,7 @@ if (getenv('YII_ENV')) { defined('YII_ENV') or define('YII_ENV', getenv('YII_ENV')); } else { - defined('YII_ENV') or define('YII_ENV', 'dev'); + defined('YII_ENV') or define('YII_ENV', 'prod'); } if (getenv('YII_C3')) { diff --git a/tests/Acceptance.suite.yml b/tests/Acceptance.suite.yml index 140edb3..150599a 100644 --- a/tests/Acceptance.suite.yml +++ b/tests/Acceptance.suite.yml @@ -3,21 +3,25 @@ # Suite for acceptance tests. # Perform tests in browser using the WebDriver or PhpBrowser. # If you need both WebDriver and PHPBrowser tests - create a separate suite. - actor: AcceptanceTester +extensions: + enabled: + - Codeception\Extension\RunProcess: + 0: ./yii serve + sleep: 1 modules: - enabled: - - WebDriver - - Yii2: - part: orm - entryScript: index-test.php - cleanup: false - config: - WebDriver: - url: 'http://127.0.0.1:8080/' - port: 9515 - browser: chrome - capabilities: - "goog:chromeOptions": - args: ["--headless", "--disable-gpu", "--window-size=1024,768"] + enabled: + - WebDriver + - Yii2: + part: orm + entryScript: index.php + cleanup: false + config: + WebDriver: + url: 'http://127.0.0.1:8080/' + port: 9515 + browser: chrome + capabilities: + "goog:chromeOptions": + args: ["--headless", "--disable-gpu", "--window-size=1024,768"] step_decorators: ~ diff --git a/tests/Functional.suite.yml b/tests/Functional.suite.yml index 3e33c70..7d5ef82 100644 --- a/tests/Functional.suite.yml +++ b/tests/Functional.suite.yml @@ -6,8 +6,8 @@ # Remove this suite if you don't use frameworks actor: FunctionalTester modules: - enabled: - - Filesystem - - Yii2 - - Asserts + enabled: + - Filesystem + - Yii2 + - Asserts step_decorators: ~ diff --git a/tests/Unit.suite.yml b/tests/Unit.suite.yml index b1b434e..b72723a 100644 --- a/tests/Unit.suite.yml +++ b/tests/Unit.suite.yml @@ -3,8 +3,8 @@ # Suite for unit or integration tests. actor: UnitTester modules: - enabled: - - Asserts - - Yii2: - part: [orm, email, fixtures] + enabled: + - Asserts + - Yii2: + part: [orm, email, fixtures] step_decorators: ~ From 2105e23adf6f5a9f273f4709c8fa8fc53cd60740 Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Thu, 19 Oct 2023 15:35:10 -0300 Subject: [PATCH 06/29] fix tests 5. --- tests/Acceptance.suite.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/Acceptance.suite.yml b/tests/Acceptance.suite.yml index 150599a..8ccc3d2 100644 --- a/tests/Acceptance.suite.yml +++ b/tests/Acceptance.suite.yml @@ -12,10 +12,6 @@ extensions: modules: enabled: - WebDriver - - Yii2: - part: orm - entryScript: index.php - cleanup: false config: WebDriver: url: 'http://127.0.0.1:8080/' From c825d053392c5aab68b0f0918f875c9594a942b3 Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Thu, 19 Oct 2023 15:39:32 -0300 Subject: [PATCH 07/29] fix tests 6. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7af2b6d..55987d6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,7 +33,7 @@ jobs: wget https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/118.0.5993.70/linux64/chrome-linux64.zip unzip -o -q chrome-linux64.zip chromedriver --port=9515 --url-base=wd/hub/ > /dev/null 2>&1& - vendor/bin/codecept run --coverage-xml + YII_C3=true vendor/bin/codecept run --coverage-xml os: >- ['ubuntu-latest'] php: >- From 53c13fe8baf30ac965bb9677d17a7e167fef0842 Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Thu, 19 Oct 2023 15:43:25 -0300 Subject: [PATCH 08/29] fix tests 7. --- .github/workflows/build.yml | 2 +- tests/Acceptance.suite.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 55987d6..542b115 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,7 +33,7 @@ jobs: wget https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/118.0.5993.70/linux64/chrome-linux64.zip unzip -o -q chrome-linux64.zip chromedriver --port=9515 --url-base=wd/hub/ > /dev/null 2>&1& - YII_C3=true vendor/bin/codecept run --coverage-xml + vendor/bin/codecept run os: >- ['ubuntu-latest'] php: >- diff --git a/tests/Acceptance.suite.yml b/tests/Acceptance.suite.yml index 8ccc3d2..1cda1cc 100644 --- a/tests/Acceptance.suite.yml +++ b/tests/Acceptance.suite.yml @@ -7,7 +7,7 @@ actor: AcceptanceTester extensions: enabled: - Codeception\Extension\RunProcess: - 0: ./yii serve + 0: YII_C3=true ./yii serve sleep: 1 modules: enabled: From 34ef57a51082ebe8800b2489566ae9be9e6a230f Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Thu, 19 Oct 2023 15:45:30 -0300 Subject: [PATCH 09/29] Fix tests 8. --- tests/Acceptance.suite.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/Acceptance.suite.yml b/tests/Acceptance.suite.yml index 1cda1cc..4149dec 100644 --- a/tests/Acceptance.suite.yml +++ b/tests/Acceptance.suite.yml @@ -13,11 +13,11 @@ modules: enabled: - WebDriver config: - WebDriver: - url: 'http://127.0.0.1:8080/' - port: 9515 - browser: chrome - capabilities: - "goog:chromeOptions": - args: ["--headless", "--disable-gpu", "--window-size=1024,768"] + WebDriver: + url: 'http://127.0.0.1:8080/' + port: 9515 + browser: chrome + capabilities: + "goog:chromeOptions": + args: ["--headless", "--disable-gpu", "--window-size=1024,768"] step_decorators: ~ From ef849ff078ba014b1733e46097ae1befb2fc7cb8 Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Thu, 19 Oct 2023 15:52:04 -0300 Subject: [PATCH 10/29] Fix tests 9. --- .github/workflows/build.yml | 39 +++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 542b115..1e4dd6b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,18 +23,27 @@ name: build jobs: codeception: - uses: php-forge/actions/.github/workflows/codeception.yml@main - secrets: - AUTH_TOKEN: ${{ secrets.AUTH_TOKEN }} - with: - codeception-command: | - wget -c -nc --retry-connrefused --tries=0 https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.14.0/selenium-server-4.14.1.jar -O selenium-server-standalone.jar - java -jar selenium-server-standalone.jar -port 9515 & sleep 1; - wget https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/118.0.5993.70/linux64/chrome-linux64.zip - unzip -o -q chrome-linux64.zip - chromedriver --port=9515 --url-base=wd/hub/ > /dev/null 2>&1& - vendor/bin/codecept run - os: >- - ['ubuntu-latest'] - php: >- - ['8.1', '8.2', '8.3'] + runs-on: ubuntu-latest + services: + chrome: + image: selenium/standalone-chrome:latest + ports: + - 9515:9515 + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install dependencies + run: composer install + + - name: Download and configure Selenium and Chrome + run: | + wget -c -nc --retry-connrefused --tries=0 https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.1.1/selenium-server-4.1.1.jar -O selenium-server-standalone.jar + java -jar selenium-server-standalone.jar -port 9515 & sleep 1; + wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb + sudo apt-get update + sudo apt-get install ./google-chrome-stable_current_amd64.deb -y + sudo apt-get install -yqq unzip + + - name: Run Codeception + run: vendor/bin/codecept run From f07aa51f92f13f27780115089326de5d9f82ff02 Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Thu, 19 Oct 2023 15:53:47 -0300 Subject: [PATCH 11/29] fix tests 10. --- composer.lock | 220 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 148 insertions(+), 72 deletions(-) diff --git a/composer.lock b/composer.lock index 0597ba2..3b30141 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "3b59bd62c5a08b27ca48c205b3fca3be", + "content-hash": "857a1ac1f96f0dd54ae26a4ce2347ea0", "packages": [ { "name": "bower-asset/bootstrap", @@ -23,16 +23,16 @@ }, { "name": "bower-asset/inputmask", - "version": "3.3.11", + "version": "5.0.8", "source": { "type": "git", "url": "https://github.com/RobinHerbots/Inputmask.git", - "reference": "5e670ad62f50c738388d4dcec78d2888505ad77b" + "reference": "e0f39e0c93569c6b494c3a57edef2c59313a6b64" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/RobinHerbots/Inputmask/zipball/5e670ad62f50c738388d4dcec78d2888505ad77b", - "reference": "5e670ad62f50c738388d4dcec78d2888505ad77b" + "url": "https://api.github.com/repos/RobinHerbots/Inputmask/zipball/e0f39e0c93569c6b494c3a57edef2c59313a6b64", + "reference": "e0f39e0c93569c6b494c3a57edef2c59313a6b64" }, "require": { "bower-asset/jquery": ">=1.7" @@ -62,16 +62,16 @@ }, { "name": "bower-asset/punycode", - "version": "v1.3.2", + "version": "v2.2.3", "source": { "type": "git", "url": "https://github.com/mathiasbynens/punycode.js.git", - "reference": "38c8d3131a82567bfef18da09f7f4db68c84f8a3" + "reference": "46d412120e2feb868876769a9847790ba278c882" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mathiasbynens/punycode.js/zipball/38c8d3131a82567bfef18da09f7f4db68c84f8a3", - "reference": "38c8d3131a82567bfef18da09f7f4db68c84f8a3" + "url": "https://api.github.com/repos/mathiasbynens/punycode.js/zipball/46d412120e2feb868876769a9847790ba278c882", + "reference": "46d412120e2feb868876769a9847790ba278c882" }, "type": "bower-asset" }, @@ -579,56 +579,6 @@ }, "time": "2021-12-15T12:32:42+00:00" }, - { - "name": "paragonie/random_compat", - "version": "v9.99.100", - "source": { - "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a", - "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a", - "shasum": "" - }, - "require": { - "php": ">= 7" - }, - "require-dev": { - "phpunit/phpunit": "4.*|5.*", - "vimeo/psalm": "^1" - }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." - }, - "type": "library", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": [ - "csprng", - "polyfill", - "pseudorandom", - "random" - ], - "support": { - "email": "info@paragonie.com", - "issues": "https://github.com/paragonie/random_compat/issues", - "source": "https://github.com/paragonie/random_compat" - }, - "time": "2020-10-15T08:29:30+00:00" - }, { "name": "psr/container", "version": "2.0.2", @@ -1908,25 +1858,24 @@ "source": { "type": "git", "url": "https://github.com/yiisoft/yii2-framework.git", - "reference": "ab8a9feda3b3fdf5c28c3b5f53bcc7bd85a8af2c" + "reference": "9a4561aceb7710beb0bb817a862624a385d3d276" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yiisoft/yii2-framework/zipball/ab8a9feda3b3fdf5c28c3b5f53bcc7bd85a8af2c", - "reference": "ab8a9feda3b3fdf5c28c3b5f53bcc7bd85a8af2c", + "url": "https://api.github.com/repos/yiisoft/yii2-framework/zipball/9a4561aceb7710beb0bb817a862624a385d3d276", + "reference": "9a4561aceb7710beb0bb817a862624a385d3d276", "shasum": "" }, "require": { - "bower-asset/inputmask": "~3.2.2 | ~3.3.5", + "bower-asset/inputmask": "^5.0.8 ", "bower-asset/jquery": "3.7.*@stable | 3.6.*@stable | 3.5.*@stable | 3.4.*@stable | 3.3.*@stable | 3.2.*@stable | 3.1.*@stable | 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable", - "bower-asset/punycode": "1.3.*", + "bower-asset/punycode": "^2.2", "bower-asset/yii2-pjax": "~2.0.1", "cebe/markdown": "~1.0.0 | ~1.1.0 | ~1.2.0", "ext-ctype": "*", "ext-mbstring": "*", "ezyang/htmlpurifier": "^4.6", "lib-pcre": "*", - "paragonie/random_compat": ">=1", "php": ">=8.1", "yiisoft/yii2-composer": "~2.0.4" }, @@ -2022,7 +1971,7 @@ "type": "tidelift" } ], - "time": "2023-09-30T11:52:51+00:00" + "time": "2023-10-19T17:21:07+00:00" }, { "name": "yiisoft/yii2-bootstrap5", @@ -2773,6 +2722,67 @@ }, "time": "2022-03-14T18:48:55+00:00" }, + { + "name": "codeception/module-webdriver", + "version": "4.0.0", + "source": { + "type": "git", + "url": "https://github.com/Codeception/module-webdriver.git", + "reference": "c092fa4f686381d0621407c0136d608c2b419b85" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Codeception/module-webdriver/zipball/c092fa4f686381d0621407c0136d608c2b419b85", + "reference": "c092fa4f686381d0621407c0136d608c2b419b85", + "shasum": "" + }, + "require": { + "codeception/codeception": "^5.0.8", + "codeception/lib-web": "^1.0.1", + "codeception/stub": "^4.0", + "ext-json": "*", + "ext-mbstring": "*", + "php": "^8.1", + "php-webdriver/webdriver": "^1.8.0", + "phpunit/phpunit": "^10.0" + }, + "suggest": { + "codeception/phpbuiltinserver": "Start and stop PHP built-in web server for your tests" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Bodnarchuk" + }, + { + "name": "Gintautas Miselis" + }, + { + "name": "Zaahid Bateson" + } + ], + "description": "WebDriver module for Codeception", + "homepage": "https://codeception.com/", + "keywords": [ + "acceptance-testing", + "browser-testing", + "codeception" + ], + "support": { + "issues": "https://github.com/Codeception/module-webdriver/issues", + "source": "https://github.com/Codeception/module-webdriver/tree/4.0.0" + }, + "time": "2023-02-03T21:52:27+00:00" + }, { "name": "codeception/module-yii2", "version": "1.1.9", @@ -3412,6 +3422,72 @@ }, "time": "2022-02-21T01:04:05+00:00" }, + { + "name": "php-webdriver/webdriver", + "version": "1.15.0", + "source": { + "type": "git", + "url": "https://github.com/php-webdriver/php-webdriver.git", + "reference": "a1578689290055586f1ee51eaf0ec9d52895bb6d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-webdriver/php-webdriver/zipball/a1578689290055586f1ee51eaf0ec9d52895bb6d", + "reference": "a1578689290055586f1ee51eaf0ec9d52895bb6d", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-json": "*", + "ext-zip": "*", + "php": "^7.3 || ^8.0", + "symfony/polyfill-mbstring": "^1.12", + "symfony/process": "^5.0 || ^6.0" + }, + "replace": { + "facebook/webdriver": "*" + }, + "require-dev": { + "ergebnis/composer-normalize": "^2.20.0", + "ondram/ci-detector": "^4.0", + "php-coveralls/php-coveralls": "^2.4", + "php-mock/php-mock-phpunit": "^2.0", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpunit/phpunit": "^9.3", + "squizlabs/php_codesniffer": "^3.5", + "symfony/var-dumper": "^5.0 || ^6.0" + }, + "suggest": { + "ext-SimpleXML": "For Firefox profile creation" + }, + "type": "library", + "autoload": { + "files": [ + "lib/Exception/TimeoutException.php" + ], + "psr-4": { + "Facebook\\WebDriver\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A PHP client for Selenium WebDriver. Previously facebook/webdriver.", + "homepage": "https://github.com/php-webdriver/php-webdriver", + "keywords": [ + "Chromedriver", + "geckodriver", + "php", + "selenium", + "webdriver" + ], + "support": { + "issues": "https://github.com/php-webdriver/php-webdriver/issues", + "source": "https://github.com/php-webdriver/php-webdriver/tree/1.15.0" + }, + "time": "2023-08-29T13:52:26+00:00" + }, { "name": "phpspec/php-diff", "version": "v1.1.3", @@ -3455,16 +3531,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.10.38", + "version": "1.10.39", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "5302bb402c57f00fb3c2c015bac86e0827e4b691" + "reference": "d9dedb0413f678b4d03cbc2279a48f91592c97c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/5302bb402c57f00fb3c2c015bac86e0827e4b691", - "reference": "5302bb402c57f00fb3c2c015bac86e0827e4b691", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d9dedb0413f678b4d03cbc2279a48f91592c97c4", + "reference": "d9dedb0413f678b4d03cbc2279a48f91592c97c4", "shasum": "" }, "require": { @@ -3513,7 +3589,7 @@ "type": "tidelift" } ], - "time": "2023-10-06T14:19:14+00:00" + "time": "2023-10-17T15:46:26+00:00" }, { "name": "phpunit/php-code-coverage", @@ -6251,5 +6327,5 @@ "php": ">=8.1" }, "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } From 7e5f953c2410b27a2bb3ff34fe822efa410aa9a7 Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Thu, 19 Oct 2023 15:56:11 -0300 Subject: [PATCH 12/29] Fix tests 11. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1e4dd6b..29f94dc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,7 +38,7 @@ jobs: - name: Download and configure Selenium and Chrome run: | - wget -c -nc --retry-connrefused --tries=0 https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.1.1/selenium-server-4.1.1.jar -O selenium-server-standalone.jar + wget -c -nc --retry-connrefused --tries=0 https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.14.0/selenium-server-4.14.1.jar -O selenium-server-standalone.jar java -jar selenium-server-standalone.jar -port 9515 & sleep 1; wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb sudo apt-get update From d0aa83de9cffc2ad92c7e3d70f14938003c79c50 Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Thu, 19 Oct 2023 16:00:54 -0300 Subject: [PATCH 13/29] Fix tests 12. --- .github/workflows/build.yml | 4 +++- tests/Acceptance.suite.yml | 5 ----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 29f94dc..3a79acb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,4 +46,6 @@ jobs: sudo apt-get install -yqq unzip - name: Run Codeception - run: vendor/bin/codecept run + run: | + php -S 127.0.0.1:8080 -t public > /dev/null 2>&1& + vendor/bin/codecept run diff --git a/tests/Acceptance.suite.yml b/tests/Acceptance.suite.yml index 4149dec..c50cb69 100644 --- a/tests/Acceptance.suite.yml +++ b/tests/Acceptance.suite.yml @@ -4,11 +4,6 @@ # Perform tests in browser using the WebDriver or PhpBrowser. # If you need both WebDriver and PHPBrowser tests - create a separate suite. actor: AcceptanceTester -extensions: - enabled: - - Codeception\Extension\RunProcess: - 0: YII_C3=true ./yii serve - sleep: 1 modules: enabled: - WebDriver From e576b3f8cfd9cd37792ca86092859e3a8b8894b8 Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Thu, 19 Oct 2023 16:04:44 -0300 Subject: [PATCH 14/29] Fix tests 12. --- tests/Acceptance.suite.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/Acceptance.suite.yml b/tests/Acceptance.suite.yml index c50cb69..5d55eea 100644 --- a/tests/Acceptance.suite.yml +++ b/tests/Acceptance.suite.yml @@ -11,8 +11,6 @@ modules: WebDriver: url: 'http://127.0.0.1:8080/' port: 9515 - browser: chrome - capabilities: - "goog:chromeOptions": - args: ["--headless", "--disable-gpu", "--window-size=1024,768"] + browser: chrome # 'chrome' or 'firefox' + window_size: maximize step_decorators: ~ From ea22986064adef400fce10507251245de9abd8a3 Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Thu, 19 Oct 2023 16:09:41 -0300 Subject: [PATCH 15/29] Fix tests 14. --- .github/workflows/build.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3a79acb..4a5720a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,11 +24,6 @@ name: build jobs: codeception: runs-on: ubuntu-latest - services: - chrome: - image: selenium/standalone-chrome:latest - ports: - - 9515:9515 steps: - name: Checkout code uses: actions/checkout@v2 @@ -40,10 +35,9 @@ jobs: run: | wget -c -nc --retry-connrefused --tries=0 https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.14.0/selenium-server-4.14.1.jar -O selenium-server-standalone.jar java -jar selenium-server-standalone.jar -port 9515 & sleep 1; - wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb - sudo apt-get update - sudo apt-get install ./google-chrome-stable_current_amd64.deb -y - sudo apt-get install -yqq unzip + wget https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/118.0.5993.70/linux64/chrome-linux64.zip + unzip -o -q chrome-linux64.zip + chromedriver --port=9515 --url-base=wd/hub/ > /dev/null 2>&1& - name: Run Codeception run: | From 1f20d8ed9a391e6713540e699d421b356a16063e Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Thu, 19 Oct 2023 16:12:41 -0300 Subject: [PATCH 16/29] Fix tests 15. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4a5720a..8fc1cec 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,7 +36,7 @@ jobs: wget -c -nc --retry-connrefused --tries=0 https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.14.0/selenium-server-4.14.1.jar -O selenium-server-standalone.jar java -jar selenium-server-standalone.jar -port 9515 & sleep 1; wget https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/118.0.5993.70/linux64/chrome-linux64.zip - unzip -o -q chrome-linux64.zip + tar -xvf chrome-linux64.zip chromedriver --port=9515 --url-base=wd/hub/ > /dev/null 2>&1& - name: Run Codeception From 8f69e33f024db6a07bdd5b16118fdc0322ceef0d Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Thu, 19 Oct 2023 16:15:32 -0300 Subject: [PATCH 17/29] Fix tests 16. --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8fc1cec..93d8255 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,7 +36,8 @@ jobs: wget -c -nc --retry-connrefused --tries=0 https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.14.0/selenium-server-4.14.1.jar -O selenium-server-standalone.jar java -jar selenium-server-standalone.jar -port 9515 & sleep 1; wget https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/118.0.5993.70/linux64/chrome-linux64.zip - tar -xvf chrome-linux64.zip + sudo apt-get install unzip + unzip -o -q chrome-linux64.zip chromedriver --port=9515 --url-base=wd/hub/ > /dev/null 2>&1& - name: Run Codeception From 2f56fff5b006373425e3efc52799555e4c70b476 Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Thu, 19 Oct 2023 16:21:06 -0300 Subject: [PATCH 18/29] Fix tests 17. --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 93d8255..12ddcd5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,9 +35,9 @@ jobs: run: | wget -c -nc --retry-connrefused --tries=0 https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.14.0/selenium-server-4.14.1.jar -O selenium-server-standalone.jar java -jar selenium-server-standalone.jar -port 9515 & sleep 1; - wget https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/118.0.5993.70/linux64/chrome-linux64.zip + wget https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/118.0.5993.88/linux64/chromedriver-linux64.zip sudo apt-get install unzip - unzip -o -q chrome-linux64.zip + unzip -o -q chromedriver-linux64.zip chromedriver --port=9515 --url-base=wd/hub/ > /dev/null 2>&1& - name: Run Codeception From b56df921c59316de2e3424781a45b916e1d228bb Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Thu, 19 Oct 2023 16:23:02 -0300 Subject: [PATCH 19/29] Fix tests 19. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 12ddcd5..5c96aa4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,7 +38,7 @@ jobs: wget https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/118.0.5993.88/linux64/chromedriver-linux64.zip sudo apt-get install unzip unzip -o -q chromedriver-linux64.zip - chromedriver --port=9515 --url-base=wd/hub/ > /dev/null 2>&1& + cd chromedriver-linux64 && chromedriver --port=9515 --url-base=wd/hub/ > /dev/null 2>&1& && cd .. - name: Run Codeception run: | From 949f920e97a968ee91f205aaac99b2e4ecb90838 Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Thu, 19 Oct 2023 16:24:43 -0300 Subject: [PATCH 20/29] Fix tests 20. --- .github/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5c96aa4..c595346 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,7 +38,9 @@ jobs: wget https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/118.0.5993.88/linux64/chromedriver-linux64.zip sudo apt-get install unzip unzip -o -q chromedriver-linux64.zip - cd chromedriver-linux64 && chromedriver --port=9515 --url-base=wd/hub/ > /dev/null 2>&1& && cd .. + cd chromedriver-linux64 + chromedriver --port=9515 --url-base=wd/hub/ > /dev/null 2>&1& + cd .. - name: Run Codeception run: | From 6ebf9084e62832e8f2181fd9940003df584f782c Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Thu, 19 Oct 2023 16:30:09 -0300 Subject: [PATCH 21/29] Fix tests 21. --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c595346..01cb3b9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,6 +41,7 @@ jobs: cd chromedriver-linux64 chromedriver --port=9515 --url-base=wd/hub/ > /dev/null 2>&1& cd .. + echo google-chrome --product-version - name: Run Codeception run: | From 3af08c20d5bb06391dae8979be7a2070cb609ec1 Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Thu, 19 Oct 2023 16:31:24 -0300 Subject: [PATCH 22/29] Fix tests 22. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 01cb3b9..5b9091b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,7 +41,7 @@ jobs: cd chromedriver-linux64 chromedriver --port=9515 --url-base=wd/hub/ > /dev/null 2>&1& cd .. - echo google-chrome --product-version + google-chrome --product-version - name: Run Codeception run: | From d88d3e3b286b602d21bed8142281c953934dcf59 Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Thu, 19 Oct 2023 16:38:05 -0300 Subject: [PATCH 23/29] fix tests 23. --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5b9091b..3e4f219 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,7 +34,8 @@ jobs: - name: Download and configure Selenium and Chrome run: | wget -c -nc --retry-connrefused --tries=0 https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.14.0/selenium-server-4.14.1.jar -O selenium-server-standalone.jar - java -jar selenium-server-standalone.jar -port 9515 & sleep 1; + sudo apt-get install coreutils + nohup bash -c "java -jar selenium-server-standalone.jar -port 9515 &" && sleep 1; cat nohup.out wget https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/118.0.5993.88/linux64/chromedriver-linux64.zip sudo apt-get install unzip unzip -o -q chromedriver-linux64.zip From 41efe9852da1d2dc5305006f3135b8b17c7257fc Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Thu, 19 Oct 2023 16:40:15 -0300 Subject: [PATCH 24/29] Fix tests 25. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3e4f219..f042784 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,7 +35,7 @@ jobs: run: | wget -c -nc --retry-connrefused --tries=0 https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.14.0/selenium-server-4.14.1.jar -O selenium-server-standalone.jar sudo apt-get install coreutils - nohup bash -c "java -jar selenium-server-standalone.jar -port 9515 &" && sleep 1; cat nohup.out + nohup bash -c "java -jar selenium-server-standalone.jar standalone -port 9515 &" && sleep 1; cat nohup.out wget https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/118.0.5993.88/linux64/chromedriver-linux64.zip sudo apt-get install unzip unzip -o -q chromedriver-linux64.zip From 796c2f7a2505ad8c5eb8d0cb956c8f48cc8dfbc1 Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Thu, 19 Oct 2023 16:42:15 -0300 Subject: [PATCH 25/29] fix tests 26. --- .github/workflows/build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f042784..868002e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,8 +34,7 @@ jobs: - name: Download and configure Selenium and Chrome run: | wget -c -nc --retry-connrefused --tries=0 https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.14.0/selenium-server-4.14.1.jar -O selenium-server-standalone.jar - sudo apt-get install coreutils - nohup bash -c "java -jar selenium-server-standalone.jar standalone -port 9515 &" && sleep 1; cat nohup.out + java -jar selenium-server-standalone.jar standalone -port 9515 &" && sleep 1; wget https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/118.0.5993.88/linux64/chromedriver-linux64.zip sudo apt-get install unzip unzip -o -q chromedriver-linux64.zip From a3f4fc0aefb9e34f98afe02bee71e2f9fb5001cd Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Thu, 19 Oct 2023 16:43:37 -0300 Subject: [PATCH 26/29] fix tests 27. --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 868002e..b416b83 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,7 +34,8 @@ jobs: - name: Download and configure Selenium and Chrome run: | wget -c -nc --retry-connrefused --tries=0 https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.14.0/selenium-server-4.14.1.jar -O selenium-server-standalone.jar - java -jar selenium-server-standalone.jar standalone -port 9515 &" && sleep 1; + java -jar selenium-server-standalone.jar standalone -port 9515 + sleep 5 wget https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/118.0.5993.88/linux64/chromedriver-linux64.zip sudo apt-get install unzip unzip -o -q chromedriver-linux64.zip From 81325175a8dce9e169458efb47608f30262c5308 Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Thu, 19 Oct 2023 16:45:09 -0300 Subject: [PATCH 27/29] Fix tests 28. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b416b83..17d2e6a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,7 +34,7 @@ jobs: - name: Download and configure Selenium and Chrome run: | wget -c -nc --retry-connrefused --tries=0 https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.14.0/selenium-server-4.14.1.jar -O selenium-server-standalone.jar - java -jar selenium-server-standalone.jar standalone -port 9515 + java -jar selenium-server-standalone.jar standalone --port 9515 sleep 5 wget https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/118.0.5993.88/linux64/chromedriver-linux64.zip sudo apt-get install unzip From a6381a8c7b23396998de48f5655f0ba4b56c769d Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Thu, 19 Oct 2023 16:47:42 -0300 Subject: [PATCH 28/29] Fix tests 29. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 17d2e6a..1e85008 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,7 +35,7 @@ jobs: run: | wget -c -nc --retry-connrefused --tries=0 https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.14.0/selenium-server-4.14.1.jar -O selenium-server-standalone.jar java -jar selenium-server-standalone.jar standalone --port 9515 - sleep 5 + sleep 1 wget https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/118.0.5993.88/linux64/chromedriver-linux64.zip sudo apt-get install unzip unzip -o -q chromedriver-linux64.zip From a698d855eaabe27c2fee6504f326549a19cccd24 Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Thu, 19 Oct 2023 16:52:07 -0300 Subject: [PATCH 29/29] Fix tests 30. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1e85008..9991221 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,7 +34,7 @@ jobs: - name: Download and configure Selenium and Chrome run: | wget -c -nc --retry-connrefused --tries=0 https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.14.0/selenium-server-4.14.1.jar -O selenium-server-standalone.jar - java -jar selenium-server-standalone.jar standalone --port 9515 + java -jar selenium-server-standalone.jar standalone --port 9515 > /dev/null 2>&1& sleep 1 wget https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/118.0.5993.88/linux64/chromedriver-linux64.zip sudo apt-get install unzip