Unverified Commit f52e3c4e authored by David López's avatar David López Committed by GitHub
Browse files

Merge pull request #14271 from davelopez/22.05_fix_storage_review_dialog_state

[22.05] Fix ReviewCleanupDialog state in Storage Dashboard
parents cdf1d183 7a2e2a3b
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -36,7 +36,11 @@ const FAKE_OPERATION = () => {
};

async function mountReviewCleanupDialogWith(operation, totalItems = EXPECTED_TOTAL_ITEMS) {
    const wrapper = mount(ReviewCleanupDialog, { propsData: { operation, totalItems, show: true } }, localVue);
    const wrapper = mount(
        ReviewCleanupDialog,
        { propsData: { operation, totalItems, show: true, modalStatic: true } },
        localVue
    );
    await flushPromises();
    return wrapper;
}
+14 −1
Original line number Diff line number Diff line
<template>
    <b-modal id="review-cleanup-dialog" v-model="showDialog" title-tag="h2" centered static @show="onShowModal">
    <b-modal
        id="review-cleanup-dialog"
        v-model="showDialog"
        title-tag="h2"
        :static="modalStatic"
        centered
        @show="onShowModal">
        <template v-slot:modal-title>
            {{ title }}
            <span class="text-primary h3">{{ totalItems }}<span v-if="rowLimitReached">+</span> items</span>
@@ -98,6 +104,10 @@ export default {
            type: Boolean,
            required: false,
        },
        modalStatic: {
            type: Boolean,
            required: false,
        },
    },
    data() {
        return {
@@ -185,6 +195,9 @@ export default {
        },
    },
    watch: {
        operation() {
            this.currentPage = 1;
        },
        totalItems(newVal) {
            this.totalRows = newVal;
        },