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 {
<gl-button
v-if="isEditable"
class="gl-text-black-normal!"
data-testid="edit-status"
variant="link"
@click="toggleFormDropdown"
@keydown.esc="hideDropdown"
......
......@@ -9,8 +9,8 @@ const mockAlert = mockAlerts[0];
describe('Alert Details Sidebar Status', () => {
let wrapper;
const findStatusDropdown = () => wrapper.find(GlDropdown);
const findStatusLoadingIcon = () => wrapper.find(GlLoadingIcon);
const findStatusDropdown = () => wrapper.findComponent(GlDropdown);
const findStatusLoadingIcon = () => wrapper.findComponent(GlLoadingIcon);
const findAlertStatus = () => wrapper.findComponent(AlertStatus);
const findStatus = () => wrapper.findByTestId('status');
const findSidebarIcon = () => wrapper.findByTestId('status-icon');
......@@ -74,7 +74,8 @@ describe('Alert Details Sidebar Status', () => {
sidebarCollapsed: 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);
});
......
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