Commit 46654acc authored by George Tsiolis's avatar George Tsiolis

Replace icons in environment item vue component

parent b4d1ce0a
...@@ -458,6 +458,14 @@ export default { ...@@ -458,6 +458,14 @@ export default {
return 'chevron-right'; return 'chevron-right';
}, },
deployIconName() {
if (this.model.isDeployBoardVisible) {
return 'chevron-down';
}
return 'chevron-right';
},
}, },
methods: { methods: {
...@@ -491,23 +499,14 @@ export default { ...@@ -491,23 +499,14 @@ export default {
> >
{{ s__("Environments|Environment") }} {{ s__("Environments|Environment") }}
</div> </div>
<span
<icon
v-if="model.hasDeployBoard" v-if="model.hasDeployBoard"
:name="deployIconName"
class="deploy-board-icon" class="deploy-board-icon"
@click="toggleDeployBoard"> @click="toggleDeployBoard"
/>
<i
v-show="!model.isDeployBoardVisible"
class="fa fa-caret-right"
aria-hidden="true">
</i>
<i
v-show="model.isDeployBoardVisible"
class="fa fa-caret-down"
aria-hidden="true">
</i>
</span>
<span <span
v-if="!model.isFolder" v-if="!model.isFolder"
class="environment-name table-mobile-content"> class="environment-name table-mobile-content">
......
...@@ -113,9 +113,7 @@ describe('Environment', () => { ...@@ -113,9 +113,7 @@ describe('Environment', () => {
describe('deploy boards', () => { describe('deploy boards', () => {
it('should render arrow to open deploy boards', (done) => { it('should render arrow to open deploy boards', (done) => {
setTimeout(() => { setTimeout(() => {
expect( expect(component.$el.querySelector('.deploy-board-icon.ic-chevron-right')).not.toBeNull();
component.$el.querySelector('.deploy-board-icon i.fa-caret-right'),
).toBeDefined();
done(); done();
}, 0); }, 0);
}); });
......
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