Flaky test for work items work_item_tree_spec.js
Summary
Job #9817261786 failed for 91c87090.
More information available in Thursday 2025-04-24 08:31 UTC - `gitlab-org/git... (gitlab-org/quality/engineering-productivity/master-broken-incidents#12365 - closed).
Click to expand stack trace
FAIL ee/spec/frontend/work_items/components/work_item_links/work_item_links_form_spec.js (4289 MB heap size)
● WorkItemLinksForm › associate iteration with child item › updates when parent has an iteration associated
expect(jest.fn()).toHaveBeenCalledWith(...expected)
- Expected
+ Received
Object {
- "input": ObjectContaining {
- "iterationWidget": Object {
- "iterationId": "gid://gitlab/Iteration/1124",
+ "input": Object {
+ "confidential": false,
+ "hierarchyWidget": Object {
+ "parentId": "gid://gitlab/WorkItem/1",
},
+ "namespacePath": "group-a",
+ "title": "Create task test",
+ "workItemTypeId": "gid://gitlab/WorkItems::Type/5",
},
},
Number of calls: 1
130 | });
131 | await waitForPromises();
> 132 | expect(createMutationResolver).toHaveBeenCalledWith({
| ^
133 | input: expect.objectContaining({
134 | iterationWidget: {
135 | iterationId: mockParentIteration.id,
at Object.toHaveBeenCalledWith (ee/spec/frontend/work_items/components/work_item_links/work_item_links_form_spec.js:132:38)
FAIL spec/frontend/work_items/components/work_item_links/work_item_tree_spec.js (4530 MB heap size)
● WorkItemTree › fetches widget definitions and passes formatted allowed children by type to children wrapper
expect(received).toEqual(expected) // deep equality
- Expected - 4
+ Received + 0
@@ -1,10 +1,6 @@
Object {
- "Epic": Array [
- "Epic",
- "Issue",
- ],
"Incident": Array [
"Task",
],
"Issue": Array [
"Task",
421 | await nextTick();
422 |
> 423 | expect(findWorkItemLinkChildrenWrapper().props('allowedChildrenByType')).toEqual({
| ^
424 | Epic: ['Epic', 'Issue'],
425 | Incident: ['Task'],
426 | Issue: ['Task'],
at Object.toEqual (spec/frontend/work_items/components/work_item_links/work_item_tree_spec.js:423:78)
FAIL ee/spec/frontend/work_items/components/work_item_status_spec.js (4637 MB heap size)
● WorkItemStatus component › Dropdown options › searches the options on frontend
expect(received).toHaveLength(expected)
Expected length: 1
Received length: 0
Received array: []
126 | await nextTick();
127 |
> 128 | expect(findSidebarDropdownWidget().props('listItems')).toHaveLength(1);
| ^
129 | });
130 |
131 | it('resets the options on frontend when dropdown hidden after search', async () => {
at Object.toHaveLength (ee/spec/frontend/work_items/components/work_item_status_spec.js:128:62)
● WorkItemStatus component › Dropdown options › resets the options on frontend when dropdown hidden after search
expect(received).toHaveLength(expected)
Expected length: 1
Received length: 0
Received array: []
136 | await nextTick();
137 |
> 138 | expect(findSidebarDropdownWidget().props('listItems')).toHaveLength(1);
| ^
139 |
140 | await findSidebarDropdownWidget().vm.$emit('dropdownHidden');
141 |
at Object.toHaveLength (ee/spec/frontend/work_items/components/work_item_status_spec.js:138:62)
● WorkItemStatus component › Dropdown options › shows the status in dropdown when the items have finished fetching
TypeError: Cannot read properties of undefined (reading 'length')
158 |
159 | expect(findSidebarDropdownWidget().props('loading')).toBe(false);
> 160 | expect(findSidebarDropdownWidget().props('listItems')).toHaveLength(allowedStatus.length);
| ^
161 | });
162 |
163 | it('changes the status to the selected status', async () => {
at Object.length (ee/spec/frontend/work_items/components/work_item_status_spec.js:160:89)
● WorkItemStatus component › Dropdown options › changes the status to the selected status
TypeError: Cannot read properties of undefined (reading '0')
169 | await waitForPromises();
170 |
> 171 | const firstStatus = allowedStatus[0];
| ^
172 |
173 | findSidebarDropdownWidget().vm.$emit('updateValue', firstStatus.id);
174 | await nextTick();
at Object.<anonymous> (ee/spec/frontend/work_items/components/work_item_status_spec.js:171:40)
● WorkItemStatus component › Dropdown options › changes the status to the selected status
expect.hasAssertions()
Expected at least one assertion to be called but received none.
71 | // see https://jestjs.io/docs/en/expect#expecthasassertions
72 | // eslint-disable-next-line jest/no-standalone-expect
> 73 | expect.hasAssertions();
| ^
74 |
75 | // Reset globals: This ensures tests don't interfere with
76 | // each other, and removes the need to tidy up if it was
at Object.hasAssertions (spec/frontend/__helpers__/shared_test_setup.js:73:10)
Test Suites: 5 failed, 2 skipped, 227 passed, 232 of 234 total
Tests: 16 failed, 56 skipped, 4257 passed, 4329 total
Snapshots: 18 passed, 18 total
Steps to reproduce
Please refer to Flaky tests documentation to learn more about how to reproduce them.
Proposed Resolution
Please refer to the Resolution guidance to learn more about resolution of broken master.
Once the flaky failure has been fixed on the default branch, open merge requests to cherry-pick the fix to the active stable branches.
Logs
Edited by Erran Carey