Skip to content

Commit

Permalink
Fix print page count
Browse files Browse the repository at this point in the history
  • Loading branch information
ajuvonen committed May 14, 2024
1 parent a420aea commit a1c9ae3
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ watch(locale, (value) => {
.app__overlay {
background-color: rgba(0, 0, 0, 0.5);
position: absolute;
inset: 0;
height: 100%;
}
.app-bar {
Expand Down Expand Up @@ -146,6 +145,11 @@ watch(locale, (value) => {
.v-container {
margin: 0;
padding: 0;
position: unset;
}
:deep(.v-application__wrap) {
position: unset;
}
:deep(.v-main__scroller) {
Expand Down
6 changes: 6 additions & 0 deletions src/components/BaseView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,10 @@ const {isDark} = useScreen();
.v-card {
backdrop-filter: blur(5px);
}
@media print {
.v-card-text {
padding: 0;
}
}
</style>
18 changes: 18 additions & 0 deletions src/components/__tests__/PrintViewTable.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,22 @@ describe('PrintViewTable', () => {
});
expect(wrapper.find('h2').text()).toBe('My title');
});

it('uses striped prop', async () => {
const wrapper = mount(PrintViewTable, {
props: {
striped: false,
},
slots: {
header: '<tr><th>My header</th></tr>',
body: '<tr><td>Body content</td></tr>',
},
});

expect(wrapper.find('.print-view__table').classes()).to.not.contain(
'print-view__table--striped',
);
await wrapper.setProps({striped: true});
expect(wrapper.find('.print-view__table').classes()).to.contain('print-view__table--striped');
});
});

0 comments on commit a1c9ae3

Please sign in to comment.