You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When tesing out the mixin, $refs is empty object and cannot be modified.
` import { shallowMount } from '@vue/test-utils';
import AcWidgetMixin from './ac-widget-mixin';
let widgetUuid = '98FADB82-E2AA-4A74-8460-39DF28365435';
afterEach(() => wrapper.unmount());
it('Should return clientHeight of element when method is called', () => {
expect(wrapper.vm.getTableHeight()).toBe(1600);
});
});
});
`
The text was updated successfully, but these errors were encountered:
When tesing out the mixin, $refs is empty object and cannot be modified.
` import { shallowMount } from '@vue/test-utils';
import AcWidgetMixin from './ac-widget-mixin';
let widgetUuid = '98FADB82-E2AA-4A74-8460-39DF28365435';
function getWrapper() {
const Component = {
render() {},
mixins: [AcWidgetMixin]
};
return shallowMount(Component, {
props: { widgetUuid, totalRecords: 8 }
});
}
let wrapper;
describe('Ac-widget Mixin', () => {
describe('getTableHeight', () => {
describe('when data-table is present', () => {
beforeEach(async () => {
wrapper = getWrapper();
wrapper.vm.$refs.tableRef = { $el: { clientHeight: 1600 } };
});
});
`
The text was updated successfully, but these errors were encountered: