Skip to content

test: Add FiltersTests class with NUnit tests for Filters.FirstWithName #902

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 11, 2025

Conversation

Dor-bl
Copy link
Collaborator

@Dor-bl Dor-bl commented Feb 9, 2025

Introduced a new test class FiltersTests in the Appium.Net.Integration.Tests.helpers namespace. The class is decorated with the [TestFixture] attribute and includes the following methods:

  • BeforeAll(): Initializes the AndroidDriver and sets the implicit wait timeout.
  • SetUp(): Starts the "ApiDemos" activity before each test.
  • FirstWithName_ReturnsCorrectElement(): Verifies that Filters.FirstWithName returns the correct element.
  • AfterAll(): Quits the AndroidDriver and stops the local Appium service if the server is not remote.

Necessary namespaces for NUnit, Selenium, and Appium are imported.

List of changes

Please provide a briefly described change list that you are going to propose.

Types of changes

What types of changes are you proposing/introducing to the .NET client?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change that adds functionality or value)
  • Breaking change (fix or feature that would cause existing functionality not to work as expected)
  • Test fix (non-breaking change that improves test stability or correctness)

Documentation

  • Have you proposed a file change/ PR with Appium to update documentation?

This can be done by navigating to the documentation section on http://appium.io selecting the appropriate command/endpoint and clicking the 'Edit this doc' link to update the C# example

Integration tests

  • Have you provided integration tests for your changes? (required for Bugfix, New feature, or Test fix)

Details

Please provide more details about changes if necessary. You can provide code samples showing how they work and possible use cases if there are new features. Also, you can create gists with pasted C# code samples or put them here using markdown.
About markdown please read Mastering markdown and Writing on GitHub

Introduced a new test class `FiltersTests` in the `Appium.Net.Integration.Tests.helpers` namespace. The class is decorated with the `[TestFixture]` attribute and includes the following methods:
- `BeforeAll()`: Initializes the `AndroidDriver` and sets the implicit wait timeout.
- `SetUp()`: Starts the "ApiDemos" activity before each test.
- `FirstWithName_ReturnsCorrectElement()`: Verifies that `Filters.FirstWithName` returns the correct element.
- `AfterAll()`: Quits the `AndroidDriver` and stops the local Appium service if the server is not remote.

Necessary namespaces for NUnit, Selenium, and Appium are imported.
Added `using` directive for `Appium.Net.Integration.Tests.helpers`.
Changed namespace from `Appium.Net.Integration.Tests.helpers` to
`Appium.Net.Integration.Tests.Android` for better organization.
@Dor-bl Dor-bl merged commit 999ed48 into appium:main Feb 11, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants