Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
829c7542e8
commit
11c2f3b08c
|
|
@ -1 +1 @@
|
||||||
c7695bd902060be80b3499ffd2bd9e86d89c4f4f
|
e6c3f8fa60ab4b5af91b5f893876c130d97fe37c
|
||||||
|
|
|
||||||
|
|
@ -129,7 +129,7 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
listItemsCount() {
|
listItemsCount() {
|
||||||
return this.isEpicBoard ? this.list.epicsCount : this.boardList?.issuesCount;
|
return this.isEpicBoard ? this.list.metadata.epicsCount : this.boardList?.issuesCount;
|
||||||
},
|
},
|
||||||
paginatedIssueText() {
|
paginatedIssueText() {
|
||||||
return sprintf(__('Showing %{pageSize} of %{total} %{issuableType}'), {
|
return sprintf(__('Showing %{pageSize} of %{total} %{issuableType}'), {
|
||||||
|
|
|
||||||
|
|
@ -90,6 +90,9 @@ export default {
|
||||||
listType() {
|
listType() {
|
||||||
return this.list.listType;
|
return this.list.listType;
|
||||||
},
|
},
|
||||||
|
itemsCount() {
|
||||||
|
return this.isEpicBoard ? this.list.metadata.epicsCount : this.boardList?.issuesCount;
|
||||||
|
},
|
||||||
listAssignee() {
|
listAssignee() {
|
||||||
return this.list?.assignee?.username || '';
|
return this.list?.assignee?.username || '';
|
||||||
},
|
},
|
||||||
|
|
@ -452,7 +455,7 @@ export default {
|
||||||
<gl-icon class="gl-mr-2" :name="countIcon" :size="14" />
|
<gl-icon class="gl-mr-2" :name="countIcon" :size="14" />
|
||||||
<item-count
|
<item-count
|
||||||
v-if="!isLoading"
|
v-if="!isLoading"
|
||||||
:items-size="isEpicBoard ? list.epicsCount : boardList.issuesCount"
|
:items-size="itemsCount"
|
||||||
:max-issue-count="list.maxIssueCount"
|
:max-issue-count="list.maxIssueCount"
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,9 @@ import * as mutationTypes from './mutation_types';
|
||||||
const updateListItemsCount = ({ state, listId, value }) => {
|
const updateListItemsCount = ({ state, listId, value }) => {
|
||||||
const list = state.boardLists[listId];
|
const list = state.boardLists[listId];
|
||||||
if (state.issuableType === TYPE_EPIC) {
|
if (state.issuableType === TYPE_EPIC) {
|
||||||
Vue.set(state.boardLists, listId, { ...list, epicsCount: list.epicsCount + value });
|
list.metadata.epicsCount += value;
|
||||||
} else {
|
|
||||||
Vue.set(state.boardLists, listId, { ...list });
|
|
||||||
}
|
}
|
||||||
|
Vue.set(state.boardLists, listId, { ...list });
|
||||||
};
|
};
|
||||||
|
|
||||||
export const removeItemFromList = ({ state, listId, itemId, reordering = false }) => {
|
export const removeItemFromList = ({ state, listId, itemId, reordering = false }) => {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<script>
|
<script>
|
||||||
import scheduleSvg from '@gitlab/svgs/dist/illustrations/schedule-md.svg';
|
import scheduleSvg from '@gitlab/svgs/dist/illustrations/schedule-md.svg?raw';
|
||||||
import { GlEmptyState, GlLink, GlSprintf } from '@gitlab/ui';
|
import { GlEmptyState, GlLink, GlSprintf } from '@gitlab/ui';
|
||||||
import { helpPagePath } from '~/helpers/help_page_helper';
|
import { helpPagePath } from '~/helpers/help_page_helper';
|
||||||
import { s__ } from '~/locale';
|
import { s__ } from '~/locale';
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import emptySvg from '@gitlab/svgs/dist/illustrations/security-dashboard-empty-state.svg';
|
import emptySvg from '@gitlab/svgs/dist/illustrations/security-dashboard-empty-state.svg?raw';
|
||||||
import { GlEmptyState } from '@gitlab/ui';
|
import { GlEmptyState } from '@gitlab/ui';
|
||||||
import * as Sentry from '@sentry/browser';
|
import * as Sentry from '@sentry/browser';
|
||||||
import { __ } from '~/locale';
|
import { __ } from '~/locale';
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
* - Button Actions.
|
* - Button Actions.
|
||||||
* [Mockup](https://gitlab.com/gitlab-org/gitlab-foss/uploads/2f655655c0eadf655d0ae7467b53002a/environments__deploy-graphic.png)
|
* [Mockup](https://gitlab.com/gitlab-org/gitlab-foss/uploads/2f655655c0eadf655d0ae7467b53002a/environments__deploy-graphic.png)
|
||||||
*/
|
*/
|
||||||
import deployBoardSvg from '@gitlab/svgs/dist/illustrations/deploy-boards.svg';
|
import deployBoardSvg from '@gitlab/svgs/dist/illustrations/deploy-boards.svg?raw';
|
||||||
import {
|
import {
|
||||||
GlIcon,
|
GlIcon,
|
||||||
GlLoadingIcon,
|
GlLoadingIcon,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<script>
|
<script>
|
||||||
import clusterPopover from '@gitlab/svgs/dist/illustrations/cluster_popover.svg';
|
import clusterPopover from '@gitlab/svgs/dist/illustrations/cluster_popover.svg?raw';
|
||||||
import { GlPopover, GlSprintf, GlLink, GlButton } from '@gitlab/ui';
|
import { GlPopover, GlSprintf, GlLink, GlButton } from '@gitlab/ui';
|
||||||
import SafeHtml from '~/vue_shared/directives/safe_html';
|
import SafeHtml from '~/vue_shared/directives/safe_html';
|
||||||
import { __ } from '~/locale';
|
import { __ } from '~/locale';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<script>
|
<script>
|
||||||
import chartEmptyStateIllustration from '@gitlab/svgs/dist/illustrations/chart-empty-state.svg';
|
import chartEmptyStateIllustration from '@gitlab/svgs/dist/illustrations/chart-empty-state.svg?raw';
|
||||||
import SafeHtml from '~/vue_shared/directives/safe_html';
|
import SafeHtml from '~/vue_shared/directives/safe_html';
|
||||||
import { chartHeight } from '../../constants';
|
import { chartHeight } from '../../constants';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<script>
|
<script>
|
||||||
import importGroupIllustration from '@gitlab/svgs/dist/illustrations/group-import.svg';
|
import importGroupIllustration from '@gitlab/svgs/dist/illustrations/group-import.svg?raw';
|
||||||
import newGroupIllustration from '@gitlab/svgs/dist/illustrations/group-new.svg';
|
import newGroupIllustration from '@gitlab/svgs/dist/illustrations/group-new.svg?raw';
|
||||||
|
|
||||||
import { s__ } from '~/locale';
|
import { s__ } from '~/locale';
|
||||||
import NewNamespacePage from '~/vue_shared/new_namespace/new_namespace_page.vue';
|
import NewNamespacePage from '~/vue_shared/new_namespace/new_namespace_page.vue';
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
<script>
|
<script>
|
||||||
import createFromTemplateIllustration from '@gitlab/svgs/dist/illustrations/project-create-from-template-sm.svg';
|
import createFromTemplateIllustration from '@gitlab/svgs/dist/illustrations/project-create-from-template-sm.svg?raw';
|
||||||
import blankProjectIllustration from '@gitlab/svgs/dist/illustrations/project-create-new-sm.svg';
|
import blankProjectIllustration from '@gitlab/svgs/dist/illustrations/project-create-new-sm.svg?raw';
|
||||||
import importProjectIllustration from '@gitlab/svgs/dist/illustrations/project-import-sm.svg';
|
import importProjectIllustration from '@gitlab/svgs/dist/illustrations/project-import-sm.svg?raw';
|
||||||
import ciCdProjectIllustration from '@gitlab/svgs/dist/illustrations/project-run-CICD-pipelines-sm.svg';
|
import ciCdProjectIllustration from '@gitlab/svgs/dist/illustrations/project-run-CICD-pipelines-sm.svg?raw';
|
||||||
import SafeHtml from '~/vue_shared/directives/safe_html';
|
import SafeHtml from '~/vue_shared/directives/safe_html';
|
||||||
import { s__ } from '~/locale';
|
import { s__ } from '~/locale';
|
||||||
import NewNamespacePage from '~/vue_shared/new_namespace/new_namespace_page.vue';
|
import NewNamespacePage from '~/vue_shared/new_namespace/new_namespace_page.vue';
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,8 @@ import {
|
||||||
REPORT_TYPE_LICENSE_COMPLIANCE,
|
REPORT_TYPE_LICENSE_COMPLIANCE,
|
||||||
} from '~/vue_shared/security_reports/constants';
|
} from '~/vue_shared/security_reports/constants';
|
||||||
|
|
||||||
import kontraLogo from 'images/vulnerability/kontra-logo.svg';
|
import kontraLogo from 'images/vulnerability/kontra-logo.svg?raw';
|
||||||
import scwLogo from 'images/vulnerability/scw-logo.svg';
|
import scwLogo from 'images/vulnerability/scw-logo.svg?raw';
|
||||||
import configureSastMutation from '../graphql/configure_sast.mutation.graphql';
|
import configureSastMutation from '../graphql/configure_sast.mutation.graphql';
|
||||||
import configureSastIacMutation from '../graphql/configure_iac.mutation.graphql';
|
import configureSastIacMutation from '../graphql/configure_iac.mutation.graphql';
|
||||||
import configureSecretDetectionMutation from '../graphql/configure_secret_detection.mutation.graphql';
|
import configureSecretDetectionMutation from '../graphql/configure_secret_detection.mutation.graphql';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
<script>
|
<script>
|
||||||
import { GlCollapse } from '@gitlab/ui';
|
import { GlCollapse } from '@gitlab/ui';
|
||||||
|
import { isCollapsed, toggleSuperSidebarCollapsed } from '../super_sidebar_collapsed_state_manager';
|
||||||
import UserBar from './user_bar.vue';
|
import UserBar from './user_bar.vue';
|
||||||
import SidebarPortalTarget from './sidebar_portal_target.vue';
|
import SidebarPortalTarget from './sidebar_portal_target.vue';
|
||||||
import ContextSwitcherToggle from './context_switcher_toggle.vue';
|
import ContextSwitcherToggle from './context_switcher_toggle.vue';
|
||||||
|
|
@ -26,6 +27,7 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
contextSwitcherOpened: false,
|
contextSwitcherOpened: false,
|
||||||
|
isCollapased: isCollapsed(),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -33,15 +35,25 @@ export default {
|
||||||
return this.sidebarData.current_menu_items || [];
|
return this.sidebarData.current_menu_items || [];
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
collapseSidebar() {
|
||||||
|
toggleSuperSidebarCollapsed(true, false);
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<div>
|
||||||
|
<div class="super-sidebar-overlay" @click="collapseSidebar"></div>
|
||||||
<aside
|
<aside
|
||||||
id="super-sidebar"
|
id="super-sidebar"
|
||||||
class="super-sidebar gl-display-flex gl-flex-direction-column"
|
:aria-hidden="String(isCollapased)"
|
||||||
|
class="super-sidebar"
|
||||||
data-testid="super-sidebar"
|
data-testid="super-sidebar"
|
||||||
data-qa-selector="navbar"
|
data-qa-selector="navbar"
|
||||||
|
:inert="isCollapased"
|
||||||
|
tabindex="-1"
|
||||||
>
|
>
|
||||||
<user-bar :sidebar-data="sidebarData" />
|
<user-bar :sidebar-data="sidebarData" />
|
||||||
<div class="gl-display-flex gl-flex-direction-column gl-flex-grow-1 gl-overflow-hidden">
|
<div class="gl-display-flex gl-flex-direction-column gl-flex-grow-1 gl-overflow-hidden">
|
||||||
|
|
@ -63,4 +75,5 @@ export default {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</aside>
|
</aside>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
import { GlBadge, GlButton, GlTooltipDirective } from '@gitlab/ui';
|
import { GlBadge, GlButton, GlTooltipDirective } from '@gitlab/ui';
|
||||||
import { __ } from '~/locale';
|
import { __ } from '~/locale';
|
||||||
import SafeHtml from '~/vue_shared/directives/safe_html';
|
import SafeHtml from '~/vue_shared/directives/safe_html';
|
||||||
import logo from '../../../../views/shared/_logo.svg';
|
import logo from '../../../../views/shared/_logo.svg?raw';
|
||||||
import { toggleSuperSidebarCollapsed } from '../super_sidebar_collapsed_state_manager';
|
import { toggleSuperSidebarCollapsed } from '../super_sidebar_collapsed_state_manager';
|
||||||
import CreateMenu from './create_menu.vue';
|
import CreateMenu from './create_menu.vue';
|
||||||
import Counter from './counter.vue';
|
import Counter from './counter.vue';
|
||||||
|
|
@ -93,7 +93,6 @@ export default {
|
||||||
<counter
|
<counter
|
||||||
v-gl-tooltip:super-sidebar.hover.bottom="$options.i18n.mergeRequests"
|
v-gl-tooltip:super-sidebar.hover.bottom="$options.i18n.mergeRequests"
|
||||||
class="gl-w-full"
|
class="gl-w-full"
|
||||||
tabindex="-1"
|
|
||||||
icon="merge-request-open"
|
icon="merge-request-open"
|
||||||
:count="sidebarData.total_merge_requests_count"
|
:count="sidebarData.total_merge_requests_count"
|
||||||
:label="$options.i18n.mergeRequests"
|
:label="$options.i18n.mergeRequests"
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,10 @@ export const SIDEBAR_COLLAPSED_COOKIE = 'super_sidebar_collapsed';
|
||||||
export const SIDEBAR_COLLAPSED_COOKIE_EXPIRATION = 365 * 10;
|
export const SIDEBAR_COLLAPSED_COOKIE_EXPIRATION = 365 * 10;
|
||||||
|
|
||||||
export const findPage = () => document.querySelector('.page-with-super-sidebar');
|
export const findPage = () => document.querySelector('.page-with-super-sidebar');
|
||||||
export const findToggle = () => document.querySelector('.js-super-sidebar-toggle');
|
export const findSidebar = () => document.querySelector('.super-sidebar');
|
||||||
|
export const findToggles = () => document.querySelectorAll('.js-super-sidebar-toggle');
|
||||||
|
|
||||||
const isCollapsed = () => findPage().classList.contains(SIDEBAR_COLLAPSED_CLASS);
|
export const isCollapsed = () => findPage().classList.contains(SIDEBAR_COLLAPSED_CLASS);
|
||||||
|
|
||||||
// See documentation: https://design.gitlab.com/patterns/navigation#left-sidebar
|
// See documentation: https://design.gitlab.com/patterns/navigation#left-sidebar
|
||||||
// NOTE: at 1200px nav sidebar should not overlap the content
|
// NOTE: at 1200px nav sidebar should not overlap the content
|
||||||
|
|
@ -19,6 +20,12 @@ export const isDesktopBreakpoint = () => bp.windowWidth() >= breakpoints.xl;
|
||||||
export const getCollapsedCookie = () => getCookie(SIDEBAR_COLLAPSED_COOKIE) === 'true';
|
export const getCollapsedCookie = () => getCookie(SIDEBAR_COLLAPSED_COOKIE) === 'true';
|
||||||
|
|
||||||
export const toggleSuperSidebarCollapsed = (collapsed, saveCookie) => {
|
export const toggleSuperSidebarCollapsed = (collapsed, saveCookie) => {
|
||||||
|
const sidebar = findSidebar();
|
||||||
|
sidebar.ariaHidden = collapsed;
|
||||||
|
sidebar.inert = collapsed;
|
||||||
|
|
||||||
|
if (!collapsed) sidebar.focus();
|
||||||
|
|
||||||
findPage().classList.toggle(SIDEBAR_COLLAPSED_CLASS, collapsed);
|
findPage().classList.toggle(SIDEBAR_COLLAPSED_CLASS, collapsed);
|
||||||
|
|
||||||
if (saveCookie && isDesktopBreakpoint()) {
|
if (saveCookie && isDesktopBreakpoint()) {
|
||||||
|
|
@ -34,12 +41,11 @@ export const initSuperSidebarCollapsedState = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const bindSuperSidebarCollapsedEvents = () => {
|
export const bindSuperSidebarCollapsedEvents = () => {
|
||||||
if (findToggle()) {
|
findToggles().forEach((elem) => {
|
||||||
findToggle().addEventListener('click', () => {
|
elem.addEventListener('click', () => {
|
||||||
const value = !isCollapsed();
|
toggleSuperSidebarCollapsed(!isCollapsed(), true);
|
||||||
toggleSuperSidebarCollapsed(value, true);
|
});
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
window.addEventListener('resize', debounce(initSuperSidebarCollapsedState, 100));
|
window.addEventListener('resize', debounce(initSuperSidebarCollapsedState, 100));
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<script>
|
<script>
|
||||||
import { GlButton, GlSprintf, GlTooltipDirective } from '@gitlab/ui';
|
import { GlButton, GlSprintf, GlTooltipDirective } from '@gitlab/ui';
|
||||||
import gitlabLogo from '@gitlab/svgs/dist/illustrations/gitlab_logo.svg';
|
import gitlabLogo from '@gitlab/svgs/dist/illustrations/gitlab_logo.svg?raw';
|
||||||
import SafeHtml from '~/vue_shared/directives/safe_html';
|
import SafeHtml from '~/vue_shared/directives/safe_html';
|
||||||
import { s__, __ } from '~/locale';
|
import { s__, __ } from '~/locale';
|
||||||
import UserCalloutDismisser from '~/vue_shared/components/user_callout_dismisser.vue';
|
import UserCalloutDismisser from '~/vue_shared/components/user_callout_dismisser.vue';
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import {
|
||||||
GlTooltipDirective,
|
GlTooltipDirective,
|
||||||
GlEmptyState,
|
GlEmptyState,
|
||||||
} from '@gitlab/ui';
|
} from '@gitlab/ui';
|
||||||
import noAccessSvg from '@gitlab/svgs/dist/illustrations/analytics/no-access.svg';
|
import noAccessSvg from '@gitlab/svgs/dist/illustrations/analytics/no-access.svg?raw';
|
||||||
import * as Sentry from '@sentry/browser';
|
import * as Sentry from '@sentry/browser';
|
||||||
import { s__ } from '~/locale';
|
import { s__ } from '~/locale';
|
||||||
import { parseBoolean } from '~/lib/utils/common_utils';
|
import { parseBoolean } from '~/lib/utils/common_utils';
|
||||||
|
|
|
||||||
|
|
@ -24,16 +24,17 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.super-sidebar {
|
.super-sidebar {
|
||||||
@include gl-fixed;
|
display: flex;
|
||||||
@include gl-top-0;
|
flex-direction: column;
|
||||||
@include gl-bottom-0;
|
position: fixed;
|
||||||
@include gl-left-0;
|
top: 0;
|
||||||
@include gl-bg-gray-10;
|
bottom: 0;
|
||||||
@include gl-border-r;
|
left: 0;
|
||||||
@include gl-border-gray-a-08;
|
background-color: var(--gray-10, $gray-10);
|
||||||
|
border-right: 1px solid $t-gray-a-08;
|
||||||
transform: translate3d(0, 0, 0);
|
transform: translate3d(0, 0, 0);
|
||||||
width: $super-sidebar-width;
|
width: $super-sidebar-width;
|
||||||
z-index: 600;
|
z-index: $super-sidebar-z-index;
|
||||||
|
|
||||||
&.super-sidebar-loading {
|
&.super-sidebar-loading {
|
||||||
transform: translate3d(-100%, 0, 0);
|
transform: translate3d(-100%, 0, 0);
|
||||||
|
|
@ -139,12 +140,33 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.super-sidebar-overlay {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.page-with-super-sidebar {
|
.page-with-super-sidebar {
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
transition: padding-left $gl-transition-duration-medium;
|
transition: padding-left $gl-transition-duration-medium;
|
||||||
|
|
||||||
|
&:not(.page-with-super-sidebar-collapsed) {
|
||||||
|
.super-sidebar-overlay {
|
||||||
|
display: block;
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
background-color: $black-transparent;
|
||||||
|
z-index: $super-sidebar-z-index - 1;
|
||||||
|
|
||||||
|
@include media-breakpoint-up(md) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@include media-breakpoint-up(xl) {
|
@include media-breakpoint-up(xl) {
|
||||||
padding-left: $contextual-sidebar-width;
|
padding-left: $super-sidebar-width;
|
||||||
|
|
||||||
.super-sidebar-toggle {
|
.super-sidebar-toggle {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,8 @@ $contextual-sidebar-collapsed-width: 56px;
|
||||||
$toggle-sidebar-height: 48px;
|
$toggle-sidebar-height: 48px;
|
||||||
$super-sidebar-width: 256px;
|
$super-sidebar-width: 256px;
|
||||||
$super-sidebar-toggle-position-breakpoint: 1360px;
|
$super-sidebar-toggle-position-breakpoint: 1360px;
|
||||||
|
$super-sidebar-z-index: 600;
|
||||||
|
$super-sidebar-overlay-z-index: 599;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
🚨 Do not use this spacing scale — it is deprecated and being removed. 🚨
|
🚨 Do not use this spacing scale — it is deprecated and being removed. 🚨
|
||||||
|
|
|
||||||
|
|
@ -1494,13 +1494,14 @@ kbd {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.super-sidebar {
|
.super-sidebar {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
background-color: #1f1e24;
|
background-color: var(--gray-10, #1f1e24);
|
||||||
border-right: solid 1px #434248;
|
border-right: 1px solid rgba(251, 250, 253, 0.08);
|
||||||
border-color: rgba(251, 250, 253, 0.08);
|
|
||||||
transform: translate3d(0, 0, 0);
|
transform: translate3d(0, 0, 0);
|
||||||
width: 256px;
|
width: 256px;
|
||||||
z-index: 600;
|
z-index: 600;
|
||||||
|
|
|
||||||
|
|
@ -1494,13 +1494,14 @@ kbd {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.super-sidebar {
|
.super-sidebar {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
background-color: #fbfafd;
|
background-color: var(--gray-10, #fbfafd);
|
||||||
border-right: solid 1px #dcdcde;
|
border-right: 1px solid rgba(31, 30, 36, 0.08);
|
||||||
border-color: rgba(31, 30, 36, 0.08);
|
|
||||||
transform: translate3d(0, 0, 0);
|
transform: translate3d(0, 0, 0);
|
||||||
width: 256px;
|
width: 256px;
|
||||||
z-index: 600;
|
z-index: 600;
|
||||||
|
|
|
||||||
|
|
@ -82,9 +82,9 @@ module JiraConnectInstallations
|
||||||
Gitlab::IntegrationsLogger.info(
|
Gitlab::IntegrationsLogger.info(
|
||||||
integration: 'JiraConnect',
|
integration: 'JiraConnect',
|
||||||
message: 'Proxy lifecycle event received error response',
|
message: 'Proxy lifecycle event received error response',
|
||||||
event_type: event,
|
jira_event_type: event,
|
||||||
status_code: status_code,
|
jira_status_code: status_code,
|
||||||
body: body
|
jira_body: body
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
- user_email = "(#{params[:email]})" if Devise.email_regexp.match?(params[:email])
|
- user_email = "(#{params[:email]})" if Devise.email_regexp.match?(params[:email])
|
||||||
- request_link_start = '<a href="%{new_user_confirmation_path}">'.html_safe % { new_user_confirmation_path: new_user_confirmation_path }
|
- request_link_start = '<a href="%{new_user_confirmation_path}">'.html_safe % { new_user_confirmation_path: new_user_confirmation_path }
|
||||||
- request_link_end = '</a>'.html_safe
|
- registration_link_start = '<a href="%{new_user_registration_path}">'.html_safe % { new_user_registration_path: new_user_registration_path }
|
||||||
|
- link_end = '</a>'.html_safe
|
||||||
- content_for :page_specific_javascripts do
|
- content_for :page_specific_javascripts do
|
||||||
= render "layouts/google_tag_manager_head"
|
= render "layouts/google_tag_manager_head"
|
||||||
= render "layouts/one_trust"
|
= render "layouts/one_trust"
|
||||||
|
|
@ -12,9 +13,11 @@
|
||||||
= _("Almost there...")
|
= _("Almost there...")
|
||||||
%p{ class: 'gl-mb-6 gl-font-lg!' }
|
%p{ class: 'gl-mb-6 gl-font-lg!' }
|
||||||
= _('Please check your email %{email} to confirm your account') % { email: user_email }
|
= _('Please check your email %{email} to confirm your account') % { email: user_email }
|
||||||
|
%br
|
||||||
|
= _('If the email address is incorrect, you can %{registration_link_start}register again with a different email%{registration_link_end}.').html_safe % { registration_link_start: registration_link_start, registration_link_end: link_end }
|
||||||
%hr
|
%hr
|
||||||
- if Gitlab::CurrentSettings.after_sign_up_text.present?
|
- if Gitlab::CurrentSettings.after_sign_up_text.present?
|
||||||
.well-confirmation.gl-text-center
|
.well-confirmation.gl-text-center
|
||||||
= markdown_field(Gitlab::CurrentSettings, :after_sign_up_text)
|
= markdown_field(Gitlab::CurrentSettings, :after_sign_up_text)
|
||||||
%p.gl-text-center
|
%p.gl-text-center
|
||||||
= _("No confirmation email received? Check your spam folder or %{request_link_start}request new confirmation email%{request_link_end}.").html_safe % { request_link_start: request_link_start, request_link_end: request_link_end }
|
= _("No confirmation email received? Check your spam folder or %{request_link_start}request new confirmation email%{request_link_end}.").html_safe % { request_link_start: request_link_start, request_link_end: link_end }
|
||||||
|
|
|
||||||
|
|
@ -30,10 +30,10 @@
|
||||||
- if has_user_defined_certificate
|
- if has_user_defined_certificate
|
||||||
.row
|
.row
|
||||||
.col-sm-10.offset-sm-2
|
.col-sm-10.offset-sm-2
|
||||||
.card
|
= render Pajamas::CardComponent.new(body_options: { class: 'gl-display-flex gl-align-items-center gl-justify-content-space-between gl-p-5' }) do |c|
|
||||||
.card-header
|
- c.header do
|
||||||
= _('Certificate')
|
= s_('Certificate')
|
||||||
.d-flex.justify-content-between.align-items-center.p-3
|
- c.body do
|
||||||
%span
|
%span
|
||||||
= domain_presenter.pages_domain.subject || _('missing')
|
= domain_presenter.pages_domain.subject || _('missing')
|
||||||
= link_to _('Remove'),
|
= link_to _('Remove'),
|
||||||
|
|
|
||||||
|
|
@ -393,6 +393,7 @@ module.exports = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
resourceQuery: /raw/,
|
||||||
loader: 'raw-loader',
|
loader: 'raw-loader',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,9 @@ module.exports = (path, options = {}) => {
|
||||||
// temporary alias until we replace all `flash` imports for `alert`
|
// temporary alias until we replace all `flash` imports for `alert`
|
||||||
// https://gitlab.com/gitlab-org/gitlab/-/merge_requests/109449
|
// https://gitlab.com/gitlab-org/gitlab/-/merge_requests/109449
|
||||||
'^~/flash$': '<rootDir>/app/assets/javascripts/alert',
|
'^~/flash$': '<rootDir>/app/assets/javascripts/alert',
|
||||||
|
[TEST_FIXTURES_PATTERN]: '<rootDir>/tmp/tests/frontend/fixtures$1',
|
||||||
|
'^test_fixtures_static(/.*)$': '<rootDir>/spec/frontend/fixtures/static$1',
|
||||||
|
'\\.(jpg|jpeg|png|svg|css)(\\?\\w+)?$': '<rootDir>/spec/frontend/__mocks__/file_mock.js',
|
||||||
'^~(/.*)\\?(worker|raw)$': '<rootDir>/app/assets/javascripts$1',
|
'^~(/.*)\\?(worker|raw)$': '<rootDir>/app/assets/javascripts$1',
|
||||||
'^(.*)\\?(worker|raw)$': '$1',
|
'^(.*)\\?(worker|raw)$': '$1',
|
||||||
'^~(/.*)$': '<rootDir>/app/assets/javascripts$1',
|
'^~(/.*)$': '<rootDir>/app/assets/javascripts$1',
|
||||||
|
|
@ -60,10 +63,6 @@ module.exports = (path, options = {}) => {
|
||||||
'^any_else_ce(/.*)$': '<rootDir>/app/assets/javascripts$1',
|
'^any_else_ce(/.*)$': '<rootDir>/app/assets/javascripts$1',
|
||||||
'^helpers(/.*)$': '<rootDir>/spec/frontend/__helpers__$1',
|
'^helpers(/.*)$': '<rootDir>/spec/frontend/__helpers__$1',
|
||||||
'^vendor(/.*)$': '<rootDir>/vendor/assets/javascripts$1',
|
'^vendor(/.*)$': '<rootDir>/vendor/assets/javascripts$1',
|
||||||
[TEST_FIXTURES_PATTERN]: '<rootDir>/tmp/tests/frontend/fixtures$1',
|
|
||||||
'^test_fixtures_static(/.*)$': '<rootDir>/spec/frontend/fixtures/static$1',
|
|
||||||
'\\.(jpg|jpeg|png|svg|css)$': '<rootDir>/spec/frontend/__mocks__/file_mock.js',
|
|
||||||
'\\.svg\\?url$': '<rootDir>/spec/frontend/__mocks__/file_mock.js',
|
|
||||||
'^public(/.*)$': '<rootDir>/public$1',
|
'^public(/.*)$': '<rootDir>/public$1',
|
||||||
'emojis(/.*).json': '<rootDir>/fixtures/emojis$1.json',
|
'emojis(/.*).json': '<rootDir>/fixtures/emojis$1.json',
|
||||||
'^spec/test_constants$': '<rootDir>/spec/frontend/__helpers__/test_constants',
|
'^spec/test_constants$': '<rootDir>/spec/frontend/__helpers__/test_constants',
|
||||||
|
|
|
||||||
|
|
@ -21424,6 +21424,9 @@ msgstr ""
|
||||||
msgid "If enabled, only protected branches will be mirrored."
|
msgid "If enabled, only protected branches will be mirrored."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "If the email address is incorrect, you can %{registration_link_start}register again with a different email%{registration_link_end}."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "If the number of active users exceeds the user limit, you will be charged for the number of %{users_over_license_link} at your next license reconciliation."
|
msgid "If the number of active users exceeds the user limit, you will be charged for the number of %{users_over_license_link} at your next license reconciliation."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
@ -38764,6 +38767,9 @@ msgstr ""
|
||||||
msgid "SecurityOrchestration|No rules defined - policy will not run."
|
msgid "SecurityOrchestration|No rules defined - policy will not run."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "SecurityOrchestration|Non-existing tags have been detected in the policy yaml. As a result, rule mode has been disabled. To enable rule mode, remove those non-existing tags from the policy yaml."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "SecurityOrchestration|Not enabled"
|
msgid "SecurityOrchestration|Not enabled"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ require_relative 'api/default_options'
|
||||||
# Push into expected format for failed tests
|
# Push into expected format for failed tests
|
||||||
class PipelineTestReportBuilder
|
class PipelineTestReportBuilder
|
||||||
DEFAULT_OPTIONS = {
|
DEFAULT_OPTIONS = {
|
||||||
target_project: Host::DEFAULT_OPTIONS[:target_project],
|
target_project: Host::DEFAULT_OPTIONS[:target_project] || API::DEFAULT_OPTIONS[:project],
|
||||||
current_pipeline_id: API::DEFAULT_OPTIONS[:pipeline_id],
|
current_pipeline_id: API::DEFAULT_OPTIONS[:pipeline_id],
|
||||||
mr_iid: Host::DEFAULT_OPTIONS[:mr_iid],
|
mr_iid: Host::DEFAULT_OPTIONS[:mr_iid],
|
||||||
api_endpoint: API::DEFAULT_OPTIONS[:endpoint],
|
api_endpoint: API::DEFAULT_OPTIONS[:endpoint],
|
||||||
|
|
|
||||||
|
|
@ -48,13 +48,13 @@ RSpec.describe "Pages with Let's Encrypt", :https_pages_enabled, feature_categor
|
||||||
expect(domain.auto_ssl_enabled).to eq false
|
expect(domain.auto_ssl_enabled).to eq false
|
||||||
|
|
||||||
expect(find("#pages_domain_auto_ssl_enabled", visible: false).value).to eq 'false'
|
expect(find("#pages_domain_auto_ssl_enabled", visible: false).value).to eq 'false'
|
||||||
expect(page).to have_selector '.card-header', text: 'Certificate'
|
expect(page).to have_selector '.gl-card-header', text: 'Certificate'
|
||||||
expect(page).to have_text domain.subject
|
expect(page).to have_text domain.subject
|
||||||
|
|
||||||
find('.js-auto-ssl-toggle-container .js-project-feature-toggle button').click
|
find('.js-auto-ssl-toggle-container .js-project-feature-toggle button').click
|
||||||
|
|
||||||
expect(find("#pages_domain_auto_ssl_enabled", visible: false).value).to eq 'true'
|
expect(find("#pages_domain_auto_ssl_enabled", visible: false).value).to eq 'true'
|
||||||
expect(page).not_to have_selector '.card-header', text: 'Certificate'
|
expect(page).not_to have_selector '.gl-card-header', text: 'Certificate'
|
||||||
expect(page).not_to have_text domain.subject
|
expect(page).not_to have_text domain.subject
|
||||||
|
|
||||||
click_on 'Save Changes'
|
click_on 'Save Changes'
|
||||||
|
|
@ -108,7 +108,7 @@ RSpec.describe "Pages with Let's Encrypt", :https_pages_enabled, feature_categor
|
||||||
it 'user do not see private key' do
|
it 'user do not see private key' do
|
||||||
visit project_pages_domain_path(project, domain)
|
visit project_pages_domain_path(project, domain)
|
||||||
|
|
||||||
expect(page).not_to have_selector '.card-header', text: 'Certificate'
|
expect(page).not_to have_selector '.gl-card-header', text: 'Certificate'
|
||||||
expect(page).not_to have_text domain.subject
|
expect(page).not_to have_text domain.subject
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -131,16 +131,16 @@ RSpec.describe "Pages with Let's Encrypt", :https_pages_enabled, feature_categor
|
||||||
it 'user sees certificate subject' do
|
it 'user sees certificate subject' do
|
||||||
visit project_pages_domain_path(project, domain)
|
visit project_pages_domain_path(project, domain)
|
||||||
|
|
||||||
expect(page).to have_selector '.card-header', text: 'Certificate'
|
expect(page).to have_selector '.gl-card-header', text: 'Certificate'
|
||||||
expect(page).to have_text domain.subject
|
expect(page).to have_text domain.subject
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'user can delete the certificate', :js do
|
it 'user can delete the certificate', :js do
|
||||||
visit project_pages_domain_path(project, domain)
|
visit project_pages_domain_path(project, domain)
|
||||||
|
|
||||||
expect(page).to have_selector '.card-header', text: 'Certificate'
|
expect(page).to have_selector '.gl-card-header', text: 'Certificate'
|
||||||
expect(page).to have_text domain.subject
|
expect(page).to have_text domain.subject
|
||||||
within('.card') { click_on 'Remove' }
|
within('.gl-card') { click_on 'Remove' }
|
||||||
accept_gl_confirm(button_text: 'Remove certificate')
|
accept_gl_confirm(button_text: 'Remove certificate')
|
||||||
expect(page).to have_field 'Certificate (PEM)', with: ''
|
expect(page).to have_field 'Certificate (PEM)', with: ''
|
||||||
expect(page).to have_field 'Key (PEM)', with: ''
|
expect(page).to have_field 'Key (PEM)', with: ''
|
||||||
|
|
|
||||||
|
|
@ -477,6 +477,9 @@ export const mockList = {
|
||||||
loading: false,
|
loading: false,
|
||||||
issuesCount: 1,
|
issuesCount: 1,
|
||||||
maxIssueCount: 0,
|
maxIssueCount: 0,
|
||||||
|
metadata: {
|
||||||
|
epicsCount: 1,
|
||||||
|
},
|
||||||
__typename: 'BoardList',
|
__typename: 'BoardList',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,17 @@ import SuperSidebar from '~/super_sidebar/components/super_sidebar.vue';
|
||||||
import HelpCenter from '~/super_sidebar/components/help_center.vue';
|
import HelpCenter from '~/super_sidebar/components/help_center.vue';
|
||||||
import UserBar from '~/super_sidebar/components/user_bar.vue';
|
import UserBar from '~/super_sidebar/components/user_bar.vue';
|
||||||
import SidebarPortalTarget from '~/super_sidebar/components/sidebar_portal_target.vue';
|
import SidebarPortalTarget from '~/super_sidebar/components/sidebar_portal_target.vue';
|
||||||
|
import { isCollapsed } from '~/super_sidebar/super_sidebar_collapsed_state_manager';
|
||||||
import { sidebarData } from '../mock_data';
|
import { sidebarData } from '../mock_data';
|
||||||
|
|
||||||
|
jest.mock('~/super_sidebar/super_sidebar_collapsed_state_manager', () => ({
|
||||||
|
isCollapsed: jest.fn(),
|
||||||
|
}));
|
||||||
|
|
||||||
describe('SuperSidebar component', () => {
|
describe('SuperSidebar component', () => {
|
||||||
let wrapper;
|
let wrapper;
|
||||||
|
|
||||||
|
const findSidebar = () => wrapper.find('.super-sidebar');
|
||||||
const findUserBar = () => wrapper.findComponent(UserBar);
|
const findUserBar = () => wrapper.findComponent(UserBar);
|
||||||
const findHelpCenter = () => wrapper.findComponent(HelpCenter);
|
const findHelpCenter = () => wrapper.findComponent(HelpCenter);
|
||||||
const findSidebarPortalTarget = () => wrapper.findComponent(SidebarPortalTarget);
|
const findSidebarPortalTarget = () => wrapper.findComponent(SidebarPortalTarget);
|
||||||
|
|
@ -22,19 +28,32 @@ describe('SuperSidebar component', () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
describe('default', () => {
|
describe('default', () => {
|
||||||
beforeEach(() => {
|
it('add aria-hidden and inert attributes when collapsed', () => {
|
||||||
|
isCollapsed.mockReturnValue(true);
|
||||||
createWrapper();
|
createWrapper();
|
||||||
|
expect(findSidebar().attributes('aria-hidden')).toBe('true');
|
||||||
|
expect(findSidebar().attributes('inert')).toBe('inert');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('does not add aria-hidden and inert attributes when expanded', () => {
|
||||||
|
isCollapsed.mockReturnValue(false);
|
||||||
|
createWrapper();
|
||||||
|
expect(findSidebar().attributes('aria-hidden')).toBe('false');
|
||||||
|
expect(findSidebar().attributes('inert')).toBe(undefined);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('renders UserBar with sidebarData', () => {
|
it('renders UserBar with sidebarData', () => {
|
||||||
|
createWrapper();
|
||||||
expect(findUserBar().props('sidebarData')).toBe(sidebarData);
|
expect(findUserBar().props('sidebarData')).toBe(sidebarData);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('renders HelpCenter with sidebarData', () => {
|
it('renders HelpCenter with sidebarData', () => {
|
||||||
|
createWrapper();
|
||||||
expect(findHelpCenter().props('sidebarData')).toBe(sidebarData);
|
expect(findHelpCenter().props('sidebarData')).toBe(sidebarData);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('renders SidebarPortalTarget', () => {
|
it('renders SidebarPortalTarget', () => {
|
||||||
|
createWrapper();
|
||||||
expect(findSidebarPortalTarget().exists()).toBe(true);
|
expect(findSidebarPortalTarget().exists()).toBe(true);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,132 @@
|
||||||
|
import { GlBreakpointInstance as bp, breakpoints } from '@gitlab/ui/dist/utils';
|
||||||
|
import { getCookie, setCookie } from '~/lib/utils/common_utils';
|
||||||
|
import { setHTMLFixture, resetHTMLFixture } from 'helpers/fixtures';
|
||||||
|
import {
|
||||||
|
SIDEBAR_COLLAPSED_CLASS,
|
||||||
|
SIDEBAR_COLLAPSED_COOKIE,
|
||||||
|
SIDEBAR_COLLAPSED_COOKIE_EXPIRATION,
|
||||||
|
toggleSuperSidebarCollapsed,
|
||||||
|
initSuperSidebarCollapsedState,
|
||||||
|
bindSuperSidebarCollapsedEvents,
|
||||||
|
findPage,
|
||||||
|
findSidebar,
|
||||||
|
findToggles,
|
||||||
|
} from '~/super_sidebar/super_sidebar_collapsed_state_manager';
|
||||||
|
|
||||||
|
const { xl, sm } = breakpoints;
|
||||||
|
|
||||||
|
jest.mock('~/lib/utils/common_utils', () => ({
|
||||||
|
getCookie: jest.fn(),
|
||||||
|
setCookie: jest.fn(),
|
||||||
|
}));
|
||||||
|
|
||||||
|
const pageHasCollapsedClass = (hasClass) => {
|
||||||
|
if (hasClass) {
|
||||||
|
expect(findPage().classList).toContain(SIDEBAR_COLLAPSED_CLASS);
|
||||||
|
} else {
|
||||||
|
expect(findPage().classList).not.toContain(SIDEBAR_COLLAPSED_CLASS);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
describe('Super Sidebar Collapsed State Manager', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
setHTMLFixture(`
|
||||||
|
<button class="js-super-sidebar-toggle"></button>
|
||||||
|
<div class="page-with-super-sidebar"></div>
|
||||||
|
<aside class="super-sidebar"></aside>
|
||||||
|
`);
|
||||||
|
});
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
resetHTMLFixture();
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('toggleSuperSidebarCollapsed', () => {
|
||||||
|
it.each`
|
||||||
|
collapsed | saveCookie | windowWidth | hasClass
|
||||||
|
${true} | ${true} | ${xl} | ${true}
|
||||||
|
${true} | ${false} | ${xl} | ${true}
|
||||||
|
${true} | ${true} | ${sm} | ${true}
|
||||||
|
${true} | ${false} | ${sm} | ${true}
|
||||||
|
${false} | ${true} | ${xl} | ${false}
|
||||||
|
${false} | ${false} | ${xl} | ${false}
|
||||||
|
${false} | ${true} | ${sm} | ${false}
|
||||||
|
${false} | ${false} | ${sm} | ${false}
|
||||||
|
`(
|
||||||
|
'when collapsed is $collapsed, saveCookie is $saveCookie, and windowWidth is $windowWidth then page class contains `page-with-super-sidebar-collapsed` is $hasClass',
|
||||||
|
({ collapsed, saveCookie, windowWidth, hasClass }) => {
|
||||||
|
jest.spyOn(bp, 'windowWidth').mockReturnValue(windowWidth);
|
||||||
|
|
||||||
|
toggleSuperSidebarCollapsed(collapsed, saveCookie);
|
||||||
|
|
||||||
|
pageHasCollapsedClass(hasClass);
|
||||||
|
expect(findSidebar().ariaHidden).toBe(collapsed);
|
||||||
|
expect(findSidebar().inert).toBe(collapsed);
|
||||||
|
|
||||||
|
if (saveCookie && windowWidth >= xl) {
|
||||||
|
expect(setCookie).toHaveBeenCalledWith(SIDEBAR_COLLAPSED_COOKIE, collapsed, {
|
||||||
|
expires: SIDEBAR_COLLAPSED_COOKIE_EXPIRATION,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
expect(setCookie).not.toHaveBeenCalled();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('initSuperSidebarCollapsedState', () => {
|
||||||
|
it.each`
|
||||||
|
windowWidth | cookie | hasClass
|
||||||
|
${xl} | ${undefined} | ${false}
|
||||||
|
${sm} | ${undefined} | ${true}
|
||||||
|
${xl} | ${'true'} | ${true}
|
||||||
|
${sm} | ${'true'} | ${true}
|
||||||
|
`(
|
||||||
|
'sets page class to `page-with-super-sidebar-collapsed` when windowWidth is $windowWidth and cookie value is $cookie',
|
||||||
|
({ windowWidth, cookie, hasClass }) => {
|
||||||
|
jest.spyOn(bp, 'windowWidth').mockReturnValue(windowWidth);
|
||||||
|
getCookie.mockReturnValue(cookie);
|
||||||
|
|
||||||
|
initSuperSidebarCollapsedState();
|
||||||
|
|
||||||
|
pageHasCollapsedClass(hasClass);
|
||||||
|
expect(setCookie).not.toHaveBeenCalled();
|
||||||
|
},
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('bindSuperSidebarCollapsedEvents', () => {
|
||||||
|
it.each`
|
||||||
|
windowWidth | cookie | hasClass
|
||||||
|
${xl} | ${undefined} | ${true}
|
||||||
|
${sm} | ${undefined} | ${true}
|
||||||
|
${xl} | ${'true'} | ${false}
|
||||||
|
${sm} | ${'true'} | ${false}
|
||||||
|
`(
|
||||||
|
'toggle click sets page class to `page-with-super-sidebar-collapsed` when windowWidth is $windowWidth and cookie value is $cookie',
|
||||||
|
({ windowWidth, cookie, hasClass }) => {
|
||||||
|
setHTMLFixture(`
|
||||||
|
<button class="js-super-sidebar-toggle"></button>
|
||||||
|
<div class="page-with-super-sidebar ${cookie ? SIDEBAR_COLLAPSED_CLASS : ''}"></div>
|
||||||
|
<aside class="super-sidebar"></aside>
|
||||||
|
`);
|
||||||
|
jest.spyOn(bp, 'windowWidth').mockReturnValue(windowWidth);
|
||||||
|
getCookie.mockReturnValue(cookie);
|
||||||
|
|
||||||
|
bindSuperSidebarCollapsedEvents();
|
||||||
|
|
||||||
|
findToggles()[0].click();
|
||||||
|
|
||||||
|
pageHasCollapsedClass(hasClass);
|
||||||
|
|
||||||
|
if (windowWidth >= xl) {
|
||||||
|
expect(setCookie).toHaveBeenCalledWith(SIDEBAR_COLLAPSED_COOKIE, !cookie, {
|
||||||
|
expires: SIDEBAR_COLLAPSED_COOKIE_EXPIRATION,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
expect(setCookie).not.toHaveBeenCalled();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
@ -94,9 +94,9 @@ RSpec.describe JiraConnectInstallations::ProxyLifecycleEventService, feature_cat
|
||||||
expect(Gitlab::IntegrationsLogger).to receive(:info).with(
|
expect(Gitlab::IntegrationsLogger).to receive(:info).with(
|
||||||
integration: 'JiraConnect',
|
integration: 'JiraConnect',
|
||||||
message: 'Proxy lifecycle event received error response',
|
message: 'Proxy lifecycle event received error response',
|
||||||
event_type: evnet_type,
|
jira_event_type: evnet_type,
|
||||||
status_code: 422,
|
jira_status_code: 422,
|
||||||
body: 'Error message'
|
jira_body: 'Error message'
|
||||||
)
|
)
|
||||||
|
|
||||||
execute_service
|
execute_service
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,9 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
RSpec.describe 'devise/confirmations/almost_there' do
|
RSpec.describe 'devise/confirmations/almost_there' do
|
||||||
describe 'confirmations text' do
|
|
||||||
subject { render(template: 'devise/confirmations/almost_there') }
|
subject { render(template: 'devise/confirmations/almost_there') }
|
||||||
|
|
||||||
|
describe 'confirmations text' do
|
||||||
before do
|
before do
|
||||||
allow(view).to receive(:params).and_return(email: email)
|
allow(view).to receive(:params).and_return(email: email)
|
||||||
end
|
end
|
||||||
|
|
@ -34,4 +34,17 @@ RSpec.describe 'devise/confirmations/almost_there' do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe 'register again prompt' do
|
||||||
|
specify do
|
||||||
|
subject
|
||||||
|
|
||||||
|
expect(rendered).to have_content(
|
||||||
|
'If the email address is incorrect, you can register again with a different email'
|
||||||
|
)
|
||||||
|
expect(rendered).to have_link(
|
||||||
|
'register again with a different email', href: new_user_registration_path
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue