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

Investigate resize event testing #640

Closed
matthewgallo opened this issue Apr 22, 2021 · 6 comments
Closed

Investigate resize event testing #640

matthewgallo opened this issue Apr 22, 2021 · 6 comments
Assignees
Labels
needs: investigation A technical issue needs to be researched status: needs tests

Comments

@matthewgallo
Copy link
Member

What will this achieve?

Several components use ReactResizeDetector which has an onResize prop. This needs to be tested for each component that has this resize event listener.

Adding this to a test only triggers a resize event on the window, but does not call the onResize prop from the resize detector component.

it('should test the onResize prop from react resize detector', () => {
  renderSomeComponent();
  global.innerHeight = 600;
  global.dispatchEvent(new Event('resize'));
});
@andreagmann
Copy link

@matthewgallo could you add this issue to all of the relevant component Epics? I wonder if that could be a way to track that it gets done for each? Or do you think we need separate issues?

@matthewgallo
Copy link
Member Author

We still have not found a solution for this as there aren't any specific guidelines around testing react-resize-detector using jest. For now, we've added istanbul-ignores. Moving to on hold pipeline

@lee-chase lee-chase added the needs: investigation A technical issue needs to be researched label Mar 4, 2022
@stale
Copy link

stale bot commented May 27, 2023

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the status: won’t fix 🔚 This will not be worked on label May 27, 2023
@elycheea
Copy link
Contributor

Suggest we move this back to new issues and discuss during backlog since the need to look into testing may still be relevant, but react-resize-detector has been removed.

@stale stale bot removed the status: won’t fix 🔚 This will not be worked on label May 30, 2023
@elycheea
Copy link
Contributor

elycheea commented Jun 1, 2023

Should add some tests for the hook that Lee wrote in #2912

@elycheea
Copy link
Contributor

elycheea commented Jun 1, 2023

@Ratheeshrajan are you interested in working on some testing items?

@github-project-automation github-project-automation bot moved this to Needs triage 🧐 in Carbon for IBM Products Oct 5, 2023
@elycheea elycheea moved this from Needs triage 🧐 to Backlog 🌋 in Carbon for IBM Products Oct 5, 2023
@davidmenendez davidmenendez moved this from Backlog 🌋 to In progress in Carbon for IBM Products Mar 26, 2024
@davidmenendez davidmenendez moved this from In progress to In review 👀 in Carbon for IBM Products Mar 29, 2024
@github-project-automation github-project-automation bot moved this from In review 👀 to Done 🚀 in Carbon for IBM Products Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: investigation A technical issue needs to be researched status: needs tests
Projects
Archived in project
Development

No branches or pull requests

5 participants