Skip to content
代码片段 群组 项目
未验证 提交 a785a278 编辑于 作者: Daniele Rossetti's avatar Daniele Rossetti 提交者: GitLab
浏览文件

Scaffold Logs UI feature (frontend)

上级 5473593a
No related branches found
No related tags found
无相关合并请求
<script>
import ProvisionedObservabilityContainer from '~/observability/components/provisioned_observability_container.vue';
export default {
components: {
ProvisionedObservabilityContainer,
},
props: {
apiConfig: {
type: Object,
required: true,
},
},
};
</script>
<template>
<provisioned-observability-container :api-config="apiConfig">
<template #default>
<!-- TODO Implement List UI -->
</template>
</provisioned-observability-container>
</template>
import ListIndex from 'ee/logs/list_index.vue';
import { initSimpleApp } from '~/helpers/init_simple_app_helper';
initSimpleApp('#js-observability-logs', ListIndex);
import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
import ListIndex from 'ee/logs/list_index.vue';
import ProvisionedObservabilityContainer from '~/observability/components/provisioned_observability_container.vue';
describe('ListIndex', () => {
const props = {
apiConfig: {
oauthUrl: 'https://example.com/oauth',
tracingUrl: 'https://example.com/tracing',
provisioningUrl: 'https://example.com/provisioning',
servicesUrl: 'https://example.com/services',
operationsUrl: 'https://example.com/operations',
metricsUrl: 'https://example.com/metricsUrl',
},
};
let wrapper;
const mountComponent = () => {
wrapper = shallowMountExtended(ListIndex, {
propsData: props,
});
};
it('renders provisioned-observability-container component', () => {
mountComponent();
const observabilityContainer = wrapper.findComponent(ProvisionedObservabilityContainer);
expect(observabilityContainer.exists()).toBe(true);
expect(observabilityContainer.props('apiConfig')).toStrictEqual(props.apiConfig);
});
});
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册