Commit Graph

4166 Commits

Author SHA1 Message Date
Sebastian Gierlinger
64d9ce44cf Merge pull request #5985 from ErisDS/frontend-split
Further split up frontend controller & improve tests
2015-10-22 21:41:01 +02:00
Hannah Wolfe
afbcecc3f6 Merge pull request #5848 from sebgie/public-api-1
Public API
2015-10-22 20:39:41 +01:00
Hannah Wolfe
06b03bbcfe Split helper functions from frontend controller
no issue

- Split out 'getPostPage' & rename to fetchData
- Split format response methods into own files
- Split out handleError
- Split out setReqCtx and rename to setRequestIsSecure
- Split out theme paths
- Refactor tests in index_spec.js to be more robust
- Add tests to bring coverage for split file up to 100%
2015-10-22 18:46:58 +01:00
Kevin Ansfield
f0c8c4781d Merge pull request #5967 from acburdine/issue-5933
Fix settings menu issue with devices that are less than 350px wide
2015-10-22 17:27:40 +01:00
Sebastian Gierlinger
28871d3f4d Merge pull request #5978 from ErisDS/filter-param
Add the filter parameter
2015-10-22 16:42:13 +02:00
Sebastian Gierlinger
f48dfb09cf Public API
refs #4180
closes #4181
- added client and user authentication
- added authenticatePublic/authenticatePrivate as workaround for
missing permissions
- added domain validation
- added CORS header for valid clients
- merged authenticate.js and client-auth.js into auth.js
- removed middleware/api-error-handlers.js
- removed authentication middleware
- added and updated tests
2015-10-22 15:28:47 +02:00
Hannah Wolfe
b5cebb9ec6 Add filter parameter using GQL
refs #5604, refs #5463

- deps: ghost-gql@0.0.2
- adds code to wire up the filtering to a paginated query
- updated pagination plugin count query to use 'distinct' so it's more robust
- rename paginationUtils.query to addLimitAndOffset to be more explicit and make the code clearer
- add a new 'advanced browsing spec' set of tests for tracking these features as they are built out
2015-10-22 11:29:05 +01:00
Hannah Wolfe
d666fba855 Merge pull request #5971 from cobbspur/fields
Remove unknown fields from fetch
2015-10-21 18:29:59 +01:00
cobbspur
372907890f Remove invalid fields prior to fetch
closes #5601

- Remove invalid fields prior to fetch
- Adds initial tests for fields
2015-10-21 18:20:09 +01:00
Hannah Wolfe
ef57d81638 Merge pull request #5972 from delgermurun/pipeline-db
Apply pipeline to db api endpoint
2015-10-21 18:12:30 +01:00
Hannah Wolfe
5a1893d64b Merge pull request #5953 from kevinansfield/fix-invite-revoke
Fix "revoke invite" feature on /team page
2015-10-21 17:56:59 +01:00
Hannah Wolfe
649cd489b9 Merge pull request #5952 from kevinansfield/tag-settings-ui
Minor tag settings validation updates & fixes
2015-10-21 17:40:53 +01:00
Hannah Wolfe
b2ada638c5 Merge pull request #5897 from kevinansfield/fix-cover-post
Fix empty image when navigating to new editor from an editor with image
2015-10-21 17:39:18 +01:00
Delgermurun
b37c0f2e91 Apply pipeline to db api endpoint
refs #5508
- adds pipeline to export, import and delete all methods
2015-10-21 09:33:31 +08:00
Hannah Wolfe
a4cadd50bb Merge pull request #5975 from kevinansfield/bump-ember-tests-timeout
Increase timeout in ember tests
2015-10-20 19:17:36 +01:00
Kevin Ansfield
2839dbc420 Increase timeout in ember tests
no issue
- increases individual test timeout from 5sec to 15sec

