Commit 3e2c29a9 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'ph/342620/removeActionsDropdownIfNoActionsExist' into 'master'

Fixes responsive actions being visible when they shouldn't

See merge request gitlab-org/gitlab!72797
parents 111a131a 1cba6601
......@@ -30,7 +30,7 @@ export default {
<template>
<div>
<gl-dropdown
v-if="tertiaryButtons"
v-if="tertiaryButtons.length"
:text="dropdownLabel"
icon="ellipsis_v"
no-caret
......
......@@ -143,7 +143,10 @@ export default {
:is-loading="isLoadingSummary"
:icon-name="statusIconName"
/>
<div class="media-body gl-display-flex gl-flex-direction-row!">
<div
class="media-body gl-display-flex gl-flex-direction-row!"
data-testid="widget-extension-top-level"
>
<div class="gl-flex-grow-1">
<template v-if="isLoadingSummary">{{ widgetLoadingText }}</template>
<div v-else v-safe-html="summary(collapsedData)"></div>
......
import { GlBadge, GlLink, GlIcon } from '@gitlab/ui';
import { GlBadge, GlLink, GlIcon, GlDropdown } from '@gitlab/ui';
import { mount } from '@vue/test-utils';
import MockAdapter from 'axios-mock-adapter';
import Vue, { nextTick } from 'vue';
......@@ -913,6 +913,10 @@ describe('MrWidgetOptions', () => {
await Vue.nextTick();
expect(
wrapper.find('[data-testid="widget-extension-top-level"]').find(GlDropdown).exists(),
).toBe(false);
const collapsedSection = wrapper.find('[data-testid="widget-extension-collapsed-section"]');
expect(collapsedSection.exists()).toBe(true);
expect(collapsedSection.text()).toContain('Hello world');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment