Skip to content

Commit

Permalink
Merge pull request #351 from Quetzacoalt91/fix-error-product-status
Browse files Browse the repository at this point in the history
Fix error on product status when product is approved
  • Loading branch information
Poulinho authored Aug 23, 2021
2 parents 7dd298e + dfb0eb9 commit 2e44bbb
Show file tree
Hide file tree
Showing 24 changed files with 32 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*/

// Import this file first to init mock on window
import {mount} from '@vue/test-utils';
import config from '@/../tests/init';

import {mount} from '@vue/test-utils';
import BadgeListRequirements from '@/components/commons/badge-list-requirements.vue';
import {BadgeList} from '@/../stories/badge-list-requirements.stories';

Expand Down
2 changes: 1 addition & 1 deletion _dev/src/components/commons/stepper.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import Vuex from 'vuex';

// Import this file first to init mock on window
import {shallowMount} from '@vue/test-utils';
import config, {cloneStore} from '@/../tests/init';

import {shallowMount} from '@vue/test-utils';
import Stepper from '@/components/commons/stepper.vue';
import {state} from '../../store/modules/product-feed/state';

Expand Down
2 changes: 1 addition & 1 deletion _dev/src/components/free-listing/free-listing-card.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import Vuex from 'vuex';

// Import this file first to init mock on window
import {mount, shallowMount} from '@vue/test-utils';
import config, {cloneStore} from '@/../tests/init';

import {mount, shallowMount} from '@vue/test-utils';
import FreeListingCard from '@/components/free-listing/free-listing-card.vue';
import {
Disabled,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*/

// Import this file first to init mock on window
import {mount} from '@vue/test-utils';
import config from '@/../tests/init';
import {
Disabled,
Expand All @@ -13,7 +14,6 @@ import {
Connected,
} from '@/../stories/google-account-card.stories';

import {mount} from '@vue/test-utils';
import GoogleAccountCard from '@/components/google-account/google-account-card.vue';

describe('google-account-card.vue', () => {
Expand Down
4 changes: 2 additions & 2 deletions _dev/src/components/google-account/google-account-card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,11 @@
* When "Can't connect", CTA should be disabled
*/
import googleUrl from '@/assets/json/googleUrl.json';
import {
BAlert,
} from 'bootstrap-vue';
import googleUrl from '@/assets/json/googleUrl.json';
import MutationsTypes from '../../store/modules/accounts/mutations-types';
import ActionsTypes from '../../store/modules/accounts/actions-types';
import Glass from '../commons/glass';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import Vuex from 'vuex';

// Import this file first to init mock on window
import {mount} from '@vue/test-utils';
import {cloneStore} from '@/../tests/init';

import {mount} from '@vue/test-utils';
import GoogleAccountCard from '@/components/google-ads-account/google-ads-account-card.vue';
import {
Disabled,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
import Vuex from 'vuex';

// Import this file first to init mock on window
import {mount, shallowMount} from '@vue/test-utils';
import {BFormCheckbox, BButton} from 'bootstrap-vue';
import {cloneStore} from '@/../tests/init';

import {mount, shallowMount} from '@vue/test-utils';
import GoogleAdsAccountPopinNew from '@/components/google-ads-account/google-ads-account-popin-new.vue';
import {
googleAccountConnected,
} from '@/../.storybook/mock/google-account';
import {BFormCheckbox, BButton} from 'bootstrap-vue';

const VBTooltip = jest.fn();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*/

// Import this file first to init mock on window
import {createWrapper, shallowMount} from '@vue/test-utils';
import config from '@/../tests/init';

import {createWrapper, shallowMount} from '@vue/test-utils';
import LandingPageFooter from '@/components/landing-page/landing-page-footer.vue';

describe('landing-page-footer.vue', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*/

// Import this file first to init mock on window
import {createWrapper, shallowMount} from '@vue/test-utils';
import config from '@/../tests/init';

import {createWrapper, shallowMount} from '@vue/test-utils';
import LandingPageHeader from '@/components/landing-page/landing-page-header.vue';

describe('landing-page-header.vue', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
import Vuex from 'vuex';

// Import this file first to init mock on window
import {shallowMount} from '@vue/test-utils';
import {BAlert} from 'bootstrap-vue';
import fetchMock from 'jest-fetch-mock';
import config, {cloneStore} from '@/../tests/init';

import {shallowMount} from '@vue/test-utils';
import MerchantCenterAccountCard from '@/components/merchant-center-account/merchant-center-account-card.vue';
import BadgeListRequirements from '@/components/commons/badge-list-requirements.vue';
import {BAlert} from 'bootstrap-vue';
import fetchMock from 'jest-fetch-mock';
import actionsTypes from '../../store/modules/accounts/actions-types';
import {WebsiteClaimErrorReason} from '../../store/modules/accounts/state';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -454,10 +454,10 @@
</template>

<script>
import googleUrl from '@/assets/json/googleUrl.json';
import uniqBy from 'lodash.uniqby';
import {VueShowdown} from 'vue-showdown';
import {BAlert} from 'bootstrap-vue';
import googleUrl from '@/assets/json/googleUrl.json';
import {
WebsiteClaimErrorReason,
} from '../../store/modules/accounts/state';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ export default {
result.statuses.forEach((status) => {
this.items.push({
id: result.id,
issues: result.issues,
issues: result.issues || [],
name: result.name,
statuses: status,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,12 @@
</template>

<script>
import googleUrl from '@/assets/json/googleUrl.json';
import {
BIconstack,
BIconCheck,
BIconCircleFill,
} from 'bootstrap-vue';
import googleUrl from '@/assets/json/googleUrl.json';
export default {
name: 'ProductFeedCardReportMappedCategoriesCard',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*/

// Import this file first to init mock on window
import {shallowMount} from '@vue/test-utils';
import config from '@/../tests/init';

import {shallowMount} from '@vue/test-utils';
import ProductFeedCardReportProductsSyncCard from '@/components/product-feed/product-feed-card-report-products-sync-card.vue';

describe('product-feed-card-report-products-sync-card.vue / Product status', () => {
Expand Down
6 changes: 3 additions & 3 deletions _dev/src/components/product-feed/product-feed-card.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
import Vuex from 'vuex';

// Import this file first to init mock on window
import {shallowMount, mount} from '@vue/test-utils';
import BootstrapVue, {BAlert} from 'bootstrap-vue';
import VueShowdown from 'vue-showdown';
import config, {localVue, cloneStore, filters} from '@/../tests/init';
import BadgeListRequirements from '@/components/commons/badge-list-requirements.vue';
import {shallowMount, mount} from '@vue/test-utils';
import ProductFeedCard from '@/components/product-feed/product-feed-card.vue';
import ProductFeedCardReportCard from '@/components/product-feed/product-feed-card-report-card.vue';
import Stepper from '@/components/commons/stepper.vue';
import BootstrapVue, {BAlert} from 'bootstrap-vue';
import VueShowdown from 'vue-showdown';
import {
productFeed,
productFeedIsReadyForExport,
Expand Down
2 changes: 1 addition & 1 deletion _dev/src/components/product-feed/product-feed-card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,8 @@
</template>

<script>
import googleUrl from '@/assets/json/googleUrl.json';
import {VueShowdown} from 'vue-showdown';
import googleUrl from '@/assets/json/googleUrl.json';
import Stepper from '../commons/stepper';
import ProductFeedCardReportCard from './product-feed-card-report-card';
import countriesSelectionOptions from '../../assets/json/countries.json';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import Vuex from 'vuex';

// Import this file first to init mock on window
import {cloneStore} from '@/../tests/init';
import {mount} from '@vue/test-utils';
import ProductFeedSettingsAttributeMapping from '@/components/product-feed/product-feed-settings-attribute-mapping.vue';
import {BFormCheckbox} from 'bootstrap-vue';
import {cloneStore} from '@/../tests/init';
import ProductFeedSettingsAttributeMapping from '@/components/product-feed/product-feed-settings-attribute-mapping.vue';

import {
AttributeMapping,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
import Vuex from 'vuex';

// Import this file first to init mock on window
import config, {localVue, cloneStore} from '@/../tests/init';
import {shallowMount, mount} from '@vue/test-utils';
import BootstrapVue, {BFormRadio} from 'bootstrap-vue';
import config, {localVue, cloneStore} from '@/../tests/init';
import ProductFeedSettingsShipping from '@/components/product-feed/product-feed-settings-shipping.vue';
import Stepper from '@/components/commons/stepper.vue';
import PsSelect from '@/components/commons/ps-select.vue';
import BootstrapVue, {BFormRadio} from 'bootstrap-vue';
import {
ShippingSettings,
} from '@/../stories/product-feed-settings.stories';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@
</template>

<script>
import googleUrl from '@/assets/json/googleUrl.json';
import {VueShowdown} from 'vue-showdown';
import googleUrl from '@/assets/json/googleUrl.json';
import PsSelect from '../commons/ps-select';
import countriesSelectionOptions from '../../assets/json/countries.json';
import ProductFeedSettingsFooter from './product-feed-settings-footer';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import Vuex from 'vuex';

// Import this file first to init mock on window
import config, {localVue, cloneStore, filters} from '@/../tests/init';
import {mount, shallowMount} from '@vue/test-utils';
import config, {localVue, cloneStore, filters} from '@/../tests/init';
import ProductFeedSettingsSummary from '@/components/product-feed/product-feed-settings-summary.vue';
import ProductFeedCardNextSyncCard from '@/components/product-feed/product-feed-card-next-sync-card.vue';
import Stepper from '@/components/commons/stepper.vue';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,10 @@
</template>

<script>
import googleUrl from '@/assets/json/googleUrl.json';
import {BTableSimple} from 'bootstrap-vue';
import {VueShowdown} from 'vue-showdown';
import googleUrl from '@/assets/json/googleUrl.json';
import countriesSelectionOptions from '../../assets/json/countries.json';
import ProductFeedSettingsFooter from './product-feed-settings-footer';
import ProductFeedCardReportCard from './product-feed-card-report-card';
Expand Down
2 changes: 1 addition & 1 deletion _dev/src/store/modules/accounts/actions.spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import fetchMock from 'jest-fetch-mock';
import actions from '@/store/modules/accounts/actions';
import ActionsTypes from '@/store/modules/accounts/actions-types';
import MutationsTypes from '@/store/modules/accounts/mutations-types';
import {WebsiteClaimErrorReason} from '@/store/modules/accounts/state';
import fetchMock from 'jest-fetch-mock';

import {} from '@/../tests/init';

Expand Down
2 changes: 1 addition & 1 deletion _dev/src/views/landing-page.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*/

// Import this file first to init mock on window
import {shallowMount} from '@vue/test-utils';
import config from '@/../tests/init';

import {shallowMount} from '@vue/test-utils';
import LandingPage from '@/views/landing-page.vue';

describe('landing-page.vue', () => {
Expand Down
2 changes: 1 addition & 1 deletion _dev/src/views/tunnel-product-feed.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
*/

// Import this file first to init mock on window
import config, {cloneStore} from '@/../tests/init';

// shallowMount creates the components without its children. Mount creates them all

import {shallowMount} from '@vue/test-utils';
import Vuex from 'vuex';
import config, {cloneStore} from '@/../tests/init';
import TunnelProductFeed from '@/views/tunnel-product-feed.vue';

describe('tunnel-product-feed.vue', () => {
Expand Down

0 comments on commit 2e44bbb

Please sign in to comment.