diff --git a/assets/js/lib/test-utils/factories/executions.js b/assets/js/lib/test-utils/factories/executions.js index 5a5c6cb181..f7fd136d95 100644 --- a/assets/js/lib/test-utils/factories/executions.js +++ b/assets/js/lib/test-utils/factories/executions.js @@ -226,17 +226,6 @@ export const addPassingExpectation = (checkResult, type, expectationName) => { return addExpectation(checkResult, name, expectation, true); }; -export const addCriticalExpectation = (checkResult, type, expectationName) => { - const name = expectationName || faker.company.name(); - const expectation = executionExpectationEvaluationFactory.build({ - name, - type, - return_value: false, - }); - - return addExpectation(checkResult, name, expectation, false); -}; - export const addExpectationWithError = (checkResult, expectationName) => { const name = expectationName || faker.company.name(); const expectation = executionExpectationEvaluationErrorFactory.build({ @@ -249,9 +238,15 @@ export const addExpectationWithError = (checkResult, expectationName) => { export const addPassingExpectExpectation = (checkResult, expectationName) => addPassingExpectation(checkResult, 'expect', expectationName); -export const addCriticalExpectExpectation = (checkResult, expectationName) => - addCriticalExpectation(checkResult, 'expect', expectationName); +export const addCriticalExpectExpectation = (checkResult, expectationName) => { + const name = expectationName || faker.company.name(); + const expectation = failingExpectEvaluationFactory.build({ + name, + return_value: false, + }); + return addExpectation(checkResult, name, expectation, false); +}; export const addPassingExpectSameExpectation = (checkResult, expectationName) => addPassingExpectation(checkResult, 'expect_same', expectationName);