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) O3-2307 - Update the webpack watch ignore paths #739

Closed
wants to merge 1 commit into from

Conversation

anjula-sack
Copy link
Collaborator

Requirements

  • This PR has a title that briefly describes the work done including the ticket number. If there is a ticket, make sure your PR title includes a conventional commit label. See existing PR titles for inspiration.

For changes to apps

If applicable

  • My work includes tests or is validated by existing tests.
  • I have updated the esm-framework mock to reflect any API changes I have made.

Summary

Currenlty there's an issue with the webpack watch mode where it watch for test output files causing the tests to fail. I updated the webpack ignore paths with the correct wildcards.

Screenshots

None

Related Issue

https://issues.openmrs.org/browse/O3-2307

Other

None

@denniskigen
Copy link
Member

Does this solve the issue for you when you test locally, @anjula-sack?

@anjula-sack
Copy link
Collaborator Author

Does this solve the issue for you when you test locally, @anjula-sack?

I cannot test this locally because the tests are passing locally. This was based on a suggestion from @ibacher. I tried removing test-results from the webpack it still passed on locally.

@ibacher
Copy link
Member

ibacher commented Jul 31, 2023

@anjula-sack The easiest way to test this is to run the tests in watch mode and (assuming you're using Linux) use touch to update a file that should be watched, and confirm you see the tests re-run then use touch on, e.g., test-results/tmpfile (touch will create the file) and confirm that they aren't re-triggered.

@anjula-sack
Copy link
Collaborator Author

anjula-sack commented Aug 5, 2023

@anjula-sack The easiest way to test this is to run the tests in watch mode and (assuming you're using Linux) use touch to update a file that should be watched, and confirm you see the tests re-run then use touch on, e.g., test-results/tmpfile (touch will create the file) and confirm that they aren't re-triggered.

@ibacher I tried it. Webpack is not listening for file creations. But what rerender triggers is updating the test-restults/index.html file. This report is being updated while running the tests causing the refresh. I tried with the wild card as well it still the same. BTW i'm updating the webpack config in node modules at the cohort builder not sure whether this is the correct approach.

@anjula-sack
Copy link
Collaborator Author

I updated the test files path to { outputFolder: "../test-results/report" } so it will create them outside the project directory and the tests are passing. Since webpack is not watching that file. @ibacher @denniskigen I tried ignore patterns none of them worked out.

@ibacher ibacher changed the title (O3-2307) - Update the webpack watch ignore paths (chore) O3-2307 - Update the webpack watch ignore paths Aug 7, 2023
@anjula-sack
Copy link
Collaborator Author

As you can see both the tests are passing since I update the path to for the test report to create outside the project.

openmrs/openmrs-esm-form-builder#148
openmrs/openmrs-esm-cohortbuilder#52

@denniskigen @ibacher

@denniskigen
Copy link
Member

Yes, @anjula-sack. So do we still need this to get merged in?

@denniskigen
Copy link
Member

denniskigen commented Sep 19, 2023

Closing this in favour of moving the test-results directory outside of the project directory (for now).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants