Skip to content

Commit

Permalink
Removing "print PDF" button from desktop version, same can be accompl…
Browse files Browse the repository at this point in the history
…ished with the regular print button using the system dialogue
  • Loading branch information
lreading committed Feb 12, 2022
1 parent ec16e72 commit 30d1670
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
14 changes: 1 addition & 13 deletions td.vue/src/views/Report.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,6 @@

<b-col class="text-right right">
<b-btn-group>
<td-form-button
id="td-save-pdf-btn"
:onBtnClick="noOp"
v-if="isElectron"
icon="file-pdf"
:text="$t('forms.savePdf')" />
<td-form-button
id="td-print-btn"
:onBtnClick="print"
Expand Down Expand Up @@ -155,7 +149,6 @@
<script>
import { mapState, mapGetters } from 'vuex';
import env from '@/service/env.js';
import { getProviderType } from '@/service/provider/providers.js';
import TdCoversheet from '@/components/report/Coversheet.vue';
import TdDiagramDetail from '@/components/report/DiagramDetail.vue';
Expand All @@ -182,8 +175,7 @@ export default {
mitigated: true,
diagrams: true,
branding: true
},
isElectron: env.isElectron()
}
};
},
computed: {
Expand All @@ -202,10 +194,6 @@ export default {
})
},
methods: {
noOp() {
console.log('TODO');
return;
},
onCloseClick() {
this.$router.push({ name: `${this.providerType}ThreatModel`, params: this.$route.params });
},
Expand Down
6 changes: 0 additions & 6 deletions td.vue/tests/unit/views/report.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,6 @@ describe('views/PrinterReport.vue', () => {
.toEqual(true);
});

it('does nothing with a noop', () => {
console.log = jest.fn();
wrapper.vm.noOp();
expect(console.log).toHaveBeenCalledWith('TODO');
});

it('closes the report', () => {
wrapper.vm.onCloseClick();
expect(routerMock.push).toHaveBeenCalledWith({
Expand Down

0 comments on commit 30d1670

Please sign in to comment.