-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Improve testing on cht-conf #425
Comments
Refactor |
Updates: The e2e test plan will be roughly as follows:
Additionally, to make the reviews and feedback short and often, I plan on sending PR for each action. I've created a feature branch |
* feat(#425): Create e2e test setup * Setup mocha hooks and add to npm run command * orchestrate with mocha hooks * test run in the ci * test run in the ci * move session-token test to test/integration folder * add trace logs * add trace logs * remove traces * split logic if we have an existing project configuration file * refactor hooks and extract utils functions to deal with cht-docker-helper * refactor `spinUpCht` to fix eslint warning about promise executor cannot be async * finally get the first e2e test out, working as expected * trace errors in CI * check for existence of project configuration before running teardown * add more traces * do we have the latest version of the script? * what's wrong with `docker exec`? * create make parent directories as needed same as `mkdir -p` * organize todos, remove debugging logs * replace 4 spaces => 2 spaces to follow coding style in the repo * oops forgot these * extract utils functions to reuse in other tests * logs * pass project name to `runChtConf` as expected * await getProjectUrl() * sonar :) * clean up * more clean up * clearer test title * - switch back to cht-docker-compose.sh from cht-core master - hardcode local-ip IP address in the CI job * add trace * clean up trace * replace hardcoded package.json name * add comments to explain the rationale behind the `stdio` option when running the docker helper script * remove linting before running e2e tests * increase timeout to prevent frequent failures due to CHT instance taking too long to be ready * remove `.cht-docker-helper` in teardown * fix import of `DEFAULT_PROJECT_NAME` * dedup code in `initProject` * remove unnecessary `structuredClone` * add assertions about `baseSettings.language` * throw error early when config file doesn't exist * extract `readCompiledAppSettings` & `writeBaseAppSettings` cht conf utils * touch a word about e2e tests in readme * it's better with the right npm script... * format --------- Co-authored-by: Sugat Bajracharya <sugatbajracharya49@gmail.com>
Describe the issue
We currently do not have integration/e2e tests on cht-conf.
Describe the improvement you'd like
Add some happy path tests to get started on this type of testing. Tests to add might include:
Describe alternatives you've considered
None.
The text was updated successfully, but these errors were encountered: