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

refactor(test): adjust sandbox folder location and simplify config logic #3493

Merged
merged 1 commit into from
May 1, 2020

Commits on May 1, 2020

  1. refactor(test): adjust sandbox folder location and simplify config logic

    This is a bit bigger change, but modifications are closely related and I think it makes sense to land them all together.
    
    The main change is in test/e2e/support/world.js file, where all important paths are defined:
    
    - `workDir` is the current working directory for the tested Karma process - `test/e2e/support`. Same as before.
    - `sandboxDir` moved from `tmp/sandbox` in the repository root to `test/e2e/support/sandbox`. Sandbox directory is reset before every scenario (see `test/e2e/step_definitions/hooks.js`) and this is where all generated files should be (hence change of paths in `browser_console.feature`). This also makes things cleaner as now all paths in the .feature files are relative to `workDir`.
    - `configFile` is path where Karma config file is generated. It no longer contains hash as it was not really needed. It may be re-introduced later if tests are run in parallel, but then it makes more sense to have it as a part of `sandboxDir` instead.
    - `karmaExecutable` is an absolute path to the Karma executable.
    
    The change from `__dirname + '/` to `_resolve('` in two .feature files is to avoid having two different hacks to resolve absolute paths.
    
    The last change in this file is to simplify config generation methods.
    
    Remaining changes in `test/e2e/step_definitions/core_steps.js` are adapting steps to the above changes by removing bunch of boilerplate, which is no longer necessary.
    devoto13 committed May 1, 2020
    Configuration menu
    Copy the full SHA
    074969b View commit details
    Browse the repository at this point in the history