Commit 18bc3de5 authored by Fernando's avatar Fernando

Update pot file translations

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