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

Restructuring of generator frontend tests #9833

Merged
merged 7 commits into from
May 28, 2024

Conversation

murdos
Copy link
Collaborator

@murdos murdos commented May 18, 2024

  • Rename webapp tests folder from src/test/javascript to src/test/webapp :
    • So src/main/webapp matches src/test/webapp
    • Also frontend tests are not limited to javascript code, this also includes components and e2e tests
  • Rename webapp unit tests folder to src/test/webapp/unit
  • webapp tests: isolate component tests from e2e tests
  • rename e2e folder and remove component tests from e2e folder

@pascalgrimaud
Copy link
Member

Totally agree with this change, although it's a breaking change
Just wonder if src/test/webapp could / should be a variable ? in case we have a full typescript application

@murdos
Copy link
Collaborator Author

murdos commented May 22, 2024

@pascalgrimaud : I'm glad you agree :) I'll try to fix failing test on windows so we can merge it.
The current PR is only for the generator, I wanted to setup things cleanly before trying something for #9491
It's also a prerequisite for something I want to investigate: merging code coverage between unit tests and components tests for frontend (that would allow removing some dumb unit tests).
If things are satisfying, we can then evolve generated apps :)

@murdos murdos force-pushed the generator-frontend-tests-reorg branch 2 times, most recently from 5475582 to 9c3a96c Compare May 22, 2024 12:36
@murdos
Copy link
Collaborator Author

murdos commented May 24, 2024

FYI: there's an issue with tikui-serve and component tests ran with Cypress on Windows, I'll need to discuss that with @Gnuk when he's available.

@murdos murdos changed the title Restructuring of generator frontend tests [WIP] Restructuring of generator frontend tests May 24, 2024
@Gnuk
Copy link
Collaborator

Gnuk commented May 24, 2024

FYI: there's an issue with tikui-serve and component tests ran with Cypress on Windows, I'll need to discuss that with @Gnuk when he's available.

I'm back next week :), please remind me Monday I guess @murdos

@murdos murdos force-pushed the generator-frontend-tests-reorg branch from e0c04e8 to b431724 Compare May 27, 2024 19:19
@murdos murdos requested review from Gnuk and pascalgrimaud May 27, 2024 19:51
@murdos murdos changed the title [WIP] Restructuring of generator frontend tests Restructuring of generator frontend tests May 27, 2024
@murdos
Copy link
Collaborator Author

murdos commented May 27, 2024

@pascalgrimaud : this is now ready for merge (there's no breaking change since it only relates to the internal of the generator) :) With the help of @Gnuk I fixed the windows build.

@pascalgrimaud
Copy link
Member

can you fix the conflict plz @murdos ?

So src/main/webapp matches src/test/webapp
Also frontend tests are not limited to javascript code, this also includes components and e2e tests
Otherwise, in Tikui serve mode, the first component tests can fail if the Tikui cache doesn't already exist, and because SASS files are transpiled on CSS during test execution
@murdos murdos force-pushed the generator-frontend-tests-reorg branch from b431724 to 4be8819 Compare May 28, 2024 05:56
@murdos
Copy link
Collaborator Author

murdos commented May 28, 2024

@pascalgrimaud : conflicts are fixed

@pascalgrimaud pascalgrimaud merged commit 6c7a5a0 into jhipster:main May 28, 2024
34 checks passed
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.

None yet

3 participants