Skip to content

Commit

Permalink
Update Playwright driver to 1.50.1
Browse files Browse the repository at this point in the history
  • Loading branch information
YusukeIwaki committed Feb 2, 2025
1 parent 193f248 commit d19e592
Show file tree
Hide file tree
Showing 9 changed files with 261 additions and 49 deletions.
2 changes: 1 addition & 1 deletion development/CLI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.50.0
1.50.1
256 changes: 212 additions & 44 deletions development/api.json

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions development/unimplemented_examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,14 @@ expect(locator).to_have_class(re.compile(r"(^|\\s)selected(\\s|$)"))
expect(locator).to_have_class("middle selected row")
```

### example_7e42f38bd7c5b69b7f22390f6afa0f53aa155d74ad6a72b080fa2910013dc22c (LocatorAssertions#to_match_aria_snapshot)

```
page.goto("https://demo.playwright.dev/todomvc/")
expect(page.locator('body')).to_match_aria_snapshot('''
- heading "todos"
- textbox "What needs to be done?"
''')
```
2 changes: 2 additions & 0 deletions documentation/docs/api/browser_type.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ The default browser context is accessible via [Browser#contexts](./browser#conte

**NOTE**: Connecting over the Chrome DevTools Protocol is only supported for Chromium-based browsers.

**NOTE**: This connection is significantly lower fidelity than the Playwright protocol connection via [BrowserType#connect](./browser_type#connect). If you are experiencing issues or attempting to use advanced functionality, you probably want to use [BrowserType#connect](./browser_type#connect).

**Usage**

```ruby
Expand Down
2 changes: 1 addition & 1 deletion documentation/docs/api/locator.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def aria_snapshot(timeout: nil)


Captures the aria snapshot of the given element.
Read more about [aria snapshots](https://playwright.dev/python/docs/aria-snapshots) and [LocatorAssertions#to_match_aria_snapshot#1](./locator_assertions#to_match_aria_snapshot#1) for the corresponding assertion.
Read more about [aria snapshots](https://playwright.dev/python/docs/aria-snapshots) and [LocatorAssertions#to_match_aria_snapshot](./locator_assertions#to_match_aria_snapshot) for the corresponding assertion.

**Usage**

Expand Down
29 changes: 29 additions & 0 deletions documentation/docs/api/locator_assertions.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,15 @@ expect(locator).not_to have_accessible_description(name, ignoreCase: nil, timeou

The opposite of [LocatorAssertions#to_have_accessible_description](./locator_assertions#to_have_accessible_description).

## not_to_have_accessible_error_message

```ruby
expect(locator).not_to have_accessible_error_message(errorMessage, ignoreCase: nil, timeout: nil)
```


The opposite of [LocatorAssertions#to_have_accessible_error_message](./locator_assertions#to_have_accessible_error_message).

## not_to_have_accessible_name

```ruby
Expand Down Expand Up @@ -745,3 +754,23 @@ locator = page.locator("id=favorite-colors")
locator.select_option(["R", "G"])
expect(locator).to have_values([/R/, /G/])
```

## to_match_aria_snapshot

```ruby
expect(locator).to match_aria_snapshot(expected, timeout: nil)
```


Asserts that the target element matches the given [accessibility snapshot](https://playwright.dev/python/docs/aria-snapshots).

**Usage**

```python title="example_7e42f38bd7c5b69b7f22390f6afa0f53aa155d74ad6a72b080fa2910013dc22c.py"
page.goto("https://demo.playwright.dev/todomvc/")
expect(page.locator('body')).to_match_aria_snapshot('''
- heading "todos"
- textbox "What needs to be done?"
''')

```
3 changes: 2 additions & 1 deletion documentation/docs/include/api_coverage.md
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,7 @@
* not_to_be_visible
* not_to_contain_text
* not_to_have_accessible_description
* not_to_have_accessible_error_message
* not_to_have_accessible_name
* not_to_have_attribute
* not_to_have_class
Expand Down Expand Up @@ -601,7 +602,7 @@
* to_have_text
* to_have_value
* to_have_values
* ~~to_match_aria_snapshot#1~~
* to_match_aria_snapshot

## PageAssertions

Expand Down
1 change: 1 addition & 0 deletions lib/playwright/locator_assertions_impl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ def to_have_accessible_error_message(errorMessage, ignoreCase: nil, timeout: nil
"Locator expected to have accessible error message"
)
end
_define_negation :to_have_accessible_error_message

def to_have_attribute(name, value, ignoreCase: nil, timeout: nil)
expected_text = to_expected_text_values([value], ignore_case: ignoreCase)
Expand Down
4 changes: 2 additions & 2 deletions lib/playwright/version.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

module Playwright
VERSION = '1.49.0'
COMPATIBLE_PLAYWRIGHT_VERSION = '1.49.0'
VERSION = '1.50.0'
COMPATIBLE_PLAYWRIGHT_VERSION = '1.50.1'
end

0 comments on commit d19e592

Please sign in to comment.