Skip to content

Commit

Permalink
Merge pull request #591 from gemini-testing/fix/kroman512/undo/failsu…
Browse files Browse the repository at this point in the history
…ites

fix: undo accept image
  • Loading branch information
KuznetsovRoman authored Aug 16, 2024
2 parents 30d8ec9 + e48634c commit 5d0fffd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/static/modules/reducers/tree/nodes/suites.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export function failSuites(tree, suiteIds, diff = tree) {

if (!suite.parentId && !diff.suites.failedRootIds.includes(suite.id)) {
diff.suites.failedRootIds.push(suite.id);
} else {
} else if (suite.parentId) {
processingSuiteIds.push(suite.parentId);
}
}
Expand Down
12 changes: 12 additions & 0 deletions test/unit/lib/static/modules/reducers/tree/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1877,6 +1877,18 @@ describe('lib/static/modules/reducers/tree', () => {

assert.equal(fourthState.tree.suites.byId['s1'].status, FAIL);
});

it('should fail parent suites', () => {
state.tree.suites.byId['s0'].status = SUCCESS;
state.tree.suites.byId['s1'].status = SUCCESS;
state.tree.results.byId['r1'].status = STAGED;
state.tree.images.byId['i1'].status = STAGED;

const nextState = reducer(state, {type: actionNames.STATIC_ACCEPTER_UNSTAGE_SCREENSHOT, payload: {imageId: 'i1'}});

assert.equal(nextState.tree.suites.byId['s0'].status, FAIL);
assert.equal(nextState.tree.suites.byId['s1'].status, FAIL);
});
});
});
});

0 comments on commit 5d0fffd

Please sign in to comment.