-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ADM-898[backend][frontend]: feat: block' in board mapping is mutually exclusive with 'flag as block' #1350
ADM-898[backend][frontend]: feat: block' in board mapping is mutually exclusive with 'flag as block' #1350
Changes from 44 commits
417ab93
95756a3
dc6dde4
390dd64
f07ed38
fe9bb00
0209347
ce6c3f2
2044ec9
e52eb5c
5097a58
5021e42
4257b73
e9bd375
e1090e6
df54c47
e7705aa
7f079c6
cbfaf72
60e5388
17e0913
ec3c4ee
bf17d58
dc9523c
4272c98
e4672f6
bbf6e21
0c12e68
13c148f
3e6f992
026c6bc
49164a7
403cb63
d6ab186
0d840a2
edd0e9a
81623cd
4a86d52
7a6ff5a
128487b
56f5801
8f816ba
a30a275
14ec198
b1994f0
05d8434
597a5d0
0525441
8d89f37
7e18282
613ed79
2996254
c1d1261
8243759
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,8 +18,8 @@ public static List<StatusChangedItem> STATUS_CHANGED_ITEMS_LIST_OF_REAL_DONE_COL | |
|
||
public static List<CycleTimeInfo> CYCLE_TIME_INFOS_LIST_OF_REAL_DONE_COLUMN() { | ||
return List.of(CycleTimeInfo.builder().column("DONE").day(EXPECT_DAYS).build(), | ||
CycleTimeInfo.builder().column("BLOCK").day(0.0).build(), | ||
CycleTimeInfo.builder().column("IN PROGRESS").day(EXPECT_DAYS).build()); | ||
CycleTimeInfo.builder().column("IN PROGRESS").day(EXPECT_DAYS).build(), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
CycleTimeInfo.builder().column("FLAG").day(0.0).build()); | ||
} | ||
|
||
public static List<StatusChangedItem> STATUS_CHANGED_ITEMS_LIST_OF_BLOCK_COLUMN() { | ||
|
@@ -79,4 +79,10 @@ public static List<CycleTimeInfo> CYCLE_TIME_INFOS_LIST_OF_ORIGIN() { | |
CycleTimeInfo.builder().column("FLAG").day(EXPECT_DAYS).build()); | ||
} | ||
|
||
public static List<CycleTimeInfo> CYCLE_TIME_INFOS_LIST_OF_ORIGIN_WITHOUT_FLAG() { | ||
return List.of(CycleTimeInfo.builder().column("DONE").day(EXPECT_DAYS).build(), | ||
CycleTimeInfo.builder().column("BLOCK").day(EXPECT_DAYS).build(), | ||
CycleTimeInfo.builder().column("IN PROGRESS").day(EXPECT_DAYS).build()); | ||
} | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ import { | |
updateTreatFlagCardAsBlock, | ||
} from '@src/context/Metrics/metricsSlice'; | ||
import { BOARD_MAPPING, ERROR_MESSAGE_TIME_DURATION, LIST_OPEN, NO_RESULT_DASH } from '../../fixtures'; | ||
import { CYCLE_TIME_SETTINGS_TYPES, METRICS_CONSTANTS } from '@src/constants/resources'; | ||
import { CYCLE_TIME_SETTINGS_TYPES, MESSAGE, METRICS_CONSTANTS } from '@src/constants/resources'; | ||
import { act, render, screen, waitFor, within } from '@testing-library/react'; | ||
import { CycleTime } from '@src/containers/MetricsStep/CycleTime'; | ||
import { setupStore } from '../../utils/setupStoreUtil'; | ||
|
@@ -406,4 +406,38 @@ describe('CycleTime', () => { | |
expect(mockedUseAppDispatch).not.toHaveBeenCalledWith(saveDoneColumn([])); | ||
}); | ||
}); | ||
|
||
it('should show warning message when both mapping block column and add flag as block Given mapping relationship by status', () => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. when -> given, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Solved. |
||
(selectMetricsContent as jest.Mock).mockReturnValue({ | ||
cycleTimeSettingsType: CYCLE_TIME_SETTINGS_TYPES.BY_STATUS, | ||
cycleTimeSettings: [ | ||
...cycleTimeSettings, | ||
{ | ||
column: 'Blocked', | ||
status: 'BLOCKED', | ||
value: 'Block', | ||
}, | ||
], | ||
}); | ||
setup(); | ||
|
||
expect(screen.getByText(MESSAGE.FLAG_CARD_DROPPED_WARNING)).toBeVisible(); | ||
}); | ||
|
||
it('should show warning message when both mapping block column and add flag as block Given mapping relationship by column', () => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. when There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Solved. |
||
(selectMetricsContent as jest.Mock).mockReturnValue({ | ||
cycleTimeSettingsType: CYCLE_TIME_SETTINGS_TYPES.BY_COLUMN, | ||
cycleTimeSettings: [ | ||
...cycleTimeSettings, | ||
{ | ||
column: 'Blocked', | ||
status: 'BLOCKED', | ||
value: 'Block', | ||
}, | ||
], | ||
}); | ||
setup(); | ||
|
||
expect(screen.getByText(MESSAGE.FLAG_CARD_DROPPED_WARNING)).toBeVisible(); | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new line between
given when then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done