Skip to content

Commit 0a868f7

Browse files
authored
Update migration files' priority (#714)
1 parent 7eb7740 commit 0a868f7

File tree

2 files changed

+22
-9
lines changed

2 files changed

+22
-9
lines changed

server/migrations/20230523163856-remove-OtherUnexpectedBehaviorText.js

+22-9
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict';
2-
const populateData = require('../services/PopulatedData/populateData');
32
const { updateTestPlanRun } = require('../models/services/TestPlanRunService');
43
const {
5-
updateTestPlanReport
4+
updateTestPlanReport,
5+
getTestPlanReportById
66
} = require('../models/services/TestPlanReportService');
77
const conflictsResolver = require('../resolvers/TestPlanReport/conflictsResolver');
88
const BrowserLoader = require('../models/loaders/BrowserLoader');
@@ -127,7 +127,14 @@ module.exports = {
127127
console.info(
128128
`=== Fixing unexpectedBehavior results for TestPlanRun:${testPlanRunId} ===`
129129
);
130-
await updateTestPlanRun(testPlanRunId, updateParams);
130+
await updateTestPlanRun(
131+
testPlanRunId,
132+
updateParams,
133+
null,
134+
[],
135+
[],
136+
[]
137+
);
131138
}
132139
}
133140

@@ -136,11 +143,11 @@ module.exports = {
136143
const status = testPlanReportsData[i].status;
137144
if (status === 'DRAFT') {
138145
let updateParams = {};
139-
const { testPlanReport } = await populateData(
140-
{
141-
testPlanReportId
142-
},
143-
{}
146+
const testPlanReport = await getTestPlanReportById(
147+
testPlanReportId,
148+
null,
149+
null,
150+
['id', 'tests']
144151
);
145152

146153
const conflicts = await conflictsResolver(
@@ -155,7 +162,13 @@ module.exports = {
155162
}
156163
};
157164

158-
await updateTestPlanReport(testPlanReport.id, updateParams);
165+
await updateTestPlanReport(
166+
testPlanReport.id,
167+
updateParams,
168+
[],
169+
[],
170+
[]
171+
);
159172
}
160173
}
161174
});

0 commit comments

Comments
 (0)