Skip to content
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

SpecFlow structure added and initial accessibility test created #17

Merged
merged 41 commits into from
Jul 31, 2024

Conversation

antk43
Copy link
Collaborator

@antk43 antk43 commented Jul 15, 2024

Overview

This PR adds SpecFlow to the Web.Tests project along with an initial accessibility test on the homepage.

Major changes

  • Axe Core, Fluent Assertions, Selenium WebDriver Chrome, and SpecFlow packages added to Web.Test.
  • Drivers directory containing classes for the control and config of Selenium WebDriver.
  • Features directory with respective AccessbilityTests.feature file containing accessibility scenario and test steps.
  • Steps directory with respective AccessibilitySteps.cs step definition file containing code for test steps.
  • Hooks directory with respective SpecFlowHooks.cs for setting up and tearing down the web app and the WebDriver.
  • Options directory containing options classes for WebDriver and Axe.
  • DummySearchServiceAdapter added along with Establishments.json file for providing test data through the web establishment search.
  • build.yml updated to run-on: windows-latest to be able to run Selenium.

ToDo

Next round of work to include the following:

  • Starting the web app in SpecFlowHooks.cs.
    • Run accessibility tests as a result.
  • Expand test data.
  • Add Selenium options including running in Headless et al.
  • Add AccessibilityOptions.cs as per SD test project.
  • Add logging of accessibility test to output file.

@antk43 antk43 changed the title Ao/specflow accessibility tests SpecFlow structure added and initial accessibility test created Jul 15, 2024
@antk43 antk43 marked this pull request as ready for review July 15, 2024 10:50
@spanersoraferty
Copy link
Collaborator

So, we have an IWebDriverContext with Selenium which is the thing that gives us access to the page-level DOM. So I think what we need to do is to create an IDocumentObjectModel extractor that we can inject into the given page objects (i.e. HomePage etc) and the underlying implementation we care about is something we can wire-up at runtime. That way we can create a unified page object model but leave the details as to how we extract the DOM to the underlying infrastructure (be it Selenium, AngleSharp, or whatever). This way we don't have to bleed Selenium concerns (using Be) or AngleSharp concerns at the page object level.

We can have a get-together to discuss when everyone is back. :)

@antk43
Copy link
Collaborator Author

antk43 commented Jul 23, 2024

Build will fail after the recent push on 23/07/24 - will fix on 25/07/2024.

@antk43
Copy link
Collaborator Author

antk43 commented Jul 25, 2024

This test PR build will fail until the search changes are merged into main; likely next week.

@antk43
Copy link
Collaborator Author

antk43 commented Jul 31, 2024

Build will fail with single accessibility violation on search results page which will be resolved in one of the next PRs.

Copy link
Collaborator

@CathLass CathLass left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Work to be completed in a later PR - Fix for web host to stop host server being restarted for each test

@CathLass CathLass merged commit 617287b into main Jul 31, 2024
1 check passed
@CathLass CathLass deleted the AO/specflow-accessibility-tests branch September 26, 2024 10:50
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.

3 participants