Commit 3d807021 authored by Justin Ho Tuan Duong's avatar Justin Ho Tuan Duong Committed by Simon Knox

Polish UI of epic roadmap view

- Update button to use confirm variant instead of success.
- Add missing bottom margin of loading icon.

Changelog: changed
EE: true
parent b0f8a7a4
...@@ -144,7 +144,7 @@ export default { ...@@ -144,7 +144,7 @@ export default {
<gl-button <gl-button
v-if="!hasFiltersApplied" v-if="!hasFiltersApplied"
:href="newEpicPath" :href="newEpicPath"
variant="success" variant="confirm"
class="gl-mt-3 gl-sm-mt-0! gl-w-full gl-sm-w-auto!" class="gl-mt-3 gl-sm-mt-0! gl-w-full gl-sm-w-auto!"
data-testid="new-epic-button" data-testid="new-epic-button"
> >
......
...@@ -74,7 +74,7 @@ export default { ...@@ -74,7 +74,7 @@ export default {
<div class="roadmap-app-container gl-h-full"> <div class="roadmap-app-container gl-h-full">
<roadmap-filters v-if="showFilteredSearchbar && !epicIid" @toggleSettings="toggleSettings" /> <roadmap-filters v-if="showFilteredSearchbar && !epicIid" @toggleSettings="toggleSettings" />
<div :class="{ 'overflow-reset': epicsFetchResultEmpty }" class="roadmap-container gl-relative"> <div :class="{ 'overflow-reset': epicsFetchResultEmpty }" class="roadmap-container gl-relative">
<gl-loading-icon v-if="epicsFetchInProgress" class="gl-mt-5" size="md" /> <gl-loading-icon v-if="epicsFetchInProgress" class="gl-my-5" size="md" />
<epics-list-empty <epics-list-empty
v-else-if="epicsFetchResultEmpty" v-else-if="epicsFetchResultEmpty"
:preset-type="presetType" :preset-type="presetType"
......
...@@ -56,7 +56,6 @@ describe('ee/roadmap/components/epics_list_empty.vue', () => { ...@@ -56,7 +56,6 @@ describe('ee/roadmap/components/epics_list_empty.vue', () => {
afterEach(() => { afterEach(() => {
wrapper.destroy(); wrapper.destroy();
wrapper = null;
}); });
const findTitle = () => wrapper.findByTestId('title'); const findTitle = () => wrapper.findByTestId('title');
......
...@@ -52,6 +52,10 @@ describe('RoadmapApp', () => { ...@@ -52,6 +52,10 @@ describe('RoadmapApp', () => {
}; };
const findSettingsSidebar = () => wrapper.findByTestId('roadmap-settings'); const findSettingsSidebar = () => wrapper.findByTestId('roadmap-settings');
const findEpicsListEmpty = () => wrapper.findComponent(EpicsListEmpty);
const findGlLoadingIcon = () => wrapper.findComponent(GlLoadingIcon);
const findRoadmapFilters = () => wrapper.findComponent(RoadmapFilters);
const findRoadmapShell = () => wrapper.findComponent(RoadmapShell);
beforeEach(() => { beforeEach(() => {
store = createStore(); store = createStore();
...@@ -87,15 +91,15 @@ describe('RoadmapApp', () => { ...@@ -87,15 +91,15 @@ describe('RoadmapApp', () => {
}); });
it(`loading icon is${showLoading ? '' : ' not'} shown`, () => { it(`loading icon is${showLoading ? '' : ' not'} shown`, () => {
expect(wrapper.find(GlLoadingIcon).exists()).toBe(showLoading); expect(findGlLoadingIcon().exists()).toBe(showLoading);
}); });
it(`roadmap is${showRoadmapShell ? '' : ' not'} shown`, () => { it(`roadmap is${showRoadmapShell ? '' : ' not'} shown`, () => {
expect(wrapper.find(RoadmapShell).exists()).toBe(showRoadmapShell); expect(findRoadmapShell().exists()).toBe(showRoadmapShell);
}); });
it(`empty state view is${showEpicsListEmpty ? '' : ' not'} shown`, () => { it(`empty state view is${showEpicsListEmpty ? '' : ' not'} shown`, () => {
expect(wrapper.find(EpicsListEmpty).exists()).toBe(showEpicsListEmpty); expect(findEpicsListEmpty().exists()).toBe(showEpicsListEmpty);
}); });
}, },
); );
...@@ -107,7 +111,7 @@ describe('RoadmapApp', () => { ...@@ -107,7 +111,7 @@ describe('RoadmapApp', () => {
}); });
it('shows epic-list-empty component', () => { it('shows epic-list-empty component', () => {
const epicsListEmpty = wrapper.findComponent(EpicsListEmpty); const epicsListEmpty = findEpicsListEmpty();
expect(epicsListEmpty.exists()).toBe(true); expect(epicsListEmpty.exists()).toBe(true);
expect(epicsListEmpty.props()).toMatchObject({ expect(epicsListEmpty.props()).toMatchObject({
emptyStateIllustrationPath, emptyStateIllustrationPath,
...@@ -133,17 +137,17 @@ describe('RoadmapApp', () => { ...@@ -133,17 +137,17 @@ describe('RoadmapApp', () => {
await nextTick(); await nextTick();
expect(wrapper.findComponent(RoadmapFilters).exists()).toBe(false); expect(findRoadmapFilters().exists()).toBe(false);
}); });
it('shows roadmap filters UI when epicIid is not present', () => { it('shows roadmap filters UI when epicIid is not present', () => {
// By default, `epicIid` is not set on store. // By default, `epicIid` is not set on store.
expect(wrapper.findComponent(RoadmapFilters).exists()).toBe(true); expect(findRoadmapFilters().exists()).toBe(true);
}); });
it('shows roadmap-shell component', () => { it('shows roadmap-shell component', () => {
const roadmapShell = wrapper.findComponent(RoadmapShell); const roadmapShell = findRoadmapShell();
expect(wrapper.find(RoadmapShell).exists()).toBe(true); expect(roadmapShell.exists()).toBe(true);
expect(roadmapShell.props()).toMatchObject({ expect(roadmapShell.props()).toMatchObject({
currentGroupId, currentGroupId,
epics, epics,
......
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