Skip to content

Commit

Permalink
Merge branch '8.x' into develop
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Jan 24, 2025
2 parents 9c7cac7 + 7d4d414 commit 7654f01
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 28 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/browser-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,16 @@ jobs:
matrix:
php: [8.1, 8.2, 8.3]
laravel: [10, 11]
phpunit: [10.5, '11.0']
phpunit: [10.5, 11]
include:
- php: 8.4
laravel: 11
phpunit: 11.3
exclude:
- php: 8.1
laravel: 11
- laravel: 10
phpunit: '11.0'
phpunit: 11

name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - PHPUnit ${{ matrix.phpunit }}

Expand All @@ -44,7 +48,7 @@ jobs:

- name: Install dependencies
run: |
composer update --prefer-dist --no-interaction --no-progress --with=illuminate/support:^${{ matrix.laravel }} --with=phpunit/phpunit:^${{ matrix.phpunit }}
composer update --prefer-dist --no-interaction --no-progress --with=laravel/framework:^${{ matrix.laravel }} --with=phpunit/phpunit:^${{ matrix.phpunit }}
- name: Upgrade Chrome Driver
run: php vendor/bin/testbench dusk:chrome-driver --detect
Expand All @@ -56,6 +60,6 @@ jobs:
run: php vendor/bin/testbench serve --no-reload &

- name: Execute tests
run: php vendor/bin/phpunit -c phpunit.dusk.xml.dist
run: php vendor/bin/phpunit -c phpunit.dusk.xml.dist --display-deprecations --fail-on-deprecation
env:
APP_URL: http://127.0.0.1:8000
17 changes: 10 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,16 @@ jobs:
matrix:
php: [8.1, 8.2, 8.3]
laravel: [10, 11]
phpunit: [10.5, '11.0']
phpunit: [10.5, 11]
include:
- php: 8.4
laravel: 11
phpunit: 11.3
exclude:
- php: 8.1
laravel: 11
- laravel: 10
phpunit: '11.0'
phpunit: 11

name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - PHPUnit ${{ matrix.phpunit }}

Expand All @@ -44,20 +48,19 @@ jobs:

- name: Install dependencies
run: |
composer require "illuminate/contracts:^${{ matrix.laravel }}" "phpunit/phpunit:^${{ matrix.phpunit }}" --dev --no-update
composer update --prefer-dist --no-interaction --no-progress
composer update --prefer-dist --no-interaction --no-progress --with="laravel/framework:^${{ matrix.laravel }}" --with="phpunit/phpunit:^${{ matrix.phpunit }}"
- name: Execute tests
run: vendor/bin/phpunit -c phpunit.xml.dist
run: vendor/bin/phpunit -c phpunit.xml.dist --display-deprecations --fail-on-deprecation

stub-tests:
runs-on: ubuntu-22.04

strategy:
fail-fast: true
matrix:
php: [8.2]
laravel: [10]
php: [8.2, 8.3, 8.4]
laravel: [10, 11]

name: Test Stubs PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}

Expand Down
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# Release Notes

## [Unreleased](https://github.com/laravel/dusk/compare/v8.2.11...8.x)
## [Unreleased](https://github.com/laravel/dusk/compare/v8.2.13...8.x)

## [v8.2.13](https://github.com/laravel/dusk/compare/v8.2.12...v8.2.13) - 2025-01-06

* [8.x] Behaviour change on assertAttributeDoesntContain by [@F2210](https://github.com/F2210) in https://github.com/laravel/dusk/pull/1154

## [v8.2.12](https://github.com/laravel/dusk/compare/v8.2.11...v8.2.12) - 2024-11-21

* [8.x] Supports PHP 8.4 by [@crynobone](https://github.com/crynobone) in https://github.com/laravel/dusk/pull/1131

## [v8.2.11](https://github.com/laravel/dusk/compare/v8.2.10...v8.2.11) - 2024-11-07

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"guzzlehttp/guzzle": "^7.5",
"illuminate/console": "^10.0|^11.0|^12.0",
"illuminate/support": "^10.0|^11.0|^12.0",
"php-webdriver/webdriver": "^1.9.0",
"php-webdriver/webdriver": "^1.15.2",
"symfony/console": "^6.2|^7.0",
"symfony/finder": "^6.2|^7.0",
"symfony/process": "^6.2|^7.0",
Expand Down
9 changes: 3 additions & 6 deletions src/Concerns/MakesAssertions.php
Original file line number Diff line number Diff line change
Expand Up @@ -827,14 +827,11 @@ public function assertAttributeContains($selector, $attribute, $value)
*/
public function assertAttributeDoesntContain($selector, $attribute, $value)
{
$fullSelector = $this->resolver->format($selector);

$actual = $this->resolver->findOrFail($selector)->getAttribute($attribute);

PHPUnit::assertNotNull(
$actual,
"Did not see expected attribute [{$attribute}] within element [{$fullSelector}]."
);
if (is_null($actual)) {
return $this;
}

PHPUnit::assertStringNotContainsString(
$value,
Expand Down
10 changes: 1 addition & 9 deletions tests/Unit/MakesAssertionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -683,15 +683,7 @@ public function test_assert_attribute_does_not_contain()

$browser->assertAttributeDoesntContain('foo', 'bar', 'class-c');

try {
$browser->assertAttributeDoesntContain('foo', 'bar', 'class-c');
$this->fail();
} catch (ExpectationFailedException $e) {
$this->assertStringContainsString(
'Did not see expected attribute [bar] within element [Foo].',
$e->getMessage()
);
}
$browser->assertAttributeDoesntContain('foo', 'bar', 'class-c');

try {
$browser->assertAttributeDoesntContain('foo', 'bar', 'class-1');
Expand Down

0 comments on commit 7654f01

Please sign in to comment.