Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support objects in multivariant args (#713)
* added adjustValue to mutator * add option to hide icon from TypedInput * add support for new weighed args format * fix property error * fix test * bump editor version * code review * added integration test
- Loading branch information
Showing
17 changed files
with
378 additions
and
157 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const { expect } = require('chai'); | ||
const { init: initClients } = require('../../utils/clients'); | ||
|
||
const objectFormatKey = 'integration_tests/value_distribution/object_format'; | ||
const arrayFormatKey = 'integration_tests/value_distribution/array_format'; | ||
|
||
describe('tweek api - value distribution', () => { | ||
let clients; | ||
before(async () => { | ||
clients = await initClients(); | ||
}); | ||
|
||
it('should get correct value - array format', async () => { | ||
const result = await clients.api.get(`/api/v1/keys/${arrayFormatKey}?user=some_user`); | ||
expect(JSON.parse(result.body)).to.equal(15); | ||
}); | ||
|
||
it('should get correct value - object format', async () => { | ||
const result = await clients.api.get(`/api/v1/keys/${objectFormatKey}?user=some_user`); | ||
expect(JSON.parse(result.body)).to.equal(15); | ||
}); | ||
}); |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.