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

Fix test timing to wait for view to be rendered before running expectations #467

Merged
merged 1 commit into from
Feb 21, 2025

Conversation

jonsnyder
Copy link
Contributor

Description

The configuration spec "initializes form fields with full settings", was consistently failing on my machine. I found that the problem was that the test runner was not waiting long enough after initializing the extension view controller before running expectations. I changed it so that it now waits for the rendered event before continuing. This caused a problem because when an error is thrown, the rendered event isn't triggered. I added a trigger for this in the error boundary. This uncovered a problem with one of the update variable tests. It was trying to verify that an error was not shown, but because it was checking too early it was succeeding even though the error would show if it waited until the view was rendered. I fixed this by updating a test to pull down mocked versions of the schema.

Related Issue

Motivation and Context

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (non-breaking change which does not add functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA or I'm an Adobe employee.
  • I have made any necessary test changes and all tests pass.
  • I have run the Sandbox successfully.
  • I've updated the schema in extension.json or no changes are necessary.
  • My change requires a change to the documentation.

@dompuiu dompuiu merged commit bc2f3ae into main Feb 21, 2025
5 checks passed
@dompuiu dompuiu deleted the testTimingFix branch February 21, 2025 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants