Skip to content

Commit

Permalink
Fix Behat CI (#2226)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek authored Nov 21, 2024
1 parent 1c6f3a4 commit 5863090
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/test-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ jobs:
- name: "Run tests: SQLite"
run: |
php demos/_demo-data/create-db.php
vendor/bin/behat -vv --config behat.yml.dist
vendor/bin/behat --strict -vv --config behat.yml.dist
- name: "Run tests: MySQL (only for cron)"
if: (success() || failure()) && github.event_name == 'schedule'
Expand All @@ -392,7 +392,7 @@ jobs:
run: |
sed -E "s~(\\\$db = new.+Persistence\\\\Sql)\(.+\);~\\1('$DB_DSN', '$DB_USER', '$DB_PASSWORD');~g" -i demos/db.default.php
php demos/_demo-data/create-db.php
vendor/bin/behat -vv --config behat.yml.dist
vendor/bin/behat --strict -vv --config behat.yml.dist
- name: "Run tests: MariaDB (only for coverage or cron)"
if: (success() || failure()) && (env.LOG_COVERAGE || github.event_name == 'schedule')
Expand All @@ -403,7 +403,7 @@ jobs:
run: |
sed -E "s~(\\\$db = new.+Persistence\\\\Sql)\(.+\);~\\1('$DB_DSN', '$DB_USER', '$DB_PASSWORD');~g" -i demos/db.default.php
php demos/_demo-data/create-db.php
vendor/bin/behat -vv --config behat.yml.dist
vendor/bin/behat --strict -vv --config behat.yml.dist
- name: "Run tests: PostgreSQL (only for cron)"
if: (success() || failure()) && github.event_name == 'schedule'
Expand All @@ -414,7 +414,7 @@ jobs:
run: |
sed -E "s~(\\\$db = new.+Persistence\\\\Sql)\(.+\);~\\1('$DB_DSN', '$DB_USER', '$DB_PASSWORD');~g" -i demos/db.default.php
php demos/_demo-data/create-db.php
vendor/bin/behat -vv --config behat.yml.dist
vendor/bin/behat --strict -vv --config behat.yml.dist
- name: "Run tests: MSSQL (only for cron)"
if: (success() || failure()) && github.event_name == 'schedule'
Expand All @@ -425,7 +425,7 @@ jobs:
run: |
sed -E "s~(\\\$db = new.+Persistence\\\\Sql)\(.+\);~\\1('$DB_DSN', '$DB_USER', '$DB_PASSWORD');~g" -i demos/db.default.php
php demos/_demo-data/create-db.php
vendor/bin/behat -vv --config behat.yml.dist
vendor/bin/behat --strict -vv --config behat.yml.dist
- name: "Run tests: Oracle (only for cron)"
if: (success() || failure()) && github.event_name == 'schedule'
Expand All @@ -437,7 +437,7 @@ jobs:
run: |
sed -E "s~(\\\$db = new.+Persistence\\\\Sql)\(.+\);~\\1('$DB_DSN', '$DB_USER', '$DB_PASSWORD');~g" -i demos/db.default.php
php demos/_demo-data/create-db.php
vendor/bin/behat -vv --config behat.yml.dist
vendor/bin/behat --strict -vv --config behat.yml.dist
- name: Upload coverage logs 1/2 (only for coverage)
if: env.LOG_COVERAGE
Expand Down
2 changes: 1 addition & 1 deletion demos/interactive/scroll-grid-container.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
$c1 = $c->addColumn();
$g1 = Crud::addTo($c1);
$m1 = new Country($app->db);
$g1->setModel($m1);
$g1->setModel($m1, [$m1->fieldName()->name, $m1->fieldName()->iso]); // fields are filtered to fit into table for Behat, TODO remove filtering after https://github.com/atk4/ui/issues/1988
$g1->addQuickSearch([Country::hinting()->fieldName()->name, Country::hinting()->fieldName()->iso]);

// demo for additional action buttons in Crud + JsPaginator
Expand Down
4 changes: 2 additions & 2 deletions src/Behat/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ public function iScrollToBottom(): void
}

/**
* @Then ~^Toast display should contain text "((?:[^"]|\\")*)"$~
* @Then Toast display should contain text :arg1
*/
public function toastDisplayShouldContainText(string $text): void
{
Expand Down Expand Up @@ -791,7 +791,7 @@ public function noToastShouldBeDisplayed(): void
* Remove once https://github.com/Behat/MinkExtension/pull/386 and
* https://github.com/minkphp/Mink/issues/656 are fixed and released.
*
* @Then ~^PATCH MINK the (?i)url(?-i) should match "(?P<pattern>(?:[^"]|\\")*)"$~
* @Then ~^PATCH MINK the (?i)url(?-i) should match "((?:[^"]|\\")*)"$~
*/
public function assertUrlRegExp(string $pattern): void
{
Expand Down
2 changes: 1 addition & 1 deletion tests-behat/grid.feature
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Feature: Grid
Then I click paginator page "2"
Then I should see "Bahamas"
When I click using selector "//tr[td[text()='Bahamas']]//div.ui.button[text()='Say HI']"
Then Toast display should contain text "Loaded \"Bahamas\" from ID=16"
Then Toast display should contain text 'Loaded "Bahamas" from ID=16'

Scenario: Row remote action - change row CSS
Given I am on "interactive/scroll-grid-container.php"
Expand Down

0 comments on commit 5863090

Please sign in to comment.