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

chore: Fix test irregularities #1687

Merged
merged 1 commit into from
Aug 31, 2023

Conversation

DaveTryon
Copy link
Contributor

Details

I noticed today that the AppLayoutTests were not running as expected. In investigating, I found the following, which are fixed in this PR:

  • The AppLayoutTests.ClassInitialize method needs to take a TestContext as a parameter--this is why the tests were being discovered but were not being run
  • The TestClass, TestMethod, ClassInitialize, and ClassCleanup decorators aren't intended to have parentheses. They still work with the parentheses, but it is a nonstandard representation. I fixed these wherever I found them (4 test classes)
Motivation

Test coverage and consistency

Context

Pull request checklist

  • Run through of all test scenarios completed?
  • [n/a] Does this address an existing issue? If yes, Issue
  • [n/a] Includes UI changes?
    • [n/a] Run the production version of Accessibility Insights for Windows against a version with changes.
    • [n/a] Attach any screenshots / GIF's that are applicable.

Note: After the PR has been created, certain checks will be kicked off. All of these checks must pass before a merge.

@DaveTryon DaveTryon requested a review from a team as a code owner August 31, 2023 21:21
@DaveTryon DaveTryon merged commit bbcc04c into microsoft:main Aug 31, 2023
7 checks passed
@DaveTryon DaveTryon deleted the fix-test-irregularities branch August 31, 2023 22:05
DaveTryon added a commit to microsoft/axe-windows that referenced this pull request Sep 1, 2023
#### Details

Similar to
microsoft/accessibility-insights-windows#1687,
there are some irregularities in our test decorators. This PR is made up
of the following global search & replace operations:
- `[TestClass()]` becomes `[TestClass]`
- `[TestMethod()]` becomes `[TestMethod]`

The extra parentheses on the decorators don't break anything, but they
are non-standard and don't add any value. I've confirmed that all unit
tests run as expected.

##### Motivation

Code consistency

##### Context

<!-- Are there any parts that you've intentionally left out-of-scope for
a later PR to handle? -->

<!-- Were there any alternative approaches you considered? What
tradeoffs did you consider? -->

#### Pull request checklist
<!-- If a checklist item is not applicable to this change, write "n/a"
in the checkbox -->
- [ ] Addresses an existing issue: #0000
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.

None yet

2 participants