Address reviewer feedback

- collapsible container
- table registry
- app spec
parent 4d83f4de
......@@ -36,7 +36,6 @@ describe('Registry List', () => {
beforeEach(() => {
wrapper = mount(registry, {
attachToDocument: true,
sync: false,
propsData,
computed: {
repos() {
......
......@@ -27,7 +27,6 @@ describe('collapsible registry container', () => {
store,
localVue,
attachToDocument: true,
sync: false,
});
beforeEach(() => {
......@@ -77,14 +76,13 @@ describe('collapsible registry container', () => {
});
});
it('should be closed when the user clicks on an opened repo', done => {
it('should be closed when the user clicks on an opened repo', () => {
const toggleRepos = findToggleRepos();
toggleRepos.at(0).trigger('click');
wrapper.vm.$nextTick(() => {
return wrapper.vm.$nextTick().then(() => {
toggleRepos.at(0).trigger('click');
wrapper.vm.$nextTick(() => {
expectIsClosed();
done();
});
});
});
......
......@@ -28,7 +28,7 @@ describe('table registry', () => {
const bulkDeletePath = 'path';
const mountWithStore = config =>
mount(tableRegistry, { ...config, store, localVue, attachToDocument: true, sync: false });
mount(tableRegistry, { ...config, store, localVue, attachToDocument: true });
beforeEach(() => {
store = new Vuex.Store({
......@@ -111,15 +111,18 @@ describe('table registry', () => {
});
});
it('should delete multiple items when multiple items are selected', done => {
it('should delete multiple items when multiple items are selected', () => {
const multiDeleteItems = jest.fn().mockResolvedValue();
wrapper.setMethods({ multiDeleteItems });
wrapper.vm.$nextTick(() => {
return wrapper.vm
.$nextTick()
.then(() => {
const selectAll = findSelectAllCheckbox();
selectAll.trigger('click');
wrapper.vm.$nextTick(() => {
return wrapper.vm.$nextTick();
})
.then(() => {
const deleteBtn = findDeleteButton();
expect(wrapper.vm.selectedItems).toEqual([0, 1]);
expect(deleteBtn.attributes('disabled')).toEqual(undefined);
......@@ -131,8 +134,6 @@ describe('table registry', () => {
path: bulkDeletePath,
items: [firstImage.tag, secondImage.tag],
});
done();
});
});
});
......
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