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

[backend] Add enabled property to injectInput in order to create inje… #2099

Merged
merged 2 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ public class InjectInput {
@JsonProperty("inject_tags")
private List<String> tagIds = new ArrayList<>();

@JsonProperty("inject_enabled")
private boolean enabled = true;

public Inject toInject(@NotNull final InjectorContract injectorContract) {
Inject inject = new Inject();
inject.setTitle(getTitle());
Expand All @@ -66,6 +69,7 @@ public Inject toInject(@NotNull final InjectorContract injectorContract) {
inject.setAllTeams(isAllTeams());
inject.setCountry(getCountry());
inject.setCity(getCity());
inject.setEnabled(isEnabled());
return inject;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public void testCreateScenario_ValidInput() throws Exception {
@Test
@DisplayName(
"Test to validate existence of 'Add Inject to Scenario' endpoint and validate InjectInput")
public void testCreateInjectForScenario_ValidInput() throws Exception {
public void testCreateInjectForScenario_ValidInput_Additional_param() throws Exception {
// -- PREPARE --
String jsonInput =
"{"
Expand All @@ -174,6 +174,7 @@ public void testCreateInjectForScenario_ValidInput() throws Exception {
+ "\"inject_content\": null, "
+ "\"inject_depends_duration\": 100, "
+ "\"inject_tags\": [\"Tag1\"], "
+ "\"inject_enabled\": false, "
+ "\"inject_additional_param\": \"additional_param\""
+ "}";

Expand Down
Loading