Convert feature controller to service#6207
Conversation
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
6d97552 to
54c9550
Compare
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
3703968 to
1cdda45
Compare
e23b044 to
fbb9fe2
Compare
|
@kevinansfield I have a thought on how to fix this, will try implementing it and see how it goes. |
fbb9fe2 to
d64d6a4
Compare
|
kevin, I changed around the service to be more promise-based rather than CP based; however, the same error is still occurring in tests for me locally (settings adapter#save is still not being called 😞) |
refs TryGhost#6207, TryGhost#6207 - updates tests for new async behaviour - fixes tests failing on validation errors - fixes `feature.labs` not updating after successful save
d64d6a4 to
ff113ba
Compare
|
@kevinansfield the tests passed locally so this should be good to go 👍 |
|
🎊 |
|
Well, it appears it works locally because I'm using phantomjs 2.1 locally, but it fails using 1.9.8 on Travis. Thoughts? (It works using chrome testing as well) It seems to be due to phantomjs not picking up the changes to the feature checkbox on change |
|
Maybe worth looking at merging #6051 before spending too much time trying to find workarounds for old phantomjs versions. |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
ff113ba to
1608cfb
Compare
|
@kevinansfield is there anything else I need to do for this? I feel like the other two stubbed tests can be filled out as a part of #6431 |
|
As it is right now the #6431 is more about improving the behaviour so that we don't need workarounds like the above repeated throughout the codebase - we should definitely have working examples with tests where possible before working on it in order to validate the refactoring. |
1608cfb to
b5efc54
Compare
|
@kevinansfield I fixed the error handling and filled out the remaining tests; however, I'm not sure how/if it's possible to squash my two commits down into one b/c of the order in which the changes occurred. If there is a way, though, I'll gladly squash them 😄 |
closes TryGhost#6170 - add gh-feature-flag component to create a checkbox (reduce duplicate code)
refs TryGhost#6207, TryGhost#6207 - updates tests for new async behaviour - fixes tests failing on validation errors - fixes `feature.labs` not updating after successful save
b5efc54 to
6753795
Compare
|
Finally, it's good to go 👍 |
6753795 to
324a044
Compare
Convert feature controller to service
refs TryGhost#6207, TryGhost#6207 - updates tests for new async behaviour - fixes tests failing on validation errors - fixes `feature.labs` not updating after successful save
closes #6170
TODO: