Skip to content

Conversation

@khanniie
Copy link
Member

Fixes the test suite warnings that are unrelated to the React lifecycle, which I assume will be resolved as a side effect of the ongoing class -> functional conversion.

Changes:

  • Provides the props that were missing but marked as required in the EditorAccessibility tests and ErrorModal tests
  • creates a fake version of window.confirm which is missing from the jsdom environment but used in the FileNode tests
  • hides the extra log in the createProject test and changes it from a log to a warning type in the controller itself

I have verified that this pull request:

  • has no linting errors (npm run lint)
  • has no test errors (npm run test)
  • is from a uniquely-named feature branch and is up to date with the develop branch.
  • is descriptively named and links to an issue number, i.e. Fixes #123

Fixes the test suite warnings that are unrelated to the class -> functional conversion
@khanniie khanniie changed the title Develop khanniie testwarnings fix (some) test suite warnings Aug 16, 2024
@khanniie khanniie requested review from nahbee10 and raclim August 16, 2024 01:09
@release-com
Copy link

release-com bot commented Aug 16, 2024

Release Environments

This Environment is provided by Release, learn more!
To see the status of the Environment click on Environment Status below.

🔧Environment Status : https://app.release.com/public/Processing%20Foundation/env-71a56e04d9

@khanniie khanniie added the Area: Testing For tests, test coverage, or testing infrastructure label Aug 16, 2024
Copy link
Collaborator

@raclim raclim left a comment

Choose a reason for hiding this comment

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

This is awesome! Thanks so much for working on this!

Pinging at @nahbee10 to see if she has any additional thoughts as well—otherwise I think I'm going go ahead with merging this in tomorrow!

@raclim
Copy link
Collaborator

raclim commented Aug 22, 2024

I'm going to go ahead with merging this in, but please feel free to note if any additional thoughts comes up!

@raclim raclim merged commit 2dc1835 into develop Aug 22, 2024
@khanniie
Copy link
Member Author

Yay! thanks rachel!! : )

@khanniie khanniie deleted the develop-khanniie-testwarnings branch August 24, 2024 14:08
Comment on lines +24 to +26
render(
<ErrorModal type="staleSession" closeModal={jest.fn()} service="google" />
);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Personally I would say that the more logical fix for the PropTypes error would be to make it so that the service is not a required prop. It's only needed when type="oauthError" and it's not used in any other circumstance so it's kind of weird that it's always required. (I'm not sure if PropTypes has a way to require it depending on the value of the type. The "correct" thing would be to require the service if and only if the type is "oauthError" but that might be getting too complicated.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Testing For tests, test coverage, or testing infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants