Commit cd6c3b3c authored by Austin Regnery's avatar Austin Regnery Committed by Peter Hegman

Update branch name to use monospace

Changelog: changed
EE: true
parent 87707291
......@@ -22,5 +22,5 @@ export default {
</script>
<template>
<div :class="{ monospace: isAllBranches }">{{ branchName }}</div>
<div :class="{ monospace: !isAllBranches }">{{ branchName }}</div>
</template>
......@@ -21,5 +21,5 @@ export default {
</script>
<template>
<span :class="{ monospace: isAllBranches }">{{ branchName }}</span>
<span :class="{ monospace: !isAllBranches }">{{ branchName }}</span>
</template>
......@@ -27,7 +27,7 @@ describe('Rule Branches', () => {
it('displays "All branches" if there are no protected branches', () => {
createComponent();
expect(findBranch().text()).toContain('All branches');
expect(findBranch().classes('monospace')).toBe(true);
expect(findBranch().classes('monospace')).toBe(false);
});
it('displays the branch name of the first protected branch', () => {
......@@ -50,6 +50,6 @@ describe('Rule Branches', () => {
expect(findBranch().text()).toContain('main');
expect(findBranch().text()).not.toContain('hello');
expect(findBranch().classes('monospace')).toBe(false);
expect(findBranch().classes('monospace')).toBe(true);
});
});
......@@ -20,13 +20,13 @@ describe('Status checks branch', () => {
createWrapper();
expect(findBranch().text()).toBe('All branches');
expect(findBranch().classes('monospace')).toBe(true);
expect(findBranch().classes('monospace')).toBe(false);
});
it('renders the first branch name when branches are given', () => {
createWrapper({ branches: [{ name: 'Foo' }, { name: 'Bar' }] });
expect(findBranch().text()).toBe('Foo');
expect(findBranch().classes('monospace')).toBe(false);
expect(findBranch().classes('monospace')).toBe(true);
});
});
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