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

FED-1763 Fix reenabled contributor tests #864

Merged
merged 5 commits into from
Dec 6, 2023

Conversation

greglittlefield-wf
Copy link
Contributor

@greglittlefield-wf greglittlefield-wf commented Dec 1, 2023

Motivation

In a previous over_react release, we had to disable some diagnostics and assists that imported over_react builder code due to issues with the plugin running in unsound null safety.

As part of the over_react null-safety major release, we want to reenable those diagnostics, and have done so in v5_wip.

As a result to test refactors and other changes that were made while those contributors were disabled, there are test failures that need to be addressed, mostly to do with unique file names.

Changes

  • Update AnalysisDriverTestBase to automatically substitute auto-generated filenames within source (using {{FILE_BASENAME_WITHOUT_EXTENSION}})
  • Uncomment tests:
    • test/integration/assists/toggle_statefulness_test.dart
    • test/integration/diagnostics/boilerplate_validator_test.dart
  • Fix all analyzer_plugin test failures
    • Update tests referencing .over_react.g.dart parts to reference the correct auto-generated file names. Without them, we get unrelated BoilerplateValidatorDiagnostic errors in unrelated tests.
      • Most of these are just switching to {{FILE_BASENAME_WITHOUT_EXTENSION}}, but some required more custom updates
    • Fix toggle statefulness diagnostic due to logic (in boilerplate_assist_apis.dart) being broken while it was turned off, in the last analyzer package upgrade

Release Notes

Review

See CONTRIBUTING.md for more details on review types (+1 / QA +1 / +10) and code review process.

Please review:

QA Checklist

  • Tests were updated and provide good coverage of the changeset and other affected code
  • Manual testing was performed if needed
    • Steps from PR author:
      • All CI is passing (analyzer_plugin tests were previously failing in v5_wip)
    • Anything falling under manual testing criteria outlined in CONTRIBUTING.md

Merge Checklist

While we perform many automated checks before auto-merging, some manual checks are needed:

  • A Frontend Frameworks Design member has reviewed these changes
  • There are no unaddressed comments - this check can be automated if reviewers use the "Request Changes" feature
  • For release PRs - Version metadata in Rosie comment is correct

@aviary-wf
Copy link

Security Insights

No security relevant content was detected by automated scans.

Action Items

  • Review PR for security impact; comment "security review required" if needed or unsure
  • Verify aviary.yaml coverage of security relevant code

Questions or Comments? Reach out on Slack: #support-infosec.

@greglittlefield-wf greglittlefield-wf force-pushed the fix-reenabled-contributor-tests-FED-1763 branch from 29e4ca4 to af29473 Compare December 1, 2023 22:14
@greglittlefield-wf greglittlefield-wf marked this pull request as ready for review December 1, 2023 22:30
'offset': offset,
'length': length,
}}. Preview:\n' + SourceFile.fromString(source.contents.data, url: source.uri).span(offset, offset + length).highlight();
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added this during debugging.

Before: Instance of 'SourceSelection'

After:

SourceSelection {target: class #FooComponent# extends, offset: 181, length: 12}. Preview:
  ╷
8 │ class FooComponent extends UiComponent2<FooProps> {
  │       ^^^^^^^^^^^^
  ╵

Copy link
Contributor

@sydneyjodon-wk sydneyjodon-wk left a comment

Choose a reason for hiding this comment

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

+10

  • CI passes

@sydneyjodon-wk
Copy link
Contributor

@Workiva/release-management-p

@greglittlefield-wf greglittlefield-wf merged commit 97831a1 into v5_wip Dec 6, 2023
10 checks passed
@greglittlefield-wf greglittlefield-wf deleted the fix-reenabled-contributor-tests-FED-1763 branch January 30, 2024 16:53
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.

4 participants