mirror of
https://github.com/nasa/openmct.git
synced 2025-04-15 15:06:47 +00:00
[Flexible Layout] Unit test for rendering the view (#5308)
* flex layout render test to boost coverage
This commit is contained in:
parent
45bc317a59
commit
194060f30a
@ -22,6 +22,7 @@
|
||||
|
||||
import { createOpenMct, resetApplicationState } from 'utils/testing';
|
||||
import FlexibleLayout from './plugin';
|
||||
import Vue from 'vue';
|
||||
|
||||
describe('the plugin', function () {
|
||||
let element;
|
||||
@ -61,7 +62,7 @@ describe('the plugin', function () {
|
||||
element.appendChild(child);
|
||||
|
||||
openmct.on('start', done);
|
||||
openmct.startHeadless();
|
||||
openmct.start(child);
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
@ -83,6 +84,16 @@ describe('the plugin', function () {
|
||||
it('provides a view', () => {
|
||||
expect(flexibleLayoutViewProvider).toBeDefined();
|
||||
});
|
||||
|
||||
it('renders a view', async () => {
|
||||
const flexibleView = flexibleLayoutViewProvider.view(testViewObject, []);
|
||||
flexibleView.show(child, false);
|
||||
|
||||
await Vue.nextTick();
|
||||
const flexTitle = child.querySelector('.l-browse-bar .c-object-label__name');
|
||||
|
||||
expect(flexTitle).not.toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
describe('the toolbar', () => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user