Skip to content

Commit

Permalink
fixed #2542. waitBefore, waitAfter doScreenshotBefore and doScreensho…
Browse files Browse the repository at this point in the history
…tAfter is now also ducplicated when duplicating a testcase.
  • Loading branch information
vertigo17 committed Nov 8, 2024
1 parent d44f57f commit 3022a9b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -514,8 +514,8 @@ public Answer create(TestCaseStepActionControl testCaseStepActionControl) {
StringBuilder query = new StringBuilder();
query.append("INSERT INTO testcasestepactioncontrol (`test`, `testcase`, `stepId`, `actionId`, `controlId`, `sort`, ");
query.append("`conditionOperator`, `conditionValue1`, `conditionValue2`, `conditionValue3`, `conditionOptions`, `control`, ");
query.append("`value1`, `value2`, `value3`, `Options`, `isFatal`, `Description`, `screenshotfilename`, `usrCreated`) ");
query.append("VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
query.append("`value1`, `value2`, `value3`, `Options`, `isFatal`, `Description`, `screenshotfilename`, `waitBefore`, `waitAfter`, `doScreenshotBefore`, `doScreenshotAfter`, `usrCreated`) ");
query.append("VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");

// Debug message on SQL.
if (LOG.isDebugEnabled()) {
Expand Down Expand Up @@ -544,6 +544,10 @@ public Answer create(TestCaseStepActionControl testCaseStepActionControl) {
preStat.setBoolean(i++, testCaseStepActionControl.isFatal());
preStat.setString(i++, testCaseStepActionControl.getDescription());
preStat.setString(i++, testCaseStepActionControl.getScreenshotFilename());
preStat.setInt(i++, testCaseStepActionControl.getWaitBefore());
preStat.setInt(i++, testCaseStepActionControl.getWaitAfter());
preStat.setBoolean(i++, testCaseStepActionControl.isDoScreenshotBefore());
preStat.setBoolean(i++, testCaseStepActionControl.isDoScreenshotAfter());
preStat.setString(i++, testCaseStepActionControl.getUsrCreated() == null ? "" : testCaseStepActionControl.getUsrCreated());
preStat.executeUpdate();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -532,8 +532,9 @@ public Answer create(TestCaseStepAction testCaseStepAction) {
MessageEvent msg = null;
StringBuilder query = new StringBuilder();
query.append("INSERT INTO testcasestepaction (`test`, `testcase`, `stepId`, `actionId`, `sort`, ")
.append("`conditionOperator`, `conditionValue1`, `conditionValue2`, `conditionValue3`, `conditionOptions`, `action`, `Value1`, `Value2`, `Value3`, `Options`, `IsFatal`, `description`, `screenshotfilename`, `usrCreated`) ");
query.append("VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
.append("`conditionOperator`, `conditionValue1`, `conditionValue2`, `conditionValue3`, `conditionOptions`, `action`, `Value1`, `Value2`, `Value3`, `Options`"
+ ", `IsFatal`, `description`, `screenshotfilename`, `waitBefore`, `waitAfter`, `doScreenshotBefore`, `doScreenshotAfter`, `usrCreated`) ");
query.append("VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");

// Debug message on SQL.
if (LOG.isDebugEnabled()) {
Expand Down Expand Up @@ -561,6 +562,10 @@ public Answer create(TestCaseStepAction testCaseStepAction) {
preStat.setBoolean(i++, testCaseStepAction.isFatal());
preStat.setString(i++, testCaseStepAction.getDescription());
preStat.setString(i++, testCaseStepAction.getScreenshotFilename());
preStat.setInt(i++, testCaseStepAction.getWaitBefore());
preStat.setInt(i++, testCaseStepAction.getWaitAfter());
preStat.setBoolean(i++, testCaseStepAction.isDoScreenshotBefore());
preStat.setBoolean(i++, testCaseStepAction.isDoScreenshotAfter());
preStat.setString(i++, testCaseStepAction.getUsrCreated() == null ? "" : testCaseStepAction.getUsrCreated());
preStat.executeUpdate();

Expand Down

0 comments on commit 3022a9b

Please sign in to comment.