Skip to content
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 @@ -145,9 +145,9 @@ private void OkButton_Click(object sender, RoutedEventArgs e)
Reporter.ToUser(eUserMsgKey.FolderNameTextBoxIsEmpty);
return;
}
else if (extraInformationCalculated.Length > 100)
else if (extraInformationCalculated.Length > 255)
{
Reporter.ToUser(eUserMsgKey.FolderNamesAreTooLong);
Reporter.ToUser(eUserMsgKey.FolderPathsAreTooLong);
Comment on lines +148 to +150

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Finish updating the other report configuration validators.

This page now allows 255 characters, but Ginger/Ginger/Reports/HTMLReportsConfigurationPage.xaml.cs:172-180 and Ginger/Ginger/Reports/ExecutionResultsConfiguration.xaml.cs:150-158 still reject values over 100 and show FolderNamesAreTooLong. Users will still hit the old limit in those report config pages.

🐛 Proposed fix for the remaining report pages
- if (HTMLReportFolderTextBox.Text.Length > 100)
+ if (HTMLReportFolderTextBox.Text.Length > 255)
  {
-     Reporter.ToUser(eUserMsgKey.FolderNamesAreTooLong);
+     Reporter.ToUser(eUserMsgKey.FolderPathsAreTooLong);
      return;
  }
- if (FolderTextBox.Text.Length > 100)
+ if (FolderTextBox.Text.Length > 255)
  {
-     Reporter.ToUser(eUserMsgKey.FolderNamesAreTooLong);
+     Reporter.ToUser(eUserMsgKey.FolderPathsAreTooLong);
      return;
  }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Ginger/Ginger/Reports/HTMLReportAttachmentConfigurationPage.xaml.cs` around
lines 148 - 150, Update the remaining report configuration validators so they
match the 255-char limit and error key used in
HTMLReportAttachmentConfigurationPage: find the length checks in
HTMLReportsConfigurationPage.xaml.cs and ExecutionResultsConfiguration.xaml.cs
that currently enforce >100 and call
Reporter.ToUser(eUserMsgKey.FolderNamesAreTooLong); change the numeric check to
>255 and update the Reporter.ToUser call to use
eUserMsgKey.FolderPathsAreTooLong so users aren’t blocked by the old 100-char
limit or shown the wrong message.

return;
}
}
Expand Down
3 changes: 2 additions & 1 deletion Ginger/GingerCoreCommon/ReporterLib/UserMsgsPool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public enum eUserMsgKey
ActivitiesGroupAlreadyMappedToTC, ExportItemToALMFailed, AskIfToSaveBFAfterExport, ALMIncorrectExternalID,
BusinessFlowAlreadyMappedToTC, AskIfSureWantToClose, AskIfSureWantToCloseWithoutNote, AskIfSureWantToRestart, AskIfSureWantToRestartWithoutNote, AskIfSureWantToRestartInAdminMode, WindowClosed, TargetWindowNotSelected,
ChangingEnvironmentParameterValue, IFSaveChangesOfBF, AskIfToLoadExternalFields, WhetherToOpenSolution,
AutomationTabExecResultsNotExists, FolderNamesAreTooLong, FolderSizeTooSmall, DefaultTemplateCantBeDeleted, FileNotExist, ExecutionsResultsProdIsNotOn, ExecutionsResultsNotExists, ExecutionsResultsToDelete, AllExecutionsResultsToDelete, FilterNotBeenSet, RetreivingAllElements, ClickElementAgain, CloseFilterPage,
AutomationTabExecResultsNotExists, FolderNamesAreTooLong, FolderPathsAreTooLong, FolderSizeTooSmall, DefaultTemplateCantBeDeleted, FileNotExist, ExecutionsResultsProdIsNotOn, ExecutionsResultsNotExists, ExecutionsResultsToDelete, AllExecutionsResultsToDelete, FilterNotBeenSet, RetreivingAllElements, ClickElementAgain, CloseFilterPage,
BusinessFlowNeedTargetApplication, HTMLReportAttachment, ImageSize, ImageSizeTill5Mb,
GherkinAskToSaveFeatureFile, GherkinScenariosGenerated, GherkinNotifyFeatureFileExists, GherkinNotifyFeatureFileSelectedFromTheSolution, GherkinNotifyBFIsNotExistForThisFeatureFile, GherkinFileNotFound, GherkinColumnNotExist, GherkinActivityNotFound, GherkinBusinessFlowNotCreated, GherkinFeatureFileImportedSuccessfully, GherkinFeatureFileImportOnlyFeatureFileAllowedErrorMessage,
AskIfSureWantToDeLink, AnalyzerFoundIssues, AnalyzerFoundNoIssues, AnalyzerSaveRunSet,
Expand Down Expand Up @@ -616,6 +616,7 @@ public static void LoadUserMsgsPool()
{ eUserMsgKey.ReportTemplateNotFound, new UserMsg(eUserMsgType.ERROR, "Report Template", "Report Template '{0}' not found", eUserMsgOption.OK, eUserMsgSelection.None) },
{ eUserMsgKey.AutomationTabExecResultsNotExists, new UserMsg(eUserMsgType.WARN, "Execution Results are not existing", "Results from last execution are not existing (yet). Nothing to report, please wait for execution finish and click on report creation.", eUserMsgOption.OK, eUserMsgSelection.None) },
{ eUserMsgKey.FolderNamesAreTooLong, new UserMsg(eUserMsgType.WARN, "Folders Names Are Too Long", "Provided folders names are too long. Please change them to be less than 100 characters", eUserMsgOption.OK, eUserMsgSelection.None) },
{ eUserMsgKey.FolderPathsAreTooLong, new UserMsg(eUserMsgType.WARN, "Folder Paths Are Too Long", "Provided folder paths are too long. Please change them to be less than 255 characters", eUserMsgOption.OK, eUserMsgSelection.None) },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix the off-by-one wording in the validation message.

The code allows exactly 255 characters, but the message says “less than 255 characters.” Use wording that matches the validation.

✏️ Proposed wording fix
- { eUserMsgKey.FolderPathsAreTooLong, new UserMsg(eUserMsgType.WARN, "Folder Paths Are Too Long", "Provided folder paths are too long. Please change them to be less than 255 characters", eUserMsgOption.OK, eUserMsgSelection.None) },
+ { eUserMsgKey.FolderPathsAreTooLong, new UserMsg(eUserMsgType.WARN, "Folder Paths Are Too Long", "Provided folder paths are too long. Please change them to be 255 characters or fewer.", eUserMsgOption.OK, eUserMsgSelection.None) },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{ eUserMsgKey.FolderPathsAreTooLong, new UserMsg(eUserMsgType.WARN, "Folder Paths Are Too Long", "Provided folder paths are too long. Please change them to be less than 255 characters", eUserMsgOption.OK, eUserMsgSelection.None) },
{ eUserMsgKey.FolderPathsAreTooLong, new UserMsg(eUserMsgType.WARN, "Folder Paths Are Too Long", "Provided folder paths are too long. Please change them to be 255 characters or fewer.", eUserMsgOption.OK, eUserMsgSelection.None) },
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Ginger/GingerCoreCommon/ReporterLib/UserMsgsPool.cs` at line 619, Update the
validation message for eUserMsgKey.FolderPathsAreTooLong so it matches the
actual check (allows exactly 255 chars): change the text passed to the UserMsg
constructor from "Please change them to be less than 255 characters" to phrasing
like "Please change them to be at most 255 characters" or "255 characters or
fewer" so the wording is not off-by-one; locate the entry with
eUserMsgKey.FolderPathsAreTooLong and modify its detail string accordingly.

{ eUserMsgKey.FolderSizeTooSmall, new UserMsg(eUserMsgType.WARN, "Folders Size is Too Small", "Provided folder size is Too Small. Please change it to be bigger than 50 Mb", eUserMsgOption.OK, eUserMsgSelection.None) },
{ eUserMsgKey.DefaultTemplateCantBeDeleted, new UserMsg(eUserMsgType.WARN, "Default Template Can't Be Deleted", "Default Template Can't Be Deleted. Please change it to be a non-default", eUserMsgOption.OK, eUserMsgSelection.None) },
{ eUserMsgKey.ExecutionsResultsProdIsNotOn, new UserMsg(eUserMsgType.WARN, "Executions Results Producing Should Be Switched On", "In order to perform this action, executions results producing should be switched On", eUserMsgOption.OK, eUserMsgSelection.None) },
Expand Down
Loading