Commit 18bc3de5 authored by Fernando's avatar Fernando

Update pot file translations

* Resolve merge conflict
parent 646522cc
......@@ -12,14 +12,14 @@ export default {
<div class="mr-widget-body media">
<div class="space-children">
<status-icon status="warning" />
<button type="button" class="btn btn-success btn-sm" disabled="true">
<gl-button category="primary" variant="success" disabled="disabled" size="small">
{{ s__('mrWidget|Merge') }}
</button>
</gl-button>
</div>
<div class="media-body">
<span class="bold">
<strong>
{{ s__('mrWidget|You can only merge once the denied license is removed') }}
</span>
</strong>
</div>
</div>
</template>
......@@ -114,14 +114,12 @@ export const receiveSetLicenseApprovalError = ({ commit }, error) => {
export const fetchLicenseCheckApprovalRule = ({ dispatch, state }) => {
dispatch('requestLicenseCheckApprovalRule');
axios
return axios
.get(state.approvalsApiPath)
.then(({ data }) => {
const hasLicenseCheckApprovalRule = Boolean(
data.approval_rules_left.find(rule => {
return rule.name === 'License-Check';
}),
);
const hasLicenseCheckApprovalRule = data.approval_rules_left.some(rule => {
return rule.name === 'License-Check';
});
dispatch('receiveLicenseCheckApprovalRuleSuccess', { hasLicenseCheckApprovalRule });
})
......
......@@ -21,11 +21,11 @@ export const licenseReportGroups = state =>
);
export const hasReportItems = (_, getters) => {
return getters.licenseReport && getters.licenseReport.length;
return Boolean(getters.licenseReport && getters.licenseReport.length);
};
export const baseReportHasLicenses = state => {
return state.existingLicenses.length;
return Boolean(state.existingLicenses.length);
};
export const licenseReportLength = (_, getters) => {
......
......@@ -15,18 +15,16 @@ describe('EE MrWidgetPolicyViolation', () => {
wrapper = null;
});
describe('when shown', () => {
beforeEach(() => {
createComponent();
});
beforeEach(() => {
createComponent();
});
it('shows the disabled merge button', () => {
expect(wrapper.text()).toContain('Merge');
expect(findButton().attributes().disabled).toBe('disabled');
});
it('shows the disabled merge button', () => {
expect(wrapper.text()).toContain('Merge');
expect(findButton().attributes().disabled).toBe('disabled');
});
it('shows the disabled reason', () => {
expect(wrapper.text()).toContain('You can only merge once the denied license is removed');
});
it('shows the disabled reason', () => {
expect(wrapper.text()).toContain('You can only merge once the denied license is removed');
});
});
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