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

Correct query string #780

Merged
merged 2 commits into from Jun 22, 2019
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -11,6 +11,7 @@
### Changes

- Small UX/UI fixes @sneridagh
- Fix query string search in subjects vocab field @gomez
- Removed the delete button from the title tile @pnicolli

### Internal
@@ -25,7 +25,7 @@ export function getVocabulary(vocabNameOrURL, query = null, start = 0) {
);
let queryString = `b_start=${start}`;
if (query) {
queryString = `${queryString}&q=${query}`;
queryString = `${queryString}&title=${query}`;
}
return {
type: GET_VOCABULARY,
@@ -5,13 +5,14 @@ describe('Vocabularies actions', () => {
describe('getVocabulary', () => {
it('should create an action to get a vocabulary', () => {
const vocabulary = 'plone.app.vocabularies.Keywords';
const action = getVocabulary(vocabulary);
const query = 'john';
const action = getVocabulary(vocabulary, query);

expect(action.type).toEqual(GET_VOCABULARY);
expect(action.vocabulary).toEqual(vocabulary);
expect(action.request.op).toEqual('get');
expect(action.request.path).toEqual(
`/@vocabularies/${vocabulary}?b_start=0`,
`/@vocabularies/${vocabulary}?b_start=0&title=${query}`,
);
});
});
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.