Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-02-09 06:07:46 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-02-09 06:07:46 +0300
commit38ff3a81189c8323d323946afcf7dad62c84b9aa (patch)
treef5763c753d647f63ec06daea3f83f2e0e6d5be4d /spec/frontend/boards/components
parentc46d8e7601c032d954c9f35761ae14dc4bacf6ce (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/boards/components')
-rw-r--r--spec/frontend/boards/components/board_list_header_spec.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/spec/frontend/boards/components/board_list_header_spec.js b/spec/frontend/boards/components/board_list_header_spec.js
index a16b99728c3..80e77921459 100644
--- a/spec/frontend/boards/components/board_list_header_spec.js
+++ b/spec/frontend/boards/components/board_list_header_spec.js
@@ -35,6 +35,7 @@ describe('Board List Header Component', () => {
withLocalStorage = true,
currentUserId = 1,
listQueryHandler = jest.fn().mockResolvedValue(boardListQueryResponse()),
+ injectedProps = {},
} = {}) => {
const boardId = '1';
@@ -76,6 +77,7 @@ describe('Board List Header Component', () => {
currentUserId,
isEpicBoard: false,
disabled: false,
+ ...injectedProps,
},
}),
);
@@ -86,6 +88,7 @@ describe('Board List Header Component', () => {
const findAddIssueButton = () => wrapper.findComponent({ ref: 'newIssueBtn' });
const findTitle = () => wrapper.find('.board-title');
const findCaret = () => wrapper.findByTestId('board-title-caret');
+ const findSettingsButton = () => wrapper.findComponent({ ref: 'settingsBtn' });
describe('Add issue button', () => {
const hasNoAddButton = [ListType.closed];
@@ -126,6 +129,33 @@ describe('Board List Header Component', () => {
});
});
+ describe('Settings Button', () => {
+ describe('with disabled=true', () => {
+ const hasSettings = [
+ ListType.assignee,
+ ListType.milestone,
+ ListType.iteration,
+ ListType.label,
+ ];
+ const hasNoSettings = [ListType.backlog, ListType.closed];
+
+ it.each(hasSettings)('does render for List Type `%s` when disabled=true', (listType) => {
+ createComponent({ listType, injectedProps: { disabled: true } });
+
+ expect(findSettingsButton().exists()).toBe(true);
+ });
+
+ it.each(hasNoSettings)(
+ 'does not render for List Type `%s` when disabled=true',
+ (listType) => {
+ createComponent({ listType });
+
+ expect(findSettingsButton().exists()).toBe(false);
+ },
+ );
+ });
+ });
+
describe('expanding / collapsing the column', () => {
it('should display collapse icon when column is expanded', async () => {
createComponent();