Skip to content

test: add orientation getter and setter unit tests - #1307

Merged
KazuCocoa merged 1 commit into
masterfrom
test/orientation-unit-tests-only
Sep 15, 2026
Merged

KazuCocoa merged 1 commit into
masterfrom
test/orientation-unit-tests-only

Conversation

@KazuCocoa

Copy link
Copy Markdown
Member

Summary

Restore the intended orientation unit tests from #1289 following its revert in #1306. The existing orientation getter and setter already support the tested behavior.

Adds three tests in test/unit/webdriver/webdriver_test.py:

  • Read LANDSCAPE from the orientation endpoint.
  • Verify the request bodies when setting LANDSCAPE and PORTRAIT.
  • Verify that an invalid orientation raises WebDriverException with the expected message.

The diff contains only these tests and their required imports (one file, 34 added lines). Assertions follow the current Ruff rules.

Validation

  • Full test/unit/ suite passed using Python 3.14.6.
  • All 24 tests in test/unit/webdriver/webdriver_test.py passed after the assertion style adjustment.
  • Ruff lint and format checks passed for the changed file.
  • git diff --check passed.

The test runs emitted httpretty deprecation warnings and thread warnings from the existing test_session_catches_error test.

Extract the intended orientation tests from #1289 after its revert in #1306.

Co-authored-by: Dor-bl <59066376+Dor-bl@users.noreply.github.com>
@KazuCocoa

Copy link
Copy Markdown
Member Author

Cc @Dor-bl

@KazuCocoa
KazuCocoa merged commit 90c38d1 into master Sep 15, 2026
11 of 12 checks passed
@KazuCocoa
KazuCocoa deleted the test/orientation-unit-tests-only branch September 15, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant