Commit 325bb7aa authored by Alexander Turinske's avatar Alexander Turinske

Update policy drawer to match designs

- ensure heading is h4
- update test ids to be consistent
parent fe7dcdd0
...@@ -72,7 +72,7 @@ export default { ...@@ -72,7 +72,7 @@ export default {
v-on="$listeners" v-on="$listeners"
> >
<template v-if="policy" #title> <template v-if="policy" #title>
<h3 class="gl-my-0 gl-mr-3">{{ policy.name }}</h3> <h4 class="gl-my-0 gl-mr-3">{{ policy.name }}</h4>
</template> </template>
<template v-if="policy" #header> <template v-if="policy" #header>
<gl-button <gl-button
...@@ -92,7 +92,10 @@ export default { ...@@ -92,7 +92,10 @@ export default {
<p> <p>
{{ s__("NetworkPolicies|Define this policy's location, conditions and actions.") }} {{ s__("NetworkPolicies|Define this policy's location, conditions and actions.") }}
</p> </p>
<policy-yaml-editor :value="policyYaml" data-testid="default-policy-yaml-editor" /> <policy-yaml-editor
:value="policyYaml"
data-testid="policy-yaml-editor-default-component"
/>
</div> </div>
</gl-tab> </gl-tab>
<gl-tab v-if="policyComponent" title="Yaml"> <gl-tab v-if="policyComponent" title="Yaml">
......
...@@ -31,7 +31,8 @@ describe('PolicyDrawer component', () => { ...@@ -31,7 +31,8 @@ describe('PolicyDrawer component', () => {
const findAllTabs = () => wrapper.findAllComponents(GlTab); const findAllTabs = () => wrapper.findAllComponents(GlTab);
const findCiliumNetworkPolicy = () => wrapper.findComponent(CiliumNetworkPolicy); const findCiliumNetworkPolicy = () => wrapper.findComponent(CiliumNetworkPolicy);
const findScanExecutionPolicy = () => wrapper.findComponent(ScanExecutionPolicy); const findScanExecutionPolicy = () => wrapper.findComponent(ScanExecutionPolicy);
const findDefaultPolicyEditor = () => wrapper.findByTestId('default-policy-yaml-editor'); const findDefaultComponentPolicyEditor = () =>
wrapper.findByTestId('policy-yaml-editor-default-component');
const findTabPolicyEditor = () => wrapper.findByTestId('policy-yaml-editor-tab-content'); const findTabPolicyEditor = () => wrapper.findByTestId('policy-yaml-editor-tab-content');
// Shared assertions // Shared assertions
...@@ -69,7 +70,7 @@ describe('PolicyDrawer component', () => { ...@@ -69,7 +70,7 @@ describe('PolicyDrawer component', () => {
}); });
it('renders network policy editor with manifest', () => { it('renders network policy editor with manifest', () => {
expect(findDefaultPolicyEditor().attributes('value')).toBe(mockGenericPolicy.yaml); expect(findDefaultComponentPolicyEditor().attributes('value')).toBe(mockGenericPolicy.yaml);
}); });
itRendersEditButton(); itRendersEditButton();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment