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

Tests: Sort out usage of content folder in tests #9034

Merged
merged 2 commits into from Sep 21, 2017

Conversation

kirrg001
Copy link
Contributor

@kirrg001 kirrg001 commented Sep 21, 2017

no issue

  • use latest casper in test fixtures
  • removed fixtures/theme (was unused)
  • never ever use the root content folder for tests
  • if we start/fork Ghost for the tests, we use the a tmp folder
  • this change is required to for an upcoming PR (✨ Upload/Download redirects #9029)
  • i've added a TODO to create a helper fn for stopping the ghost server, so we can cleanup the tmp folder, but it's a folder in your tmp directory anyway. but we should add the cleanup logic soon

Changes look huge, but they aren't:

no issue

- use latest casper in test fixtures
- never ever use the root content folder for tests
- if we start/fork Ghost for the tests, we use a tmp folder
- this change is required to for an upcoming PR (TryGhost#9029)
- i've added a TODO to create a helper fn for stopping the ghost server, so we can cleanup the tmp folder
@kirrg001
Copy link
Contributor Author

@ErisDS Ah now i found the tests who added TODO's for this problem. https://github.com/TryGhost/Ghost/blob/master/core/test/functional/routes/channel_spec.js
I will quickly double check this test file.

@ErisDS
Copy link
Member

ErisDS commented Sep 21, 2017

Is it possible, to have a secondary git submodule of casper in the tests 🤔

@ErisDS
Copy link
Member

ErisDS commented Sep 21, 2017

^ is just an idea for later, this LGTM let me know when you've finished checking other tests

@kirrg001
Copy link
Contributor Author

Is it possible, to have a secondary git submodule of casper in the tests 🤔
^ is just an idea for later, this LGTM let me know when you've finished checking other tests

Yeah that could work. But agree, nothing to try out for now (not urgent enough).

- add the 1.4 compatible casper theme to fixtures
- so as soon as you start Ghost, the test env will provide the content folder in /tmp something with the activated latest default casper and the 1.4 compatible old casper
- there are tests which tests different logici e.g. pagination
- therefor we need a different theme, we are simply using our 1.4 casper
@kirrg001
Copy link
Contributor Author

Sorted the channels test out, see my second commit (contains context for you in the commit message) 302a3e9. You can squash both together 😱

@kirrg001 kirrg001 mentioned this pull request Sep 21, 2017
5 tasks
@ErisDS ErisDS merged commit 0fbf5e1 into TryGhost:master Sep 21, 2017
daniellockyer pushed a commit that referenced this pull request Jul 26, 2022
no issue

- use latest casper in test fixtures
- never ever use the root content folder for tests
- if we start/fork Ghost for the tests, we use a tmp folder
- this change is required to for an upcoming PR (#9029)
- i've added a TODO to create a helper fn for stopping the ghost server, so we can cleanup the tmp folder

* Care about TODO's in our channels spec

- add the 1.4 compatible casper theme to fixtures
- so as soon as you start Ghost, the test env will provide the content folder in /tmp something with the activated latest default casper and the 1.4 compatible old casper
- there are tests which tests different logici e.g. pagination
- therefor we need a different theme, we are simply using our 1.4 casper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants