diff --git a/src/page-objects/AdministrationPages.ts b/src/page-objects/AdministrationPages.ts index 7249f12..6d8ef4c 100644 --- a/src/page-objects/AdministrationPages.ts +++ b/src/page-objects/AdministrationPages.ts @@ -29,7 +29,7 @@ import { ManufacturerListing } from './administration/ManufacturerListing'; import { ManufacturerDetail } from './administration/ManufacturerDetail'; import { ProductListing } from './administration/ProductListing'; import { ProductBulkEdit } from './administration/ProductBulkEdit'; - +import { CustomerBulkEdit } from './administration/CustomerBulkEdit'; export interface AdministrationPageTypes { AdminProductDetail: ProductDetail; @@ -60,6 +60,7 @@ export interface AdministrationPageTypes { AdminManufacturerDetail: ManufacturerDetail, AdminProductListing: ProductListing; AdminProductBulkEdit: ProductBulkEdit; + AdminCustomerBulkEdit: CustomerBulkEdit; } export const AdminPageObjects = { @@ -91,6 +92,7 @@ export const AdminPageObjects = { ManufacturerListing, ProductListing, ProductBulkEdit, + CustomerBulkEdit, } export const test = base.extend({ @@ -170,6 +172,7 @@ export const test = base.extend({ AdminRuleDetail: async ({ AdminPage }, use) => { await use(new RuleDetail(AdminPage)); }, + AdminRuleCreate: async ({ AdminPage }, use) => { await use(new RuleCreate(AdminPage)); }, @@ -205,4 +208,8 @@ export const test = base.extend({ AdminProductBulkEdit: async ({ AdminPage }, use) => { await use(new ProductBulkEdit(AdminPage)); }, + + AdminCustomerBulkEdit: async ({ AdminPage }, use) => { + await use(new CustomerBulkEdit(AdminPage)); + }, }); \ No newline at end of file diff --git a/src/page-objects/administration/CustomerBulkEdit.ts b/src/page-objects/administration/CustomerBulkEdit.ts new file mode 100644 index 0000000..3ff0cd0 --- /dev/null +++ b/src/page-objects/administration/CustomerBulkEdit.ts @@ -0,0 +1,90 @@ +import { PageObject } from '../../types/PageObject'; +import { Locator, Page } from '@playwright/test'; + +export class CustomerBulkEdit implements PageObject{ + + //General + public readonly applyChangesButton: Locator; + public readonly filtersResultPopoverItemList: Locator; + + //Account + public readonly changeCustomerGroupCheckbox: Locator; + public readonly customerGroupInput: Locator; + public readonly changeAccountStatusCheckbox: Locator; + public readonly accountStatusInput: Locator; + public readonly changeLanguageCheckbox: Locator; + public readonly changeLanguageInput: Locator; + public readonly replyToCustomerGroupRequest: Locator; + public readonly replyToCustomerGroupRequestInput: Locator; + + //Tags + public readonly changeTagsCheckbox: Locator; + public readonly changeTypeSelect: Locator; + public readonly enterTagsSelect: Locator; + + //Custom fields + public readonly customFieldCheckbox: Locator; + public readonly customFieldInput: Locator; + public readonly customFieldArrowRightButton: Locator; + + /** + * Confirmation modal + */ + public readonly confirmModal: Locator; + public readonly confirmModalApplyChangesButton: Locator; + public readonly confirmModalSuccessHeader: Locator; + public readonly confirmModalSuccessCloseButton: Locator; + + constructor(readonly page: Page){ + //General + this.applyChangesButton = page.getByRole('button', { name: 'Apply changes' }); + this.filtersResultPopoverItemList = page.locator('.sw-select-result-list__content').getByRole('listitem'); + //Account + this.changeCustomerGroupCheckbox = page.getByRole('checkbox', { name: 'Change: Customer group' }); + this.customerGroupInput = page.locator('.sw-select').filter({ hasText: 'Select customer group...' }).locator('.sw-select__selection'); + const accountStatus = page.locator('.sw-bulk-edit-change-field-active'); + this.changeAccountStatusCheckbox = accountStatus.getByRole('checkbox', { name: 'Change: Account status' }); + this.accountStatusInput = accountStatus.locator('.sw-field--switch__input'); + this.changeLanguageCheckbox = page.getByRole('checkbox', { name: 'Change: Language' }); + this.changeLanguageInput = page.locator('.sw-select').filter({ hasText: 'Select language...' }).locator('.sw-select__selection'); + this.replyToCustomerGroupRequest = page.getByRole('checkbox', { name: 'Reply to: Customer group request' }); + this.replyToCustomerGroupRequestInput = page.locator('.sw-select').filter({ hasText: 'Select customer group request reply...' }).locator('.sw-select__selection'); + //Tags + const changeTag = page.locator('.sw-bulk-edit-change-field-tags'); + this.changeTagsCheckbox = changeTag.getByRole('checkbox', { name: 'Change: Tags' }); + this.changeTypeSelect = changeTag.locator('.sw-bulk-edit-change-type__selection'); + this.enterTagsSelect = changeTag.locator('.sw-entity-multi-select'); + + //Custom fields + const customFields = page.locator('.sw-bulk-edit__custom-fields'); + this.customFieldArrowRightButton = customFields.locator('.sw-tabs__arrow--right'); + this.customFieldCheckbox = customFields.getByRole('checkbox'); + this.customFieldInput = customFields.getByRole('textbox'); + + //Confirmation modal + this.confirmModal = page.locator('.sw-bulk-edit-save-modal'); + this.confirmModalApplyChangesButton = this.confirmModal.getByRole('button', {name: 'Apply changes'}); + this.confirmModalSuccessHeader = this.confirmModal.getByRole('heading', {name: 'Bulk edit - Success'}); + const footer = this.confirmModal.locator('.sw-modal__footer'); + this.confirmModalSuccessCloseButton = footer.getByRole('button', {name: 'Close'}); + } + + async getPageHeadline(customerCount: number): Promise { + return this.page.getByRole('heading', { name:`Bulk edit: ${customerCount} customer` }) + } + + async getCustomFieldInputByName(customFieldName: string): Promise { + return this.page.getByRole('textbox', { name: customFieldName }); + } + + async getCustomFieldLinkByName(customFieldSetName: string): Promise { + return this.page.locator('a').filter({ + hasText: `${customFieldSetName}`, + }); + } + + url(): string { + return '#/sw/bulk/edit/customer'; + } + +} \ No newline at end of file diff --git a/src/page-objects/administration/CustomerDetail.ts b/src/page-objects/administration/CustomerDetail.ts index 477f57f..e3fd7bb 100644 --- a/src/page-objects/administration/CustomerDetail.ts +++ b/src/page-objects/administration/CustomerDetail.ts @@ -11,6 +11,8 @@ export class CustomerDetail implements PageObject { public readonly customerGroupRequestMessage: Locator; public readonly customerGroupAcceptButton: Locator; public readonly customerGroupDeclineButton: Locator; + public readonly tagList: Locator; + public readonly tagItems: Locator; constructor(public readonly page: Page) { this.editButton = page.getByRole('button', { name: 'Edit' }); @@ -22,6 +24,8 @@ export class CustomerDetail implements PageObject { this.customerGroupRequestMessage = page.locator('.sw-alert__message'); this.customerGroupAcceptButton = page.getByRole('button', { name: 'Accept' }); this.customerGroupDeclineButton = page.getByRole('button', { name: 'Decline' }); + this.tagList = page.locator('.sw-customer-card__tag-select').locator('.sw-select-selection-list'); + this.tagItems = this.tagList.locator('.sw-select-selection-list__item'); } async getCustomFieldSetCardContentByName(customFieldSetName: string): Promise> { @@ -41,6 +45,27 @@ export class CustomerDetail implements PageObject { return this.customerGroupRequestMessage.getByText(`Access to customer group "${customerGroup}" requested.`); } + async getCustomerGroup() : Promise { + const dlElement = this.page.locator('dl').filter({ + has: this.page.locator('dt', { hasText: 'Customer group' }), + }); + return dlElement.locator('dd'); + } + + async getAccountStatus() : Promise { + const dlElement = this.page.locator('dl').filter({ + has: this.page.locator('dt', { hasText: 'Account status' }), + }); + return dlElement.locator('dd'); + } + + async getLanguage() : Promise { + const dlElement = this.page.locator('dl').filter({ + has: this.page.locator('dt', { hasText: 'Language' }), + }); + return dlElement.locator('dd'); + } + url(customerId: string) { return `#/sw/customer/detail/${customerId}/base`; } diff --git a/src/page-objects/administration/CustomerListing.ts b/src/page-objects/administration/CustomerListing.ts index 21255c9..4dbc00a 100644 --- a/src/page-objects/administration/CustomerListing.ts +++ b/src/page-objects/administration/CustomerListing.ts @@ -4,10 +4,27 @@ import type { PageObject } from '../../types/PageObject'; export class CustomerListing implements PageObject { public readonly headline: Locator; public readonly addCustomerButton: Locator; + public readonly bulkEditButton: Locator; + public readonly deleteButton: Locator + + //Customer Bulk Edit Modal + public readonly bulkEditModal: Locator; + public readonly startBulkEditButton: Locator; + public readonly cancelButton: Locator; + public readonly modalHeaderCheckbox: Locator; constructor(public readonly page: Page) { this.headline = page.getByRole('heading', { name: 'Customers' }); this.addCustomerButton = page.locator('.sw-customer-list__button-create'); + this.bulkEditButton = page.getByRole('button', { name: 'Bulk edit' }); + this.deleteButton = page.getByRole('button', { name: 'Delete' }); + + //Customer Bulk Edit Modal + this.bulkEditModal = page.locator('.sw-customer-bulk-edit-modal').getByRole('dialog'); + this.startBulkEditButton = this.bulkEditModal.getByRole('button', { name: 'Start bulk edit' }); + this.cancelButton = this.bulkEditModal.getByRole('button', { name: 'Cancel' }); + const tableHeader = this.bulkEditModal.locator('.sw-data-grid__header'); + this.modalHeaderCheckbox = tableHeader.getByRole('checkbox'); } async getCustomerByEmail(customerEmail: string): Promise> { @@ -20,8 +37,37 @@ export class CustomerListing implements PageObject { const customerNumber = customer.locator('.sw-data-grid__cell--customerNumber') const customerGroup = customer.locator('.sw-data-grid__cell--group'); const customerEmailAddress = customer.locator('.sw-data-grid__cell--email'); + const customerCheckbox = customer.getByRole('checkbox'); + + return { + customerName: customerName, + customerStreet: customerStreet, + customerPostalCode: customerPostalCode, + customerCity: customerCity, + customerNumber: customerNumber, + customerGroup: customerGroup, + customerEmailAddress: customerEmailAddress, + customerCheckbox: customerCheckbox, + } + } + + async getCustomerBulkEditModalTitle(customerCount: number): Promise { + return this.bulkEditModal.getByRole('heading', { name: `Bulk edit - ${customerCount} items selected` }); + } + + async getBulkEditModalLineItemByCustomerEmail(customerEmail: string): Promise> { + const lineItem = this.bulkEditModal.locator('.sw-data-grid__row').filter({ hasText: customerEmail }); + const customerCheckbox = lineItem.getByRole('checkbox'); + const customerName = lineItem.locator('.sw-data-grid__cell--firstName').getByRole('link'); + const customerStreet = lineItem.locator('.sw-data-grid__cell--defaultBillingAddress-street'); + const customerPostalCode = lineItem.locator('.sw-data-grid__cell--defaultBillingAddress-zipcode'); + const customerCity = lineItem.locator('.sw-data-grid__cell--defaultBillingAddress-city'); + const customerNumber = lineItem.locator('.sw-data-grid__cell--customerNumber') + const customerGroup = lineItem.locator('.sw-data-grid__cell--group'); + const customerEmailAddress = lineItem.locator('.sw-data-grid__cell--email'); return { + customerCheckbox: customerCheckbox, customerName: customerName, customerStreet: customerStreet, customerPostalCode: customerPostalCode, diff --git a/src/services/TestDataService.ts b/src/services/TestDataService.ts index 4e316ef..4d4638e 100644 --- a/src/services/TestDataService.ts +++ b/src/services/TestDataService.ts @@ -1,5 +1,5 @@ import { createRandomImage } from './ImageHelper'; -import { getPromotionWithDiscount } from './ShopwareDataHelpers'; +import { getLanguageData, getPromotionWithDiscount } from './ShopwareDataHelpers'; import type { AdminApiContext } from './AdminApiContext'; import type { IdProvider } from './IdProvider'; import type { @@ -29,6 +29,9 @@ import type { CustomerGroup, SystemConfig, SalesChannelAnalytics, + Language, + CustomFieldSet, + CustomField, } from '../types/ShopwareTypes'; import { expect } from '@playwright/test'; @@ -97,7 +100,7 @@ export class TestDataService { * * @private */ - private highPriorityEntities = ['order', 'product', 'landing_page', 'sales_channel_currency', 'sales_channel_country']; + private highPriorityEntities = ['order', 'product', 'landing_page', 'sales_channel_currency', 'sales_channel_country', 'customer']; /** * A registry of all created records. @@ -919,6 +922,52 @@ export class TestDataService { return salesChannelAnalytics; } + /** + * Creates a custom field + * + * @param customFieldSetId - The uuid of the custom field set. + * @param overrides - Specific data overrides that will be applied to the custom field data struct. + */ + async createCustomField( + customFieldSetId: string, + overrides: Partial = {} + ): Promise { + const customFieldStruct = this.getBasicCustomFieldStruct(overrides); + + const response = await this.AdminApiClient.post(`custom-field-set/${customFieldSetId}/custom-fields?_response=detail`, { + data: customFieldStruct, + }); + expect(response.ok()).toBeTruthy(); + + const { data: customField } = (await response.json()) as { data: CustomField }; + + this.addCreatedRecord('custom_field', customField.id); + + return customField; + } + + /** + * Creates a custom field set + * + * @param overrides - Specific data overrides that will be applied to the custom field set data struct. + */ + async createCustomFieldSet( + overrides: Partial = {} + ): Promise { + const customFieldSetStruct = this.getBasicCustomFieldSetStruct(overrides); + + const response = await this.AdminApiClient.post('custom-field-set?_response=detail', { + data: customFieldSetStruct, + }); + expect(response.ok()).toBeTruthy(); + + const { data: customFieldSet } = (await response.json()) as { data: CustomFieldSet }; + + this.addCreatedRecord('custom_field_set', customFieldSet.id); + + return customFieldSet; + } + /** * Assigns a media resource as the download of a digital product. * @@ -1185,6 +1234,36 @@ export class TestDataService { return salesChannel; } + /** + * Assigns a language to a sales channel. + * + * @param salesChannelId - The uuid of the sales channel. + * @param languageId - The uuid of the language. + */ + async assignSalesChannelLanguage(salesChannelId: string, languageId: string) { + const syncSalesChannelResponse = await this.AdminApiClient.post('./_action/sync', { + data: { + 'write-sales-channel-language': { + entity: 'sales_channel_language', + action: 'upsert', + payload: [ + { + salesChannelId: salesChannelId, + languageId: languageId, + }, + ], + }, + }, + }); + expect(syncSalesChannelResponse.ok()).toBeTruthy(); + + const { data: salesChannel } = await syncSalesChannelResponse.json(); + + this.addCreatedRecord('sales_channel_language', {salesChannelId: salesChannelId, languageId: languageId}) + + return salesChannel; + } + /** * Assigns a media resource to a payment method as a logo. * @@ -1225,6 +1304,14 @@ export class TestDataService { return shippingMethodMedia; } + /** + * Retrieves a language based on its code. + * @param languageCode + */ + async getLanguageData(languageCode: string): Promise { + return await getLanguageData(languageCode, this.AdminApiClient); + } + /** * Retrieves a currency based on its ISO code. * @@ -1466,6 +1553,46 @@ export class TestDataService { return result; } + /** + * Retrieves a customer group by its id. + * + * @param customerGroupId - The id of the property group. + */ + async getCustomerGroupById(customerGroupId: string): Promise { + const response = await this.AdminApiClient.get(`customer-group/${customerGroupId}`); + expect(response.ok()).toBeTruthy(); + + const { data: customerGroup } = (await response.json()) as { data: CustomerGroup }; + + return customerGroup; + } + + /** + * Retrieves list of customer groups + */ + async getCustomerGroups(): Promise { + const response = await this.AdminApiClient.get('customer-group'); + expect(response.ok()).toBeTruthy(); + + const { data: customerGroups } = (await response.json()) as { data: CustomerGroup[] }; + + return customerGroups; + } + + /** + * Retrieves a language by its id. + * + * @param languageId - The id of the property group. + */ + async getLanguageById(languageId: string): Promise { + const response = await this.AdminApiClient.get(`language/${languageId}`); + expect(response.ok()).toBeTruthy(); + + const { data: language } = (await response.json()) as { data: Language }; + + return language; + } + /** * Adds an entity reference to the registry of created records. * All entities added to the registry will be deleted by the cleanup call. @@ -2350,4 +2477,54 @@ export class TestDataService { await this.AdminApiClient.delete('_action/cache'); } + getBasicCustomFieldSetStruct(overrides: Partial = {}): Partial { + const customFieldSetUuid = this.IdProvider.getIdPair().uuid; + const customFieldSetName = `${this.namePrefix}CustomFieldSet-${customFieldSetUuid}${this.nameSuffix}`; + + const basicCustomFieldSet = { + id: customFieldSetUuid, + name: customFieldSetName, + config: { + label: { + 'en-GB': null, + }, + }, + position: 1, + relations: [ + { + id: this.IdProvider.getIdPair().uuid, + entityName: 'customer', + }, + ], + }; + return Object.assign({}, basicCustomFieldSet, overrides); + } + + getBasicCustomFieldStruct(overrides: Partial = {}): Partial { + const customFieldUuid = this.IdProvider.getIdPair().uuid; + const customFieldName = `${this.namePrefix}CustomField-${customFieldUuid}${this.nameSuffix}`; + + const basicCustomField = { + id: customFieldUuid, + name: customFieldName, + type: 'text', + config: { + componentName: 'sw-field', + type: 'text', + customFieldType: 'text', + customFieldPosition: 1, + label: { + 'en-GB': null, + }, + placeholder: { + 'en-GB': null, + }, + helpText: { + 'en-GB': null, + }, + }, + }; + return Object.assign({}, basicCustomField, overrides); + } + } \ No newline at end of file diff --git a/src/tasks/shop-admin-tasks.ts b/src/tasks/shop-admin-tasks.ts index 964ec57..442d96a 100644 --- a/src/tasks/shop-admin-tasks.ts +++ b/src/tasks/shop-admin-tasks.ts @@ -5,6 +5,7 @@ import { ExpectNotification } from './shop-admin/ExpectNotification'; import { CreateLinkTypeCategory } from './shop-admin/Category/CreateLinkTypeCategory'; import { SetSystemConfigValues } from './shop-admin/Settings/SetSystemConfigValues'; import { BulkEditProducts } from './shop-admin/Product/BulkEditProducts'; +import { BulkEditCustomers } from './shop-admin/Customers/BulkEditCustomers'; export const test = mergeTests( SaveProduct, @@ -12,4 +13,5 @@ export const test = mergeTests( CreateLinkTypeCategory, SetSystemConfigValues, BulkEditProducts, + BulkEditCustomers, ); \ No newline at end of file diff --git a/src/tasks/shop-admin/Customers/BulkEditCustomers.ts b/src/tasks/shop-admin/Customers/BulkEditCustomers.ts new file mode 100644 index 0000000..d5d096a --- /dev/null +++ b/src/tasks/shop-admin/Customers/BulkEditCustomers.ts @@ -0,0 +1,76 @@ +import { test as base } from '@playwright/test'; +import { Task } from '../../../types/Task'; +import { FixtureTypes } from '../../../types/FixtureTypes'; + +export const BulkEditCustomers = base.extend<{ BulkEditCustomers: Task }, FixtureTypes>({ + BulkEditCustomers: async ({ ShopAdmin, AdminCustomerListing, AdminCustomerBulkEdit }, use ) => { + const task = (customers, accountData?, tagData?, customFieldData?) => { + return async function BulkEditCustomers() { + const customerCount = customers.length; + for (const customer of customers) { + const customerLineItem = await AdminCustomerListing.getCustomerByEmail(customer.email); + await customerLineItem.customerCheckbox.click(); + } + await AdminCustomerListing.bulkEditButton.click(); + // Verify bulk edit modal + await ShopAdmin.expects(AdminCustomerListing.bulkEditModal).toBeVisible(); + const modalTitle = await AdminCustomerListing.getCustomerBulkEditModalTitle(customerCount); + await ShopAdmin.expects(modalTitle).toBeVisible(); + await ShopAdmin.expects(AdminCustomerListing.modalHeaderCheckbox).toBeChecked(); + + // Start bulk edit + await AdminCustomerListing.startBulkEditButton.click(); + await AdminCustomerListing.bulkEditModal.waitFor({ state: 'hidden' }); + const bulkEditPageHeadline = await AdminCustomerBulkEdit.getPageHeadline(customerCount); + await ShopAdmin.expects(bulkEditPageHeadline).toBeVisible(); + if (accountData) { + if (accountData.customerGroup) { + await AdminCustomerBulkEdit.changeCustomerGroupCheckbox.click(); + await AdminCustomerBulkEdit.customerGroupInput.click(); + await AdminCustomerBulkEdit.filtersResultPopoverItemList.getByText(accountData.customerGroup).click(); + } + if (accountData.accountStatus !== undefined) { + await AdminCustomerBulkEdit.changeAccountStatusCheckbox.click(); + if (accountData.accountStatus) { + await AdminCustomerBulkEdit.accountStatusInput.click(); + } + } + if (accountData.language) { + await AdminCustomerBulkEdit.changeLanguageCheckbox.click(); + await AdminCustomerBulkEdit.changeLanguageInput.click(); + await AdminCustomerBulkEdit.page.getByText(accountData.language).click(); + } + if (accountData.replyToCustomerGroupRequest) { + await AdminCustomerBulkEdit.replyToCustomerGroupRequest.click(); + await AdminCustomerBulkEdit.replyToCustomerGroupRequestInput.click(); + await AdminCustomerBulkEdit.filtersResultPopoverItemList.getByText(accountData.replyToCustomerGroupRequest).click(); + } + } + if (tagData) { + await AdminCustomerBulkEdit.changeTagsCheckbox.click(); + await AdminCustomerBulkEdit.changeTypeSelect.click(); + await AdminCustomerBulkEdit.page.getByText(tagData.changeType).click(); + for (const tag of tagData.tags) { + await AdminCustomerBulkEdit.enterTagsSelect.click(); + await AdminCustomerBulkEdit.page.getByText(tag).click(); + } + } + if (customFieldData) { + const customFieldSet = await AdminCustomerBulkEdit.getCustomFieldLinkByName(customFieldData.customFieldSetName); + while (!await customFieldSet.isVisible()) { + await AdminCustomerBulkEdit.customFieldArrowRightButton.click(); + } + await customFieldSet.click(); + await AdminCustomerBulkEdit.customFieldCheckbox.click(); + await AdminCustomerBulkEdit.customFieldInput.fill(customFieldData.customFieldValue); + } + await AdminCustomerBulkEdit.applyChangesButton.click(); + await AdminCustomerBulkEdit.confirmModalApplyChangesButton.click(); + await ShopAdmin.expects(AdminCustomerBulkEdit.confirmModalSuccessHeader).toBeVisible(); + await AdminCustomerBulkEdit.confirmModalSuccessCloseButton.click(); + } + } + + await use(task); + }, +}); diff --git a/src/types/ShopwareTypes.ts b/src/types/ShopwareTypes.ts index b3c18fa..d8a41f2 100644 --- a/src/types/ShopwareTypes.ts +++ b/src/types/ShopwareTypes.ts @@ -58,7 +58,7 @@ export type Product = Omit[], - tags?: Record[], + tags?: Record[], visibilities?: Record[], } @@ -209,4 +209,16 @@ export interface RegistrationData { company: string; department: string; vatRegNo: string; -} \ No newline at end of file +} + +export type Language = components['schemas']['Language'] & { + id: string, +}; + +export type CustomFieldSet = components['schemas']['CustomFieldSet'] & { + id: string, +}; + +export type CustomField = components['schemas']['CustomField'] & { + id: string, +}; \ No newline at end of file diff --git a/tests/TestDataService/OrderCreation.spec.ts b/tests/TestDataService/OrderCreation.spec.ts index b9e8604..f9e7b4c 100644 --- a/tests/TestDataService/OrderCreation.spec.ts +++ b/tests/TestDataService/OrderCreation.spec.ts @@ -78,7 +78,6 @@ test('Order creation with TestDataService', async ({ expect(cleanUpResponse.ok()).toBeTruthy(); const cleanUp = await cleanUpResponse.json(); - expect(cleanUp['deleted']['customer']).toBeDefined(); expect(cleanUp['deleted']['promotion']).toBeDefined(); expect(cleanUp['deleted']['promotion_discount']).toBeDefined(); }); diff --git a/tests/TestDataService/TestDataService.spec.ts b/tests/TestDataService/TestDataService.spec.ts index 750d07a..6fbace5 100644 --- a/tests/TestDataService/TestDataService.spec.ts +++ b/tests/TestDataService/TestDataService.spec.ts @@ -159,7 +159,6 @@ test('Data Service', async ({ const cleanUp = await cleanUpResponse.json(); expect(cleanUp['notFound'].length).toBe(0); expect(cleanUp['deleted']['media']).toBeDefined(); - expect(cleanUp['deleted']['customer']).toBeDefined(); expect(cleanUp['deleted']['payment_method']).toBeDefined(); expect(cleanUp['deleted']['shipping_method']).toBeDefined(); expect(cleanUp['deleted']['rule']).toBeDefined();