diff --git a/src/main/java/com/crowdin/cli/client/CrowdinProjectClient.java b/src/main/java/com/crowdin/cli/client/CrowdinProjectClient.java index 02290b889..d376a40b7 100644 --- a/src/main/java/com/crowdin/cli/client/CrowdinProjectClient.java +++ b/src/main/java/com/crowdin/cli/client/CrowdinProjectClient.java @@ -128,6 +128,18 @@ public List getBranchProgress(Long branchId) { .getBranchProgress(this.projectId, branchId, limit, offset)); } + @Override + public List getFileProgress(Long fileId) { + return executeRequestFullList((limit, offset) -> this.client.getTranslationStatusApi() + .getFileProgress(this.projectId, fileId, limit, offset)); + } + + @Override + public List getDirectoryProgress(Long directoryId) { + return executeRequestFullList((limit, offset) -> this.client.getTranslationStatusApi() + .getDirectoryProgress(this.projectId, directoryId, limit, offset)); + } + @Override public Branch addBranch(AddBranchRequest request) { return executeRequest(() -> this.client.getSourceFilesApi() diff --git a/src/main/java/com/crowdin/cli/client/ProjectClient.java b/src/main/java/com/crowdin/cli/client/ProjectClient.java index e749fa525..db8ef0c8d 100644 --- a/src/main/java/com/crowdin/cli/client/ProjectClient.java +++ b/src/main/java/com/crowdin/cli/client/ProjectClient.java @@ -77,6 +77,10 @@ default CrowdinProjectFull downloadFullProject() { List getBranchProgress(Long branchId); + List getFileProgress(Long fileId); + + List getDirectoryProgress(Long directoryId); + SourceString addSourceString(AddSourceStringRequest request); List listSourceString(Long fileId, Long branchId, String labelIds, String filter, String croql); diff --git a/src/main/java/com/crowdin/cli/commands/Actions.java b/src/main/java/com/crowdin/cli/commands/Actions.java index baab4550a..a9eb21da1 100644 --- a/src/main/java/com/crowdin/cli/commands/Actions.java +++ b/src/main/java/com/crowdin/cli/commands/Actions.java @@ -44,7 +44,7 @@ NewAction listTranslations( NewAction listLanguages(BaseCli.LanguageCode code, boolean noProgress, boolean plainView); NewAction status( - boolean noProgress, String branchName, String languageId, boolean isVerbose, boolean showTranslated, boolean showApproved, boolean failIfIncomplete); + boolean noProgress, String branchName, String languageId, String file, String directory, boolean isVerbose, boolean showTranslated, boolean showApproved, boolean failIfIncomplete); NewAction stringAdd( boolean noProgress, String text, String identifier, Integer maxLength, String context, List files, List labelNames, Boolean hidden); diff --git a/src/main/java/com/crowdin/cli/commands/actions/CliActions.java b/src/main/java/com/crowdin/cli/commands/actions/CliActions.java index 6f89d0fc6..3e5055d84 100644 --- a/src/main/java/com/crowdin/cli/commands/actions/CliActions.java +++ b/src/main/java/com/crowdin/cli/commands/actions/CliActions.java @@ -71,9 +71,9 @@ public NewAction listLanguages(BaseCli.Languag @Override public NewAction status( - boolean noProgress, String branchName, String languageId, boolean isVerbose, boolean showTranslated, boolean showApproved, boolean failIfIncomplete + boolean noProgress, String branchName, String languageId, String file, String directory, boolean isVerbose, boolean showTranslated, boolean showApproved, boolean failIfIncomplete ) { - return new StatusAction(noProgress, branchName, languageId, isVerbose, showTranslated, showApproved, failIfIncomplete); + return new StatusAction(noProgress, branchName, languageId, file, directory, isVerbose, showTranslated, showApproved, failIfIncomplete); } @Override diff --git a/src/main/java/com/crowdin/cli/commands/actions/StatusAction.java b/src/main/java/com/crowdin/cli/commands/actions/StatusAction.java index 9efff6575..ad8eb7ebc 100644 --- a/src/main/java/com/crowdin/cli/commands/actions/StatusAction.java +++ b/src/main/java/com/crowdin/cli/commands/actions/StatusAction.java @@ -1,10 +1,11 @@ package com.crowdin.cli.commands.actions; -import com.crowdin.cli.client.CrowdinProject; +import com.crowdin.cli.client.CrowdinProjectFull; import com.crowdin.cli.client.ProjectClient; import com.crowdin.cli.commands.NewAction; import com.crowdin.cli.commands.Outputter; import com.crowdin.cli.properties.ProjectProperties; +import com.crowdin.cli.utils.Utils; import com.crowdin.cli.utils.console.ConsoleSpinner; import com.crowdin.client.sourcefiles.model.Branch; import com.crowdin.client.translationstatus.model.LanguageProgress; @@ -21,15 +22,19 @@ class StatusAction implements NewAction { private boolean noProgress; private String branchName; private String languageId; + private String file; + private String directory; private boolean isVerbose; private boolean showTranslated; private boolean showApproved; private boolean failIfIncomplete; - public StatusAction(boolean noProgress, String branchName, String languageId, boolean isVerbose, boolean showTranslated, boolean showApproved, boolean failIfIncomplete) { + public StatusAction(boolean noProgress, String branchName, String languageId, String file, String directory, boolean isVerbose, boolean showTranslated, boolean showApproved, boolean failIfIncomplete) { this.noProgress = noProgress; this.branchName = branchName; this.languageId = languageId; + this.file = file; + this.directory = directory; this.isVerbose = isVerbose; this.showTranslated = showTranslated; this.showApproved = showApproved; @@ -38,8 +43,8 @@ public StatusAction(boolean noProgress, String branchName, String languageId, bo @Override public void act(Outputter out, ProjectProperties pb, ProjectClient client) { - CrowdinProject project = ConsoleSpinner.execute(out, "message.spinner.fetching_project_info", "error.collect_project_info", - this.noProgress, false, client::downloadProjectWithLanguages); + CrowdinProjectFull project = ConsoleSpinner.execute(out, "message.spinner.fetching_project_info", "error.collect_project_info", + this.noProgress, false, () -> client.downloadFullProject(branchName)); if (languageId != null) { project.findLanguageById(languageId, true) @@ -53,15 +58,32 @@ public void act(Outputter out, ProjectProperties pb, ProjectClient client) { .getId(); List progresses; - if (branchId == null) { - progresses = client.getProjectProgress(languageId); - } else { + + if (file != null) { + String filePath = Utils.unixPath(Utils.sepAtStart(file)); + Long fileId = project.getFileInfos().stream() + .filter(f -> filePath.equals(f.getPath())) + .findFirst() + .orElseThrow(() -> new RuntimeException(String.format(RESOURCE_BUNDLE.getString("error.file_not_exists"), file))) + .getId(); + progresses = client.getFileProgress(fileId); + } else if (directory != null) { + String directoryPath = Utils.unixPath(Utils.sepAtStart(directory)); + Long directoryId = project.getDirectories().values().stream() + .filter(d -> directoryPath.equals(d.getPath())) + .findFirst() + .orElseThrow(() -> new RuntimeException(String.format(RESOURCE_BUNDLE.getString("error.dir_not_exists"), directory))) + .getId(); + progresses = client.getDirectoryProgress(directoryId); + } else if (branchId != null) { progresses = client.getBranchProgress(branchId); - if (languageId != null) { - progresses = progresses.stream() + } else { + progresses = client.getProjectProgress(languageId); + } + if (languageId != null) { + progresses = progresses.stream() .filter(langProgress -> languageId.equals(langProgress.getLanguageId())) .collect(Collectors.toList()); - } } if (isVerbose) { diff --git a/src/main/java/com/crowdin/cli/commands/picocli/StatusProofreadingSubcommand.java b/src/main/java/com/crowdin/cli/commands/picocli/StatusProofreadingSubcommand.java index e6a9a0c63..744c044ef 100644 --- a/src/main/java/com/crowdin/cli/commands/picocli/StatusProofreadingSubcommand.java +++ b/src/main/java/com/crowdin/cli/commands/picocli/StatusProofreadingSubcommand.java @@ -6,6 +6,11 @@ import com.crowdin.cli.properties.ProjectProperties; import picocli.CommandLine; +import java.util.ArrayList; +import java.util.List; + +import static java.util.Objects.nonNull; + @CommandLine.Command( name = CommandNames.STATUS_PROOFREADING, sortOptions = false @@ -18,11 +23,26 @@ class StatusProofreadingSubcommand extends ActCommandProject { @CommandLine.Option(names = {"-b", "--branch"}, paramLabel = "...", order = -2) protected String branchName; + @CommandLine.Option(names = {"-f", "--file"}, paramLabel = "...", descriptionKey = "crowdin.status.file-path", order = -2) + protected String file; + + @CommandLine.Option(names = {"-d", "--directory"}, paramLabel = "...", descriptionKey = "crowdin.status.directory-path", order = -2) + protected String directory; + @CommandLine.Option(names = {"--fail-if-incomplete"}, paramLabel = "...", order = -2) protected boolean failIfIncomplete; @Override protected NewAction getAction(Actions actions) { - return actions.status(noProgress, branchName, languageId, isVerbose, false, true, failIfIncomplete); + return actions.status(noProgress, branchName, languageId, file, directory, isVerbose, false, true, failIfIncomplete); + } + + @Override + protected List checkOptions() { + List errors = new ArrayList<>(); + if (nonNull(directory) && nonNull(file)) { + errors.add(RESOURCE_BUNDLE.getString("error.status.only_one_allowed")); + } + return errors; } } diff --git a/src/main/java/com/crowdin/cli/commands/picocli/StatusSubcommand.java b/src/main/java/com/crowdin/cli/commands/picocli/StatusSubcommand.java index 4b16de61c..9bf2c9562 100644 --- a/src/main/java/com/crowdin/cli/commands/picocli/StatusSubcommand.java +++ b/src/main/java/com/crowdin/cli/commands/picocli/StatusSubcommand.java @@ -6,6 +6,11 @@ import com.crowdin.cli.properties.ProjectProperties; import picocli.CommandLine; +import java.util.ArrayList; +import java.util.List; + +import static java.util.Objects.nonNull; + @CommandLine.Command( name = CommandNames.STATUS, sortOptions = false, @@ -22,11 +27,26 @@ class StatusSubcommand extends ActCommandProject { @CommandLine.Option(names = {"-b", "--branch"}, paramLabel = "...", order = -2) protected String branchName; + @CommandLine.Option(names = {"-f", "--file"}, paramLabel = "...", descriptionKey = "crowdin.status.file-path", order = -2) + protected String file; + + @CommandLine.Option(names = {"-d", "--directory"}, paramLabel = "...", descriptionKey = "crowdin.status.directory-path", order = -2) + protected String directory; + @CommandLine.Option(names = {"--fail-if-incomplete"}, paramLabel = "...", order = -2) protected boolean failIfIncomplete; @Override protected NewAction getAction(Actions actions) { - return actions.status(noProgress, branchName, languageId, isVerbose, true, true, failIfIncomplete); + return actions.status(noProgress, branchName, languageId, file, directory, isVerbose, true, true, failIfIncomplete); + } + + @Override + protected List checkOptions() { + List errors = new ArrayList<>(); + if (nonNull(directory) && nonNull(file)) { + errors.add(RESOURCE_BUNDLE.getString("error.status.only_one_allowed")); + } + return errors; } } diff --git a/src/main/java/com/crowdin/cli/commands/picocli/StatusTranslationSubcommand.java b/src/main/java/com/crowdin/cli/commands/picocli/StatusTranslationSubcommand.java index a580c8c55..b366afe59 100644 --- a/src/main/java/com/crowdin/cli/commands/picocli/StatusTranslationSubcommand.java +++ b/src/main/java/com/crowdin/cli/commands/picocli/StatusTranslationSubcommand.java @@ -6,6 +6,11 @@ import com.crowdin.cli.properties.ProjectProperties; import picocli.CommandLine; +import java.util.ArrayList; +import java.util.List; + +import static java.util.Objects.nonNull; + @CommandLine.Command( name = CommandNames.STATUS_TRANSLATION, sortOptions = false @@ -18,11 +23,26 @@ class StatusTranslationSubcommand extends ActCommandProject { @CommandLine.Option(names = {"-b", "--branch"}, paramLabel = "...", order = -2) protected String branchName; + @CommandLine.Option(names = {"-f", "--file"}, paramLabel = "...", descriptionKey = "crowdin.status.file-path", order = -2) + protected String file; + + @CommandLine.Option(names = {"-d", "--directory"}, paramLabel = "...", descriptionKey = "crowdin.status.directory-path", order = -2) + protected String directory; + @CommandLine.Option(names = {"--fail-if-incomplete"}, paramLabel = "...", order = -2) protected boolean failIfIncomplete; @Override protected NewAction getAction(Actions actions) { - return actions.status(noProgress, branchName, languageId, isVerbose, true, false, failIfIncomplete); + return actions.status(noProgress, branchName, languageId, file, directory, isVerbose, true, false, failIfIncomplete); + } + + @Override + protected List checkOptions() { + List errors = new ArrayList<>(); + if (nonNull(directory) && nonNull(file)) { + errors.add(RESOURCE_BUNDLE.getString("error.status.only_one_allowed")); + } + return errors; } } diff --git a/src/main/resources/messages/messages.properties b/src/main/resources/messages/messages.properties index ba3cea482..27a8ff1ee 100755 --- a/src/main/resources/messages/messages.properties +++ b/src/main/resources/messages/messages.properties @@ -126,6 +126,8 @@ crowdin.status.usage.description=Show translation and proofreading progress for crowdin.status.usage.customSynopsis=@|fg(green) crowdin status|@ [SUBCOMMAND] [CONFIG OPTIONS] [OPTIONS] crowdin.status.language=Use this option to show progress for a single specified language. Default: all crowdin.status.fail-if-incomplete=Fail execution if the current project is not fully approved +crowdin.status.directory-path=Path to the directory in Crowdin +crowdin.status.file-path=Path to the source file in Crowdin # CROWDIN STATUS TRANSLATION COMMAND crowdin.status.translation.usage.description=Show only translation progress for a project @@ -449,6 +451,8 @@ error.glossary.first_line_contains_header_and_wrong_format='--first-line-contain error.glossary.no_permission=You do not have permission to manage this glossary error.glossary.no_language_id='--language' is required for creating new glossary +error.status.only_one_allowed=Only one of the following options can be used at a time: '--file', '--directory' + error.tm.build_tm=Failed to build the translation memory error.tm.not_found_by_id=Couldn't find translation memory by the specified ID error.tm.not_found_by_name=Couldn't find translation memory by the specified name diff --git a/src/test/java/com/crowdin/cli/commands/actions/CliActionsTest.java b/src/test/java/com/crowdin/cli/commands/actions/CliActionsTest.java index b75958835..33b11c258 100644 --- a/src/test/java/com/crowdin/cli/commands/actions/CliActionsTest.java +++ b/src/test/java/com/crowdin/cli/commands/actions/CliActionsTest.java @@ -44,7 +44,7 @@ public void testListTranslations() { @Test public void testStatus() { - assertNotNull(actions.status(false, null, null, false, false, false, false)); + assertNotNull(actions.status(false, null, null, null, null, false, false, false, false)); } @Test diff --git a/src/test/java/com/crowdin/cli/commands/actions/StatusActionTest.java b/src/test/java/com/crowdin/cli/commands/actions/StatusActionTest.java index c34ce0e9d..e18ad8d78 100644 --- a/src/test/java/com/crowdin/cli/commands/actions/StatusActionTest.java +++ b/src/test/java/com/crowdin/cli/commands/actions/StatusActionTest.java @@ -1,5 +1,6 @@ package com.crowdin.cli.commands.actions; +import com.crowdin.cli.client.CrowdinProjectFull; import com.crowdin.cli.client.ProjectBuilder; import com.crowdin.cli.client.ProjectClient; import com.crowdin.cli.commands.Outputter; @@ -8,6 +9,8 @@ import com.crowdin.cli.properties.PropertiesWithFiles; import com.crowdin.cli.utils.Utils; import com.crowdin.client.sourcefiles.model.Branch; +import com.crowdin.client.sourcefiles.model.Directory; +import com.crowdin.client.sourcefiles.model.FileInfo; import com.crowdin.client.translationstatus.model.LanguageProgress; import com.crowdin.client.translationstatus.model.Progress; import org.junit.jupiter.api.Test; @@ -45,15 +48,13 @@ public void testStatus(){ PropertiesWithFiles pb = pbBuilder.build(); ProjectBuilder projectBuilder = ProjectBuilder.emptyProject(Long.parseLong(pb.getProjectId())); - when(projectClient.downloadProjectWithLanguages()) + when(projectClient.downloadFullProject("TestBranch")) .thenReturn(projectBuilder.build()); - statusAction = new StatusAction(noProgress, branchName, languageId, isVerbose, showTranslated, showApproved, failIfIncomplete); + statusAction = new StatusAction(noProgress, branchName, languageId, null, null, isVerbose, showTranslated, showApproved, failIfIncomplete); when(languageProgress.getApprovalProgress()).thenReturn(99); when(languageProgress.getLanguageId()).thenReturn("ua"); when(branch.getId()).thenReturn(123L); when(branch.getName()).thenReturn("TestBranch"); - when(projectClient.getProjectProgress(null)) - .thenReturn(Collections.singletonList(languageProgress)); when(projectClient.getBranchProgress(123L)) .thenReturn(Collections.singletonList(languageProgress)); when(projectClient.listBranches()). @@ -63,7 +64,7 @@ public void testStatus(){ statusAction.act(Outputter.getDefault(), projectProperties, projectClient); - verify(projectClient).downloadProjectWithLanguages(); + verify(projectClient).downloadFullProject("TestBranch"); verify(projectClient).listBranches(); verify(projectClient).getBranchProgress(123L); verifyNoMoreInteractions(projectClient); @@ -89,16 +90,16 @@ public void testStatusIfIncomplete(boolean noProgress, String branchName, String PropertiesWithFiles pb = pbBuilder.build(); ProjectBuilder projectBuilder = ProjectBuilder.emptyProject(Long.parseLong(pb.getProjectId())); - when(projectClient.downloadProjectWithLanguages()) + when(projectClient.downloadFullProject(branchName)) .thenReturn(projectBuilder.build()); - statusAction = new StatusAction(noProgress, branchName, languageId, isVerbose, showTranslated, showApproved, failIfIncomplete); + statusAction = new StatusAction(noProgress, branchName, languageId, null, null, isVerbose, showTranslated, showApproved, failIfIncomplete); when(languageProgress.getApprovalProgress()).thenReturn(99); when(projectClient.getProjectProgress(null)) .thenReturn(Collections.singletonList(languageProgress)); assertThrows( RuntimeException.class, () -> statusAction.act(Outputter.getDefault(), projectProperties, projectClient)); - verify(projectClient).downloadProjectWithLanguages(); + verify(projectClient).downloadFullProject(branchName); verify(projectClient).listBranches(); verify(projectClient).getProjectProgress(null); verifyNoMoreInteractions(projectClient); @@ -128,14 +129,14 @@ void statusActionWhenBranchIsNotFoundThenThrowException() { ProjectBuilder projectBuilder = ProjectBuilder.emptyProject(Long.parseLong(pb.getProjectId())); ProjectClient client = mock(ProjectClient.class); - when(client.downloadProjectWithLanguages()) + when(client.downloadFullProject(branchName)) .thenReturn(projectBuilder.build()); - statusAction = new StatusAction(noProgress, branchName, null, isVerbose, showTranslated, showApproved, failIfIncomplete); + statusAction = new StatusAction(noProgress, branchName, null, null, null, isVerbose, showTranslated, showApproved, failIfIncomplete); when(client.listBranches()).thenReturn(Collections.emptyList()); assertThrows( RuntimeException.class, () -> statusAction.act(Outputter.getDefault(), null, client)); - verify(client).downloadProjectWithLanguages(); + verify(client).downloadFullProject(branchName); verify(client).listBranches(); verifyNoMoreInteractions(client); } @@ -155,15 +156,78 @@ void statusActionWhenLanguageIdIsNotFoundThenThrowException() { ProjectBuilder projectBuilder = ProjectBuilder.emptyProject(Long.parseLong(pb.getProjectId())); ProjectClient client = mock(ProjectClient.class); - when(client.downloadProjectWithLanguages()) + when(client.downloadFullProject(null)) .thenReturn(projectBuilder.build()); - statusAction = new StatusAction(noProgress, null, languageId, isVerbose, showTranslated, showApproved, failIfIncomplete); + statusAction = new StatusAction(noProgress, null, languageId, null, null, isVerbose, showTranslated, showApproved, failIfIncomplete); when(client.listBranches()).thenReturn(Collections.emptyList()); assertThrows( RuntimeException.class, () -> statusAction.act(Outputter.getDefault(), null, client)); - verify(client).downloadProjectWithLanguages(); + verify(client).downloadFullProject(null); verifyNoMoreInteractions(client); } + @Test + public void testStatusWithFile(){ + String file = "file.json"; + ProjectClient projectClient = mock(ProjectClient.class); + ProjectProperties projectProperties = mock(ProjectProperties.class); + LanguageProgress languageProgress = mock(LanguageProgress.class); + CrowdinProjectFull projectFull = mock(CrowdinProjectFull.class); + Branch branch = mock(Branch.class); + FileInfo fileInfo = mock(FileInfo.class); + + when(projectClient.downloadFullProject(null)).thenReturn(projectFull); + when(fileInfo.getId()).thenReturn(12L); + when(fileInfo.getPath()).thenReturn("/file.json"); + when(languageProgress.getApprovalProgress()).thenReturn(99); + when(languageProgress.getLanguageId()).thenReturn("ua"); + when(projectFull.getFileInfos()).thenReturn(Arrays.asList(fileInfo)); + when(projectClient.getFileProgress(123L)) + .thenReturn(Collections.singletonList(languageProgress)); + when(projectClient.listBranches()). + thenReturn(Collections.singletonList(branch)); + when(languageProgress.getWords()).thenReturn(getWords()); + when(languageProgress.getPhrases()).thenReturn(getWords()); + + statusAction = new StatusAction(true, null, null, file, null, true, true, true, true); + statusAction.act(Outputter.getDefault(), projectProperties, projectClient); + + verify(projectClient).downloadFullProject(null); + verify(projectClient).listBranches(); + verify(projectClient).getFileProgress(12L); + verifyNoMoreInteractions(projectClient); + } + + @Test + public void testStatusWithDirectory(){ + String directoryPath = "directory"; + ProjectClient projectClient = mock(ProjectClient.class); + ProjectProperties projectProperties = mock(ProjectProperties.class); + LanguageProgress languageProgress = mock(LanguageProgress.class); + CrowdinProjectFull projectFull = mock(CrowdinProjectFull.class); + Branch branch = mock(Branch.class); + Directory directory = mock(Directory.class); + + when(projectClient.downloadFullProject(null)).thenReturn(projectFull); + when(directory.getId()).thenReturn(12L); + when(directory.getPath()).thenReturn("/directory"); + when(languageProgress.getApprovalProgress()).thenReturn(99); + when(languageProgress.getLanguageId()).thenReturn("ua"); + when(projectFull.getDirectories()).thenReturn(Collections.singletonMap(12L, directory)); + when(projectClient.getFileProgress(123L)) + .thenReturn(Collections.singletonList(languageProgress)); + when(projectClient.listBranches()). + thenReturn(Collections.singletonList(branch)); + when(languageProgress.getWords()).thenReturn(getWords()); + when(languageProgress.getPhrases()).thenReturn(getWords()); + + statusAction = new StatusAction(true, null, null, null, directoryPath, true, true, true, true); + statusAction.act(Outputter.getDefault(), projectProperties, projectClient); + + verify(projectClient).downloadFullProject(null); + verify(projectClient).listBranches(); + verify(projectClient).getDirectoryProgress(12L); + verifyNoMoreInteractions(projectClient); + } } diff --git a/src/test/java/com/crowdin/cli/commands/picocli/PicocliTestUtils.java b/src/test/java/com/crowdin/cli/commands/picocli/PicocliTestUtils.java index 8609e367e..2bfc6e033 100644 --- a/src/test/java/com/crowdin/cli/commands/picocli/PicocliTestUtils.java +++ b/src/test/java/com/crowdin/cli/commands/picocli/PicocliTestUtils.java @@ -70,7 +70,7 @@ void mockActions() { .thenReturn(actionMock); when(actionsMock.listTranslations(anyBoolean(), anyBoolean(), anyBoolean(), anyBoolean(), anyBoolean(), anyBoolean())) .thenReturn(actionMock); - when(actionsMock.status(anyBoolean(), any(), any(), anyBoolean(), anyBoolean(), anyBoolean(), anyBoolean())) + when(actionsMock.status(anyBoolean(), any(), any(), any(), any(), anyBoolean(), anyBoolean(), anyBoolean(), anyBoolean())) .thenReturn(actionMock); when(actionsMock.stringAdd(anyBoolean(), any(), any(), any(), any(), any(), any(), any())) .thenReturn(actionMock); diff --git a/src/test/java/com/crowdin/cli/commands/picocli/StatusProofreadingSubcommandTest.java b/src/test/java/com/crowdin/cli/commands/picocli/StatusProofreadingSubcommandTest.java index 10f3ca2c4..99f782a9d 100644 --- a/src/test/java/com/crowdin/cli/commands/picocli/StatusProofreadingSubcommandTest.java +++ b/src/test/java/com/crowdin/cli/commands/picocli/StatusProofreadingSubcommandTest.java @@ -13,7 +13,7 @@ public class StatusProofreadingSubcommandTest extends PicocliTestUtils { public void testStatusProofreading() { this.execute(CommandNames.STATUS, CommandNames.STATUS_PROOFREADING); verify(actionsMock) - .status(anyBoolean(), any(), any(), anyBoolean(), eq(false), eq(true), eq(false)); + .status(anyBoolean(), any(), any(), any(), any(), anyBoolean(), eq(false), eq(true), eq(false)); this.check(true); } } diff --git a/src/test/java/com/crowdin/cli/commands/picocli/StatusSubcommandTest.java b/src/test/java/com/crowdin/cli/commands/picocli/StatusSubcommandTest.java index 754399497..4d1afc9bc 100644 --- a/src/test/java/com/crowdin/cli/commands/picocli/StatusSubcommandTest.java +++ b/src/test/java/com/crowdin/cli/commands/picocli/StatusSubcommandTest.java @@ -13,7 +13,7 @@ public class StatusSubcommandTest extends PicocliTestUtils { public void testStatus() { this.execute(CommandNames.STATUS); verify(actionsMock) - .status(anyBoolean(), any(), any(), anyBoolean(), eq(true), eq(true), anyBoolean()); + .status(anyBoolean(), any(), any(), any(), any(), anyBoolean(), eq(true), eq(true), anyBoolean()); this.check(true); } } diff --git a/src/test/java/com/crowdin/cli/commands/picocli/StatusTranslationsSubcommandTest.java b/src/test/java/com/crowdin/cli/commands/picocli/StatusTranslationsSubcommandTest.java index 109d7b617..b5e389238 100644 --- a/src/test/java/com/crowdin/cli/commands/picocli/StatusTranslationsSubcommandTest.java +++ b/src/test/java/com/crowdin/cli/commands/picocli/StatusTranslationsSubcommandTest.java @@ -13,7 +13,7 @@ public class StatusTranslationsSubcommandTest extends PicocliTestUtils { public void testStatusTranslations() { this.execute(CommandNames.STATUS, CommandNames.STATUS_TRANSLATION); verify(actionsMock) - .status(anyBoolean(), any(), any(), anyBoolean(), eq(true), eq(false), eq(false)); + .status(anyBoolean(), any(), any(), any(), any(), anyBoolean(), eq(true), eq(false), eq(false)); this.check(true); } }