2023-04-23 21:23:45 +05:30
|
|
|
import { shallowMount } from '@vue/test-utils';
|
|
|
|
import OutboundTokenAccess from '~/token_access/components/outbound_token_access.vue';
|
|
|
|
import InboundTokenAccess from '~/token_access/components/inbound_token_access.vue';
|
|
|
|
import TokenAccessApp from '~/token_access/components/token_access_app.vue';
|
|
|
|
|
|
|
|
describe('TokenAccessApp component', () => {
|
|
|
|
let wrapper;
|
|
|
|
|
|
|
|
const findOutboundTokenAccess = () => wrapper.findComponent(OutboundTokenAccess);
|
|
|
|
const findInboundTokenAccess = () => wrapper.findComponent(InboundTokenAccess);
|
|
|
|
|
2023-05-27 22:25:52 +05:30
|
|
|
const createComponent = () => {
|
|
|
|
wrapper = shallowMount(TokenAccessApp);
|
2023-04-23 21:23:45 +05:30
|
|
|
};
|
|
|
|
|
|
|
|
describe('default', () => {
|
|
|
|
beforeEach(() => {
|
|
|
|
createComponent();
|
|
|
|
});
|
|
|
|
|
|
|
|
it('renders the outbound token access component', () => {
|
|
|
|
expect(findOutboundTokenAccess().exists()).toBe(true);
|
|
|
|
});
|
|
|
|
|
|
|
|
it('renders the inbound token access component', () => {
|
|
|
|
createComponent(true);
|
|
|
|
|
|
|
|
expect(findInboundTokenAccess().exists()).toBe(true);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|