chore: RTL configuration (#6521)

* chore: RTL configuration

* Adds scss file
This commit is contained in:
Sivin Varghese
2023-02-23 17:50:44 +05:30
committed by GitHub
parent 87aabfbb9a
commit 409466bbd5
8 changed files with 511 additions and 3 deletions

View File

@@ -0,0 +1,29 @@
import uiSettingsMixin from 'dashboard/mixins/uiSettings';
import { shallowMount } from '@vue/test-utils';
import rtlMixin from 'shared/mixins/rtlMixin';
describe('rtlMixin', () => {
it('returns is direction right-to-left view', () => {
const Component = {
render() {},
mixins: [rtlMixin, uiSettingsMixin],
data() {
return { uiSettings: { rtl_view: true } };
},
};
const wrapper = shallowMount(Component);
expect(wrapper.vm.isRTLView).toBe(true);
});
it('returns is direction left-to-right view', () => {
const Component = {
render() {},
mixins: [rtlMixin, uiSettingsMixin],
data() {
return { uiSettings: { rtl_view: false } };
},
};
const wrapper = shallowMount(Component);
expect(wrapper.vm.isRTLView).toBe(false);
});
});