Add is_extended_promotional to components output + filters#128
Closed
gavin-openops wants to merge 2 commits intotscircuit:mainfrom
Closed
Add is_extended_promotional to components output + filters#128gavin-openops wants to merge 2 commits intotscircuit:mainfrom
gavin-openops wants to merge 2 commits intotscircuit:mainfrom
Conversation
tests/routes/components/list.test.ts
Outdated
Comment on lines
+15
to
+22
| test("GET /components/list supports is_extended_promotional filter", async () => { | ||
| const { axios } = await getTestServer() | ||
| const res = await axios.get( | ||
| "/components/list?json=true&is_extended_promotional=true", | ||
| ) | ||
|
|
||
| expect(res.data).toHaveProperty("components") | ||
| expect(Array.isArray(res.data.components)).toBe(true) |
Contributor
There was a problem hiding this comment.
This test file now contains 2 test() functions, which violates the rule that a *.test.ts file may have AT MOST one test(...). After adding the second test, the file should be split into multiple numbered files such as 'list1.test.ts' and 'list2.test.ts'.
Spotted by Graphite (based on custom rule: Custom rule)
Is this helpful? React 👍 or 👎 to let us know.
Author
|
Thanks — fixed. I split the tests into numbered files to satisfy the one-test-per-file rule:
Pushed in commit d9cc67e. |
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/claim #92
Summary
is_extended_promotionalto the components/v_components TypeScript db modelis_extended_promotionalin/components/listJSON outputis_extended_promotionalquery param filtering in the components list routeNotes
preferredexplicitly in components query since it is referenced in mapped output.