Commit 2db2a8a1 authored by Alexander Turinske's avatar Alexander Turinske

Update sidebar edit tests to be more readable

parent 5cbea3ae
...@@ -100,7 +100,6 @@ export default { ...@@ -100,7 +100,6 @@ export default {
<gl-button <gl-button
v-if="isEditable" v-if="isEditable"
class="gl-text-black-normal!" class="gl-text-black-normal!"
data-testid="edit-status"
variant="link" variant="link"
@click="toggleFormDropdown" @click="toggleFormDropdown"
@keydown.esc="hideDropdown" @keydown.esc="hideDropdown"
......
...@@ -9,8 +9,8 @@ const mockAlert = mockAlerts[0]; ...@@ -9,8 +9,8 @@ const mockAlert = mockAlerts[0];
describe('Alert Details Sidebar Status', () => { describe('Alert Details Sidebar Status', () => {
let wrapper; let wrapper;
const findStatusDropdown = () => wrapper.find(GlDropdown); const findStatusDropdown = () => wrapper.findComponent(GlDropdown);
const findStatusLoadingIcon = () => wrapper.find(GlLoadingIcon); const findStatusLoadingIcon = () => wrapper.findComponent(GlLoadingIcon);
const findAlertStatus = () => wrapper.findComponent(AlertStatus); const findAlertStatus = () => wrapper.findComponent(AlertStatus);
const findStatus = () => wrapper.findByTestId('status'); const findStatus = () => wrapper.findByTestId('status');
const findSidebarIcon = () => wrapper.findByTestId('status-icon'); const findSidebarIcon = () => wrapper.findByTestId('status-icon');
...@@ -74,7 +74,8 @@ describe('Alert Details Sidebar Status', () => { ...@@ -74,7 +74,8 @@ describe('Alert Details Sidebar Status', () => {
sidebarCollapsed: false, sidebarCollapsed: false,
loading: false, loading: false,
}); });
await findAlertStatus().vm.$emit('handle-updating', true); findAlertStatus().vm.$emit('handle-updating', true);
await wrapper.vm.$nextTick();
expect(findStatusLoadingIcon().exists()).toBe(true); expect(findStatusLoadingIcon().exists()).toBe(true);
}); });
......
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