It seems Travis is occasionally _very_ slow and will timeout on heavier acceptance tests resulting in random failures. Hopefully this will reduce the number of random test failures we see.
2015-10-20 16:00:16 +01:00
Austin Burdine
bf0a20c1e8 fix session data loading in settings/labs
closes #5973
- updating session data loading to new esa 1.0 api
2015-10-20 07:50:41 -05:00
Kevin Ansfield
d49991f8fc Fix empty image when navigating to new editor from an editor with image
closes #5840
- calls `reset()` on the uploader when re-rendered with a blank image
- calls `reset()` and `initWithImage()` on the uploader when re-rendered with an image and the uploader is still in the "blank" state
2015-10-19 11:55:31 +01:00
Kevin Ansfield
fd73ca72cd Minor tag settings validation updates & fixes
refs #5845
- add tests for `tag-settings` validator
- add validation for tag slug length
- fix display of error message when saving tag fails on the server
- add max chars text to description char count, remove error message as the count/input colour already indicates an error
2015-10-19 10:45:41 +01:00
Kevin Ansfield
5d7ca080c9 Merge pull request #5955 from acburdine/esa-1.0
deps: ember-simple-auth@1.0.0
2015-10-19 10:40:35 +01:00
Sebastian Gierlinger
b9daff6932 Merge pull request #5960 from JohnONolan/emailerror
Email error message cleanup
2015-10-19 10:30:30 +02:00
Austin Burdine
87e54c0d54 deps: ember-simple-auth@1.0.0
closes #5951
- update to esa 1.0
2015-10-18 13:17:02 -05:00
Kevin Ansfield
afa0058f04 Merge pull request #5959 from JohnONolan/pwreset
Fix broken active state on password reset button
2015-10-18 13:11:27 +01:00
Sebastian Gierlinger
c6b505569b Merge pull request #5963 from ErisDS/auth-strategy-refactor
Auth strategy refactor
2015-10-18 11:56:47 +02:00
Austin Burdine
a8de01848f set the settings-menu max width for mobile devices < 350px wide
fixes #5933
- sets the max-width of the settings-menu to 100%
2015-10-17 09:08:10 -05:00
Hannah Wolfe
2c51a89b66 Refactor auth-strategies to use findOne
- Simplifies both strategy & test code
- Should have no side effects
2015-10-16 19:40:02 +01:00
Hannah Wolfe
58e31f3bd8 Refactor auth strategy tests to not use DB
- unit tests are not intended to call out to the db
- this fakes the response from the model layer
2015-10-16 19:40:01 +01:00
Hannah Wolfe
106dcb77be deps: rss@1.2.0
- Required test fix, as newline has been removed from the end of the <?xml decl
2015-10-16 17:53:22 +01:00
John O'Nolan
cd8544858a Email error message cleanup 2015-10-16 12:07:09 +02:00
John O'Nolan
f19fd3ba80 Fix broken active state on password reset button 2015-10-16 11:32:02 +02:00
Sebastian Gierlinger
611f1e969b Merge pull request #5619 from ErisDS/issue-4439-get
The {{#get}} helper
2015-10-15 16:21:37 +02:00
Kevin Ansfield
dd85bdc9d4 Fix "revoke invite" feature on /team page
refs #5947
- override the `findRecord` method of the user adapter to always include "status=all" when querying by ID
2015-10-15 12:45:48 +01:00
Hannah Wolfe
c8bb6081ab Frontend controller refactor & test improvements
no issue

- Split context out of frontend controller
- Add 100% test coverage for context
- Add tests for preview & improve other bits of coverage
- Further refactors (WIP) will make it easier to reach 100% coverage on the frontend
2015-10-15 10:17:42 +01:00
Kevin Ansfield
c29ad9f8c5 Fix "Unsupported rule: jsDoc" when linting
no issue
- add missing jscs-jsdoc dependency and specify plugin in .jscsrc
- fix linting issue in user-test.js
2015-10-15 09:24:39 +01:00
Hannah Wolfe
9650927076 Merge pull request #5946 from kevinansfield/fix-gh-validation-status-container
Fix gh-validation-settings-container throwing error on tag settings page
2015-10-14 17:45:35 +01:00
Hannah Wolfe
932f12160a Merge pull request #5940 from vdemedes/read-themes
Add readThemes() utility to get a list of themes
2015-10-14 17:32:41 +01:00
Hannah Wolfe
b21b36a598 Merge pull request #5928 from kevinansfield/notification-keys
Prevent duplicate alerts and clear on login
2015-10-14 17:24:17 +01:00
Kevin Ansfield
9cabea76aa Fix gh-validation-settings-container throwing error on tag settings page
no issue
- check that component's `hasValidated` property exists
- add tests for `gh-validation-settings-container`
2015-10-14 14:29:04 +01:00
Hannah Wolfe
da78de8f38 Merge pull request #5944 from kevinansfield/fix-ember-test-failures
Fix random ember test failures
2015-10-14 12:31:57 +01:00
Kevin Ansfield
8af13e9aa8 Merge pull request #5865 from acburdine/tag-menu-charcount
Tag Settings Menu Validation
2015-10-14 11:48:30 +01:00
Kevin Ansfield
632ff6a31f Fix random ember test failures
no issue
- increases the timeout because acceptance tests sometimes hit the limit which then caused a knock-on effect through other tests
- fix settings/navigation acceptance tests where it picked up previous test failure error messages
- fix user model unit tests so that `expect` is always called _after_ the runloop has finished handling property updates
2015-10-14 11:26:21 +01:00
Kevin Ansfield
e09cd70cd0 Merge pull request #5912 from HParker/form-default-class-to-none
Form default error class to none
2015-10-13 19:28:43 +01:00
Adam Hess
29d9ac5c4d the form status now defaults to empty string
prevents unvalidated forms from showing up as success
2015-10-13 11:14:44 -06:00
vdemedes
05f44c4c64 Add readThemes() utility to get a list of themes
refs #5923
- add read-themes module to get a list of themes
- replace readDirectory() usage with readThemes(), where only themes are needed
- test read-themes
- test read-directory
- test validate-themes
- test parse-package-json
- add tempfile testing utility to generate temporary paths
2015-10-13 15:54:41 +02:00
Kevin Ansfield
61c3e92d55 Merge pull request #5907 from lcamacho/bug-5800
Shows image on Tag settings
2015-10-13 10:25:55 +01:00
Kevin Ansfield
156260343b Avoid duplicate alerts, clear alerts on successful retry or sign-in
closes #5903, refs #5409
- switch alert/notification component tests from unit to integration where appropriate
- rename `notifications.closeAll` to `notifications.clearAll` to better represent it's behaviour
- add concept of a "key" to alerts/notifications and ability to close only specified keys through notifications service
- close duplicate alerts/notifications before showing a new one
- specify a key for all existing alerts
- close failure alerts on successful retries
- clear all currently displayed alerts on successful sign-in
2015-10-12 19:21:30 +01:00
Kevin Ansfield
ff73f1af92 deps: grunt-jscs@2.1.0
no issue
- update grunt-jscs dependency
- fix deprecated `validateJSDoc` configuration
- fix numerous linting errors, including:
  - use of future-reserved `public` and `private` variable names
  - use of `[]` instead of dot-notation (especially `express['static']` and `cacheRules['x']`)
  - extra spaces in `const { run } = Ember` style constructs

One issue that did become apparent is that there are conflicting rules that prevent the use of object function shorthand such that both of these:

```
{ myFunc() {} }
{ myFunc () {} }
```

are called out due to either the missing or the extra space before the `(`
2015-10-12 19:21:16 +01:00
Kevin Ansfield
4acb7b44f3 deps: ember-mocha@0.8.4 2015-10-12 18:57:43 +01:00
vdemedes
20fec74c73 Refactor require-tree and split it into models
closes #5492
- remove core/server/require-tree.js and split it into modules
- add read-directory module to recursively read directories
- add validate-themes module to scan themes and return errors/warnings
- add parse-package-json module to parse json and validate requirements
- rewrite core/server/models/index.js to manually require models
2015-10-12 17:48:37 +02:00
Hannah Wolfe
7f3a9f5675 Merge pull request #5927 from olsio/fix-issue-5913
fix for page deletion not updating sitemap-page.xml
2015-10-12 15:43:53 +01:00