@shopware-ag/acceptance-test-suite 11.19.2 → 11.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +53 -4
- package/dist/index.d.ts +53 -4
- package/dist/index.mjs +160 -21
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -419,6 +419,19 @@ interface RuleAssignmentEntity {
|
|
|
419
419
|
};
|
|
420
420
|
ruleType: RuleType;
|
|
421
421
|
}
|
|
422
|
+
interface FlowConfig {
|
|
423
|
+
name: string;
|
|
424
|
+
description: string;
|
|
425
|
+
priority: string;
|
|
426
|
+
active: boolean;
|
|
427
|
+
triggerSearchTerm: string;
|
|
428
|
+
triggerLabel: string;
|
|
429
|
+
condition: string;
|
|
430
|
+
trueAction: string;
|
|
431
|
+
trueActionIdentifier: string;
|
|
432
|
+
falseAction: string;
|
|
433
|
+
falseActionIdentifier: string;
|
|
434
|
+
}
|
|
422
435
|
interface CategoryData {
|
|
423
436
|
name: string;
|
|
424
437
|
categoryType: 'Link' | 'Page / List' | 'Structuring element / Entry point';
|
|
@@ -2083,16 +2096,47 @@ declare class FirstRunWizard implements PageObject {
|
|
|
2083
2096
|
|
|
2084
2097
|
declare class FlowBuilderCreate implements PageObject {
|
|
2085
2098
|
readonly page: Page;
|
|
2099
|
+
readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
|
|
2086
2100
|
readonly saveButton: Locator;
|
|
2087
2101
|
readonly header: Locator;
|
|
2088
|
-
readonly
|
|
2102
|
+
readonly smartBarHeader: Locator;
|
|
2103
|
+
readonly generalTab: Locator;
|
|
2089
2104
|
readonly flowTab: Locator;
|
|
2105
|
+
readonly nameField: Locator;
|
|
2106
|
+
readonly descriptionField: Locator;
|
|
2107
|
+
readonly priorityField: Locator;
|
|
2108
|
+
readonly activeSwitch: Locator;
|
|
2090
2109
|
readonly triggerSelectField: Locator;
|
|
2110
|
+
readonly modalAddButton: Locator;
|
|
2111
|
+
readonly sequenceSelectorConditionButton: Locator;
|
|
2112
|
+
readonly conditionSelectField: Locator;
|
|
2113
|
+
readonly sequenceSelectorActionButton: Locator;
|
|
2114
|
+
readonly actionSelectField: Locator;
|
|
2115
|
+
readonly selectFieldResultList: Locator;
|
|
2116
|
+
readonly trueBlock: Locator;
|
|
2117
|
+
readonly trueBlockAddConditionButton: Locator;
|
|
2118
|
+
readonly trueBlockAddActionButton: Locator;
|
|
2119
|
+
readonly trueBlockActionSelectField: Locator;
|
|
2120
|
+
readonly trueBlockActionDescription: Locator;
|
|
2121
|
+
readonly mailSendModal: Locator;
|
|
2122
|
+
readonly mailSendModalTemplateSelectField: Locator;
|
|
2123
|
+
readonly falseBlock: Locator;
|
|
2124
|
+
readonly falseBlockAddConditionButton: Locator;
|
|
2125
|
+
readonly falseBlockAddActionButton: Locator;
|
|
2126
|
+
readonly falseBlockActionSelectField: Locator;
|
|
2127
|
+
readonly falseBlockActionDescription: Locator;
|
|
2128
|
+
readonly tagModal: Locator;
|
|
2129
|
+
readonly tagModalTagsSelectField: Locator;
|
|
2130
|
+
readonly delayCard: Locator;
|
|
2131
|
+
readonly conditionRule: Locator;
|
|
2132
|
+
readonly sequenceSeparator: Locator;
|
|
2091
2133
|
readonly addActionField: Locator;
|
|
2092
|
-
readonly smartBarHeader: Locator;
|
|
2093
2134
|
readonly newFlowHeader: Locator;
|
|
2094
|
-
|
|
2135
|
+
readonly resultListItem: Locator;
|
|
2136
|
+
readonly resultList: Locator;
|
|
2137
|
+
constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
|
|
2095
2138
|
url(flowId?: string, tabName?: string): string;
|
|
2139
|
+
getSelectFieldListitem(selectField: Locator, listItem: string): Promise<Locator>;
|
|
2096
2140
|
}
|
|
2097
2141
|
|
|
2098
2142
|
declare class FlowBuilderListing implements PageObject {
|
|
@@ -2137,8 +2181,11 @@ declare class FlowBuilderDetail extends FlowBuilderCreate implements PageObject
|
|
|
2137
2181
|
readonly alertWarning: Locator;
|
|
2138
2182
|
readonly templateName: Locator;
|
|
2139
2183
|
readonly alertMessage: Locator;
|
|
2184
|
+
readonly successMessage: Locator;
|
|
2185
|
+
readonly actionContentTag: Locator;
|
|
2140
2186
|
constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
|
|
2141
2187
|
url(flowId: string, tabName?: string): string;
|
|
2188
|
+
getTooltipText(toolTipArea: Locator): Promise<string>;
|
|
2142
2189
|
}
|
|
2143
2190
|
|
|
2144
2191
|
declare class DataSharing implements PageObject {
|
|
@@ -2853,6 +2900,8 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
|
|
|
2853
2900
|
BulkEditCustomers: Task;
|
|
2854
2901
|
} & {
|
|
2855
2902
|
AssignEntitiesToRule: Task;
|
|
2903
|
+
} & {
|
|
2904
|
+
CreateFlow: Task;
|
|
2856
2905
|
} & {
|
|
2857
2906
|
LoginViaReviewsTab: Task;
|
|
2858
2907
|
} & {
|
|
@@ -2907,4 +2956,4 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
|
|
|
2907
2956
|
SelectProductFilterOption: Task;
|
|
2908
2957
|
}, _playwright_test.PlaywrightWorkerArgs & _playwright_test.PlaywrightWorkerOptions & FixtureTypes>;
|
|
2909
2958
|
|
|
2910
|
-
export { type AccountData, type Address, AdminPageObjects, type CalculatedTaxes, type Category$1 as Category, type CategoryCustomizableLinkData, type CategoryData, type CmsPage, type Country$1 as Country, type CreatedRecord, type Currency$2 as Currency, type CustomField, type CustomFieldData, type CustomFieldSet, type Customer, type CustomerAddress, type CustomerGroup, type DataServiceOptions, type DeliveryTime, type FixtureTypes, type Flow, type FlowTemplate, type Language$2 as Language, type Manufacturer, type Media, type Options, type Order, type OrderDelivery, type OrderLineItem, type OrderStatus, type PageObject, type PaymentMethod$1 as PaymentMethod, type Price, type Product, type ProductCrossSelling, type ProductPrice, type ProductReview, type Promotion, type PromotionDiscount, type PropertyGroup, type PropertyGroupOption, type RegistrationData, type Rule, type RuleAssignmentEntity, RuleType, type SalesChannel, type SalesChannelAnalytics, type SalesChannelDomain, type SalesChannelRecord, type Salutation, type ShippingMethod$1 as ShippingMethod, type SimpleLineItem, type StateMachine, type StateMachineState, StorefrontPageObjects, type SyncApiOperation, type SystemConfig, type Tag, type TagData, type Task, type Tax$1 as Tax, type TaxRules, TestDataService, type VariantListingConfig, compareFlowTemplateWithFlow, createRandomImage, extractIdFromUrl, getCountryId, getCurrency, getDefaultShippingMethodId, getFlow, getFlowId, getFlowTemplate, getLanguageData, getMediaId, getOrderTransactionId, getPaymentMethodId, getPromotionWithDiscount, getSalutationId, getShippingMethodId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, hideElements, isSaaSInstance, isThemeCompiled, replaceElements, setOrderStatus, setViewport, test };
|
|
2959
|
+
export { type AccountData, type Address, AdminPageObjects, type CalculatedTaxes, type Category$1 as Category, type CategoryCustomizableLinkData, type CategoryData, type CmsPage, type Country$1 as Country, type CreatedRecord, type Currency$2 as Currency, type CustomField, type CustomFieldData, type CustomFieldSet, type Customer, type CustomerAddress, type CustomerGroup, type DataServiceOptions, type DeliveryTime, type FixtureTypes, type Flow, type FlowConfig, type FlowTemplate, type Language$2 as Language, type Manufacturer, type Media, type Options, type Order, type OrderDelivery, type OrderLineItem, type OrderStatus, type PageObject, type PaymentMethod$1 as PaymentMethod, type Price, type Product, type ProductCrossSelling, type ProductPrice, type ProductReview, type Promotion, type PromotionDiscount, type PropertyGroup, type PropertyGroupOption, type RegistrationData, type Rule, type RuleAssignmentEntity, RuleType, type SalesChannel, type SalesChannelAnalytics, type SalesChannelDomain, type SalesChannelRecord, type Salutation, type ShippingMethod$1 as ShippingMethod, type SimpleLineItem, type StateMachine, type StateMachineState, StorefrontPageObjects, type SyncApiOperation, type SystemConfig, type Tag, type TagData, type Task, type Tax$1 as Tax, type TaxRules, TestDataService, type VariantListingConfig, compareFlowTemplateWithFlow, createRandomImage, extractIdFromUrl, getCountryId, getCurrency, getDefaultShippingMethodId, getFlow, getFlowId, getFlowTemplate, getLanguageData, getMediaId, getOrderTransactionId, getPaymentMethodId, getPromotionWithDiscount, getSalutationId, getShippingMethodId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, hideElements, isSaaSInstance, isThemeCompiled, replaceElements, setOrderStatus, setViewport, test };
|
package/dist/index.d.ts
CHANGED
|
@@ -419,6 +419,19 @@ interface RuleAssignmentEntity {
|
|
|
419
419
|
};
|
|
420
420
|
ruleType: RuleType;
|
|
421
421
|
}
|
|
422
|
+
interface FlowConfig {
|
|
423
|
+
name: string;
|
|
424
|
+
description: string;
|
|
425
|
+
priority: string;
|
|
426
|
+
active: boolean;
|
|
427
|
+
triggerSearchTerm: string;
|
|
428
|
+
triggerLabel: string;
|
|
429
|
+
condition: string;
|
|
430
|
+
trueAction: string;
|
|
431
|
+
trueActionIdentifier: string;
|
|
432
|
+
falseAction: string;
|
|
433
|
+
falseActionIdentifier: string;
|
|
434
|
+
}
|
|
422
435
|
interface CategoryData {
|
|
423
436
|
name: string;
|
|
424
437
|
categoryType: 'Link' | 'Page / List' | 'Structuring element / Entry point';
|
|
@@ -2083,16 +2096,47 @@ declare class FirstRunWizard implements PageObject {
|
|
|
2083
2096
|
|
|
2084
2097
|
declare class FlowBuilderCreate implements PageObject {
|
|
2085
2098
|
readonly page: Page;
|
|
2099
|
+
readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
|
|
2086
2100
|
readonly saveButton: Locator;
|
|
2087
2101
|
readonly header: Locator;
|
|
2088
|
-
readonly
|
|
2102
|
+
readonly smartBarHeader: Locator;
|
|
2103
|
+
readonly generalTab: Locator;
|
|
2089
2104
|
readonly flowTab: Locator;
|
|
2105
|
+
readonly nameField: Locator;
|
|
2106
|
+
readonly descriptionField: Locator;
|
|
2107
|
+
readonly priorityField: Locator;
|
|
2108
|
+
readonly activeSwitch: Locator;
|
|
2090
2109
|
readonly triggerSelectField: Locator;
|
|
2110
|
+
readonly modalAddButton: Locator;
|
|
2111
|
+
readonly sequenceSelectorConditionButton: Locator;
|
|
2112
|
+
readonly conditionSelectField: Locator;
|
|
2113
|
+
readonly sequenceSelectorActionButton: Locator;
|
|
2114
|
+
readonly actionSelectField: Locator;
|
|
2115
|
+
readonly selectFieldResultList: Locator;
|
|
2116
|
+
readonly trueBlock: Locator;
|
|
2117
|
+
readonly trueBlockAddConditionButton: Locator;
|
|
2118
|
+
readonly trueBlockAddActionButton: Locator;
|
|
2119
|
+
readonly trueBlockActionSelectField: Locator;
|
|
2120
|
+
readonly trueBlockActionDescription: Locator;
|
|
2121
|
+
readonly mailSendModal: Locator;
|
|
2122
|
+
readonly mailSendModalTemplateSelectField: Locator;
|
|
2123
|
+
readonly falseBlock: Locator;
|
|
2124
|
+
readonly falseBlockAddConditionButton: Locator;
|
|
2125
|
+
readonly falseBlockAddActionButton: Locator;
|
|
2126
|
+
readonly falseBlockActionSelectField: Locator;
|
|
2127
|
+
readonly falseBlockActionDescription: Locator;
|
|
2128
|
+
readonly tagModal: Locator;
|
|
2129
|
+
readonly tagModalTagsSelectField: Locator;
|
|
2130
|
+
readonly delayCard: Locator;
|
|
2131
|
+
readonly conditionRule: Locator;
|
|
2132
|
+
readonly sequenceSeparator: Locator;
|
|
2091
2133
|
readonly addActionField: Locator;
|
|
2092
|
-
readonly smartBarHeader: Locator;
|
|
2093
2134
|
readonly newFlowHeader: Locator;
|
|
2094
|
-
|
|
2135
|
+
readonly resultListItem: Locator;
|
|
2136
|
+
readonly resultList: Locator;
|
|
2137
|
+
constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
|
|
2095
2138
|
url(flowId?: string, tabName?: string): string;
|
|
2139
|
+
getSelectFieldListitem(selectField: Locator, listItem: string): Promise<Locator>;
|
|
2096
2140
|
}
|
|
2097
2141
|
|
|
2098
2142
|
declare class FlowBuilderListing implements PageObject {
|
|
@@ -2137,8 +2181,11 @@ declare class FlowBuilderDetail extends FlowBuilderCreate implements PageObject
|
|
|
2137
2181
|
readonly alertWarning: Locator;
|
|
2138
2182
|
readonly templateName: Locator;
|
|
2139
2183
|
readonly alertMessage: Locator;
|
|
2184
|
+
readonly successMessage: Locator;
|
|
2185
|
+
readonly actionContentTag: Locator;
|
|
2140
2186
|
constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
|
|
2141
2187
|
url(flowId: string, tabName?: string): string;
|
|
2188
|
+
getTooltipText(toolTipArea: Locator): Promise<string>;
|
|
2142
2189
|
}
|
|
2143
2190
|
|
|
2144
2191
|
declare class DataSharing implements PageObject {
|
|
@@ -2853,6 +2900,8 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
|
|
|
2853
2900
|
BulkEditCustomers: Task;
|
|
2854
2901
|
} & {
|
|
2855
2902
|
AssignEntitiesToRule: Task;
|
|
2903
|
+
} & {
|
|
2904
|
+
CreateFlow: Task;
|
|
2856
2905
|
} & {
|
|
2857
2906
|
LoginViaReviewsTab: Task;
|
|
2858
2907
|
} & {
|
|
@@ -2907,4 +2956,4 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
|
|
|
2907
2956
|
SelectProductFilterOption: Task;
|
|
2908
2957
|
}, _playwright_test.PlaywrightWorkerArgs & _playwright_test.PlaywrightWorkerOptions & FixtureTypes>;
|
|
2909
2958
|
|
|
2910
|
-
export { type AccountData, type Address, AdminPageObjects, type CalculatedTaxes, type Category$1 as Category, type CategoryCustomizableLinkData, type CategoryData, type CmsPage, type Country$1 as Country, type CreatedRecord, type Currency$2 as Currency, type CustomField, type CustomFieldData, type CustomFieldSet, type Customer, type CustomerAddress, type CustomerGroup, type DataServiceOptions, type DeliveryTime, type FixtureTypes, type Flow, type FlowTemplate, type Language$2 as Language, type Manufacturer, type Media, type Options, type Order, type OrderDelivery, type OrderLineItem, type OrderStatus, type PageObject, type PaymentMethod$1 as PaymentMethod, type Price, type Product, type ProductCrossSelling, type ProductPrice, type ProductReview, type Promotion, type PromotionDiscount, type PropertyGroup, type PropertyGroupOption, type RegistrationData, type Rule, type RuleAssignmentEntity, RuleType, type SalesChannel, type SalesChannelAnalytics, type SalesChannelDomain, type SalesChannelRecord, type Salutation, type ShippingMethod$1 as ShippingMethod, type SimpleLineItem, type StateMachine, type StateMachineState, StorefrontPageObjects, type SyncApiOperation, type SystemConfig, type Tag, type TagData, type Task, type Tax$1 as Tax, type TaxRules, TestDataService, type VariantListingConfig, compareFlowTemplateWithFlow, createRandomImage, extractIdFromUrl, getCountryId, getCurrency, getDefaultShippingMethodId, getFlow, getFlowId, getFlowTemplate, getLanguageData, getMediaId, getOrderTransactionId, getPaymentMethodId, getPromotionWithDiscount, getSalutationId, getShippingMethodId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, hideElements, isSaaSInstance, isThemeCompiled, replaceElements, setOrderStatus, setViewport, test };
|
|
2959
|
+
export { type AccountData, type Address, AdminPageObjects, type CalculatedTaxes, type Category$1 as Category, type CategoryCustomizableLinkData, type CategoryData, type CmsPage, type Country$1 as Country, type CreatedRecord, type Currency$2 as Currency, type CustomField, type CustomFieldData, type CustomFieldSet, type Customer, type CustomerAddress, type CustomerGroup, type DataServiceOptions, type DeliveryTime, type FixtureTypes, type Flow, type FlowConfig, type FlowTemplate, type Language$2 as Language, type Manufacturer, type Media, type Options, type Order, type OrderDelivery, type OrderLineItem, type OrderStatus, type PageObject, type PaymentMethod$1 as PaymentMethod, type Price, type Product, type ProductCrossSelling, type ProductPrice, type ProductReview, type Promotion, type PromotionDiscount, type PropertyGroup, type PropertyGroupOption, type RegistrationData, type Rule, type RuleAssignmentEntity, RuleType, type SalesChannel, type SalesChannelAnalytics, type SalesChannelDomain, type SalesChannelRecord, type Salutation, type ShippingMethod$1 as ShippingMethod, type SimpleLineItem, type StateMachine, type StateMachineState, StorefrontPageObjects, type SyncApiOperation, type SystemConfig, type Tag, type TagData, type Task, type Tax$1 as Tax, type TaxRules, TestDataService, type VariantListingConfig, compareFlowTemplateWithFlow, createRandomImage, extractIdFromUrl, getCountryId, getCurrency, getDefaultShippingMethodId, getFlow, getFlowId, getFlowTemplate, getLanguageData, getMediaId, getOrderTransactionId, getPaymentMethodId, getPromotionWithDiscount, getSalutationId, getShippingMethodId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, hideElements, isSaaSInstance, isThemeCompiled, replaceElements, setOrderStatus, setViewport, test };
|
package/dist/index.mjs
CHANGED
|
@@ -5386,6 +5386,17 @@ class FirstRunWizard {
|
|
|
5386
5386
|
}
|
|
5387
5387
|
}
|
|
5388
5388
|
|
|
5389
|
+
async function getSelectFieldListitem(page, selectField, listItem, instanceMeta) {
|
|
5390
|
+
await selectField.click();
|
|
5391
|
+
if (satisfies(instanceMeta.version, "<6.7")) {
|
|
5392
|
+
await page.locator(".sw-select-result-list__item-list").waitFor({ state: "visible" });
|
|
5393
|
+
return page.locator(".sw-select-result-list__content").getByRole("listitem").filter({ hasText: listItem });
|
|
5394
|
+
} else {
|
|
5395
|
+
await page.locator(".mt-select-result-list__item-list").waitFor({ state: "visible" });
|
|
5396
|
+
return page.locator(".mt-select-result-list__item-list").getByRole("listitem").filter({ hasText: listItem });
|
|
5397
|
+
}
|
|
5398
|
+
}
|
|
5399
|
+
|
|
5389
5400
|
var __defProp$r = Object.defineProperty;
|
|
5390
5401
|
var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5391
5402
|
var __publicField$r = (obj, key, value) => {
|
|
@@ -5393,24 +5404,91 @@ var __publicField$r = (obj, key, value) => {
|
|
|
5393
5404
|
return value;
|
|
5394
5405
|
};
|
|
5395
5406
|
class FlowBuilderCreate {
|
|
5396
|
-
constructor(page) {
|
|
5407
|
+
constructor(page, instanceMeta) {
|
|
5397
5408
|
this.page = page;
|
|
5409
|
+
this.instanceMeta = instanceMeta;
|
|
5410
|
+
//header
|
|
5398
5411
|
__publicField$r(this, "saveButton");
|
|
5399
5412
|
__publicField$r(this, "header");
|
|
5400
|
-
__publicField$r(this, "
|
|
5413
|
+
__publicField$r(this, "smartBarHeader");
|
|
5414
|
+
//tabs
|
|
5415
|
+
__publicField$r(this, "generalTab");
|
|
5401
5416
|
__publicField$r(this, "flowTab");
|
|
5417
|
+
//../general
|
|
5418
|
+
__publicField$r(this, "nameField");
|
|
5419
|
+
__publicField$r(this, "descriptionField");
|
|
5420
|
+
__publicField$r(this, "priorityField");
|
|
5421
|
+
__publicField$r(this, "activeSwitch");
|
|
5422
|
+
//../flow
|
|
5402
5423
|
__publicField$r(this, "triggerSelectField");
|
|
5424
|
+
__publicField$r(this, "modalAddButton");
|
|
5425
|
+
__publicField$r(this, "sequenceSelectorConditionButton");
|
|
5426
|
+
__publicField$r(this, "conditionSelectField");
|
|
5427
|
+
__publicField$r(this, "sequenceSelectorActionButton");
|
|
5428
|
+
__publicField$r(this, "actionSelectField");
|
|
5429
|
+
__publicField$r(this, "selectFieldResultList");
|
|
5430
|
+
__publicField$r(this, "trueBlock");
|
|
5431
|
+
__publicField$r(this, "trueBlockAddConditionButton");
|
|
5432
|
+
__publicField$r(this, "trueBlockAddActionButton");
|
|
5433
|
+
__publicField$r(this, "trueBlockActionSelectField");
|
|
5434
|
+
__publicField$r(this, "trueBlockActionDescription");
|
|
5435
|
+
__publicField$r(this, "mailSendModal");
|
|
5436
|
+
__publicField$r(this, "mailSendModalTemplateSelectField");
|
|
5437
|
+
__publicField$r(this, "falseBlock");
|
|
5438
|
+
__publicField$r(this, "falseBlockAddConditionButton");
|
|
5439
|
+
__publicField$r(this, "falseBlockAddActionButton");
|
|
5440
|
+
__publicField$r(this, "falseBlockActionSelectField");
|
|
5441
|
+
__publicField$r(this, "falseBlockActionDescription");
|
|
5442
|
+
__publicField$r(this, "tagModal");
|
|
5443
|
+
__publicField$r(this, "tagModalTagsSelectField");
|
|
5444
|
+
__publicField$r(this, "delayCard");
|
|
5445
|
+
__publicField$r(this, "conditionRule");
|
|
5446
|
+
__publicField$r(this, "sequenceSeparator");
|
|
5403
5447
|
__publicField$r(this, "addActionField");
|
|
5404
|
-
__publicField$r(this, "smartBarHeader");
|
|
5405
5448
|
__publicField$r(this, "newFlowHeader");
|
|
5449
|
+
__publicField$r(this, "resultListItem");
|
|
5450
|
+
__publicField$r(this, "resultList");
|
|
5406
5451
|
this.saveButton = page.locator(".sw-flow-detail__save");
|
|
5407
5452
|
this.header = page.locator("h2");
|
|
5408
|
-
this.nameField = page.locator(".sw-flow-detail-general__general-name").getByLabel("Name");
|
|
5409
|
-
this.flowTab = page.locator(".sw-tabs__content").locator(".sw-flow-detail__tab-flow");
|
|
5410
|
-
this.triggerSelectField = page.locator(".sw-flow-detail-flow__trigger-card").getByRole("textbox");
|
|
5411
|
-
this.addActionField = page.locator(".sw-flow-sequence-action__content").locator(".sw-single-select__selection");
|
|
5412
5453
|
this.smartBarHeader = page.locator(".smart-bar__header");
|
|
5454
|
+
this.generalTab = page.locator(".sw-flow-detail__tab-general");
|
|
5455
|
+
this.triggerSelectField = page.locator(".sw-flow-detail-flow__trigger-card").getByRole("textbox");
|
|
5456
|
+
this.flowTab = page.locator(".sw-tabs__content").locator(".sw-flow-detail__tab-flow");
|
|
5457
|
+
if (satisfies(instanceMeta.version, "<6.7")) {
|
|
5458
|
+
this.modalAddButton = page.locator(".sw-button--primary").getByText("Add action");
|
|
5459
|
+
} else {
|
|
5460
|
+
this.modalAddButton = page.locator(".mt-button--primary").getByText("Add action");
|
|
5461
|
+
}
|
|
5462
|
+
this.nameField = page.getByLabel("Name");
|
|
5463
|
+
this.descriptionField = page.getByLabel("Description");
|
|
5464
|
+
this.priorityField = page.getByLabel("Priority");
|
|
5465
|
+
this.activeSwitch = page.getByLabel("Active");
|
|
5466
|
+
this.sequenceSelectorConditionButton = page.getByText("Add condition (IF)");
|
|
5467
|
+
this.conditionSelectField = page.locator(".sw-flow-sequence-condition__select");
|
|
5468
|
+
this.conditionRule = page.locator(".sw-flow-sequence-condition__rule-header");
|
|
5469
|
+
this.sequenceSelectorActionButton = page.getByText("Add action (THEN)");
|
|
5470
|
+
this.actionSelectField = page.locator(".sw-flow-sequence-action__content").locator(".sw-single-select__selection");
|
|
5471
|
+
this.selectFieldResultList = page.locator(".sw-select-result-list__item-list");
|
|
5472
|
+
this.trueBlock = page.locator(".sw-flow-sequence__true-block");
|
|
5473
|
+
this.trueBlockAddConditionButton = this.trueBlock.getByText("Add condition (IF)");
|
|
5474
|
+
this.trueBlockAddActionButton = this.trueBlock.getByText("Add action (THEN)");
|
|
5475
|
+
this.trueBlockActionSelectField = this.trueBlock.locator(".sw-single-select");
|
|
5476
|
+
this.trueBlockActionDescription = this.trueBlock.locator(".sw-flow-sequence-action__action-description");
|
|
5477
|
+
this.mailSendModal = page.locator(".sw-flow-mail-send-modal");
|
|
5478
|
+
this.mailSendModalTemplateSelectField = page.locator(".sw-flow-mail-send-modal").locator(".sw-entity-single-select__selection");
|
|
5479
|
+
this.falseBlock = page.locator(".sw-flow-sequence__false-block");
|
|
5480
|
+
this.falseBlockAddConditionButton = this.falseBlock.getByText("Add condition (IF)");
|
|
5481
|
+
this.falseBlockAddActionButton = this.falseBlock.getByText("Add action (THEN)");
|
|
5482
|
+
this.falseBlockActionSelectField = this.falseBlock.locator(".sw-single-select");
|
|
5483
|
+
this.falseBlockActionDescription = this.falseBlock.locator(".sw-flow-sequence-action__actions");
|
|
5484
|
+
this.tagModal = page.locator(".sw-flow-tag-modal");
|
|
5485
|
+
this.tagModalTagsSelectField = page.locator(".sw-flow-tag-modal").locator(".sw-select__selection").getByLabel("Tags");
|
|
5486
|
+
this.delayCard = page.locator(".sw-flow-delay-action__delay_card");
|
|
5487
|
+
this.sequenceSeparator = page.locator(".sw-flow-detail-flow__position-connection");
|
|
5413
5488
|
this.newFlowHeader = page.getByRole("heading", { name: "New flow" });
|
|
5489
|
+
this.addActionField = page.locator(".sw-flow-sequence-action__content").locator(".sw-single-select__selection");
|
|
5490
|
+
this.resultListItem = page.locator(".sw-select-result-list__content");
|
|
5491
|
+
this.resultList = page.locator(".sw-select-result-list");
|
|
5414
5492
|
}
|
|
5415
5493
|
url(flowId, tabName = "general") {
|
|
5416
5494
|
if (!flowId || flowId === "") {
|
|
@@ -5418,6 +5496,9 @@ class FlowBuilderCreate {
|
|
|
5418
5496
|
}
|
|
5419
5497
|
return `#/sw/flow/create/${flowId}/${tabName}`;
|
|
5420
5498
|
}
|
|
5499
|
+
async getSelectFieldListitem(selectField, listItem) {
|
|
5500
|
+
return getSelectFieldListitem(this.page, selectField, listItem, this.instanceMeta);
|
|
5501
|
+
}
|
|
5421
5502
|
}
|
|
5422
5503
|
|
|
5423
5504
|
var __defProp$q = Object.defineProperty;
|
|
@@ -5500,6 +5581,12 @@ class FlowBuilderTemplates extends FlowBuilderListing {
|
|
|
5500
5581
|
}
|
|
5501
5582
|
}
|
|
5502
5583
|
|
|
5584
|
+
async function getTooltipText(page, tooltipArea) {
|
|
5585
|
+
await tooltipArea.hover();
|
|
5586
|
+
const tooltipContent = page.locator(".sw-tooltip");
|
|
5587
|
+
return await tooltipContent.innerText();
|
|
5588
|
+
}
|
|
5589
|
+
|
|
5503
5590
|
var __defProp$p = Object.defineProperty;
|
|
5504
5591
|
var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5505
5592
|
var __publicField$p = (obj, key, value) => {
|
|
@@ -5508,7 +5595,7 @@ var __publicField$p = (obj, key, value) => {
|
|
|
5508
5595
|
};
|
|
5509
5596
|
class FlowBuilderDetail extends FlowBuilderCreate {
|
|
5510
5597
|
constructor(page, instanceMeta) {
|
|
5511
|
-
super(page);
|
|
5598
|
+
super(page, instanceMeta);
|
|
5512
5599
|
this.page = page;
|
|
5513
5600
|
this.instanceMeta = instanceMeta;
|
|
5514
5601
|
__publicField$p(this, "saveButtonLoader");
|
|
@@ -5518,12 +5605,16 @@ class FlowBuilderDetail extends FlowBuilderCreate {
|
|
|
5518
5605
|
__publicField$p(this, "alertWarning");
|
|
5519
5606
|
__publicField$p(this, "templateName");
|
|
5520
5607
|
__publicField$p(this, "alertMessage");
|
|
5608
|
+
__publicField$p(this, "successMessage");
|
|
5609
|
+
__publicField$p(this, "actionContentTag");
|
|
5521
5610
|
this.generalTab = page.locator(".sw-flow-detail__tab-general");
|
|
5522
5611
|
if (satisfies(instanceMeta.version, "<6.7")) {
|
|
5612
|
+
this.successMessage = page.locator(".sw-alert__title");
|
|
5523
5613
|
this.saveButtonLoader = page.locator(".sw-button--primary").locator(".sw-button_loader");
|
|
5524
5614
|
this.alertWarning = page.getByRole("alert").first();
|
|
5525
5615
|
this.alertMessage = page.locator(".sw-alert__title");
|
|
5526
5616
|
} else {
|
|
5617
|
+
this.successMessage = page.locator(".mt-banner__title");
|
|
5527
5618
|
this.saveButtonLoader = page.locator(".mt-button--primary").locator(".mt-button__loader");
|
|
5528
5619
|
this.alertWarning = page.getByRole("banner").first();
|
|
5529
5620
|
this.alertMessage = page.locator(".mt-banner__title");
|
|
@@ -5531,10 +5622,17 @@ class FlowBuilderDetail extends FlowBuilderCreate {
|
|
|
5531
5622
|
this.saveButton = page.locator(".sw-flow-detail__save");
|
|
5532
5623
|
this.flowTab = page.locator(".sw-flow-detail__tab-flow");
|
|
5533
5624
|
this.templateName = page.getByLabel("Name");
|
|
5625
|
+
this.actionContentTag = page.locator(".sw-flow-sequence-action__content").locator(".tag");
|
|
5534
5626
|
}
|
|
5535
5627
|
url(flowId, tabName = "general") {
|
|
5628
|
+
if (!flowId || flowId === "") {
|
|
5629
|
+
return `#/sw/flow/detail/${tabName}`;
|
|
5630
|
+
}
|
|
5536
5631
|
return `#/sw/flow/detail/${flowId}/${tabName}`;
|
|
5537
5632
|
}
|
|
5633
|
+
async getTooltipText(toolTipArea) {
|
|
5634
|
+
return await getTooltipText(this.page, toolTipArea);
|
|
5635
|
+
}
|
|
5538
5636
|
}
|
|
5539
5637
|
|
|
5540
5638
|
var __defProp$o = Object.defineProperty;
|
|
@@ -6001,17 +6099,6 @@ class CustomFieldCreate {
|
|
|
6001
6099
|
}
|
|
6002
6100
|
}
|
|
6003
6101
|
|
|
6004
|
-
async function getSelectFieldListitem(page, selectField, listItem, instanceMeta) {
|
|
6005
|
-
await selectField.click();
|
|
6006
|
-
if (satisfies(instanceMeta.version, "<6.7")) {
|
|
6007
|
-
await page.locator(".sw-select-result-list__item-list").waitFor({ state: "visible" });
|
|
6008
|
-
return page.locator(".sw-select-result-list__content").getByRole("listitem").filter({ hasText: listItem });
|
|
6009
|
-
} else {
|
|
6010
|
-
await page.locator(".mt-select-result-list__item-list").waitFor({ state: "visible" });
|
|
6011
|
-
return page.locator(".mt-select-result-list__item-list").getByRole("listitem").filter({ hasText: listItem });
|
|
6012
|
-
}
|
|
6013
|
-
}
|
|
6014
|
-
|
|
6015
6102
|
var __defProp$e = Object.defineProperty;
|
|
6016
6103
|
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6017
6104
|
var __publicField$e = (obj, key, value) => {
|
|
@@ -6738,8 +6825,8 @@ const test$6 = test$f.extend({
|
|
|
6738
6825
|
AdminFirstRunWizard: async ({ AdminPage, InstanceMeta }, use) => {
|
|
6739
6826
|
await use(new FirstRunWizard(AdminPage, InstanceMeta));
|
|
6740
6827
|
},
|
|
6741
|
-
AdminFlowBuilderCreate: async ({ AdminPage }, use) => {
|
|
6742
|
-
await use(new FlowBuilderCreate(AdminPage));
|
|
6828
|
+
AdminFlowBuilderCreate: async ({ AdminPage, InstanceMeta }, use) => {
|
|
6829
|
+
await use(new FlowBuilderCreate(AdminPage, InstanceMeta));
|
|
6743
6830
|
},
|
|
6744
6831
|
AdminFlowBuilderListing: async ({ AdminPage }, use) => {
|
|
6745
6832
|
await use(new FlowBuilderListing(AdminPage));
|
|
@@ -7684,6 +7771,57 @@ const AssignEntitiesToRule = test$f.extend({
|
|
|
7684
7771
|
}
|
|
7685
7772
|
});
|
|
7686
7773
|
|
|
7774
|
+
const CreateFlow = test$f.extend({
|
|
7775
|
+
CreateFlow: async ({ AdminFlowBuilderCreate, AdminFlowBuilderDetail, AdminFlowBuilderListing, ShopAdmin, TestDataService }, use) => {
|
|
7776
|
+
const task = (flowConfig) => {
|
|
7777
|
+
return async function createFlow() {
|
|
7778
|
+
await AdminFlowBuilderListing.createFlowButton.click();
|
|
7779
|
+
await ShopAdmin.expects(AdminFlowBuilderCreate.smartBarHeader).toHaveText("New flow");
|
|
7780
|
+
await AdminFlowBuilderCreate.nameField.fill(`${flowConfig.name}`);
|
|
7781
|
+
await AdminFlowBuilderCreate.descriptionField.fill(`${flowConfig.description}`);
|
|
7782
|
+
await AdminFlowBuilderCreate.priorityField.fill(`${flowConfig.priority}`);
|
|
7783
|
+
if (flowConfig.active) {
|
|
7784
|
+
await AdminFlowBuilderCreate.activeSwitch.click();
|
|
7785
|
+
}
|
|
7786
|
+
await AdminFlowBuilderCreate.flowTab.click();
|
|
7787
|
+
await AdminFlowBuilderCreate.triggerSelectField.fill(flowConfig.triggerSearchTerm);
|
|
7788
|
+
await AdminFlowBuilderCreate.triggerSelectField.press("Enter");
|
|
7789
|
+
await AdminFlowBuilderCreate.sequenceSelectorConditionButton.click();
|
|
7790
|
+
await AdminFlowBuilderCreate.conditionSelectField.click();
|
|
7791
|
+
await ShopAdmin.expects(AdminFlowBuilderCreate.resultList).toBeVisible();
|
|
7792
|
+
await AdminFlowBuilderCreate.resultListItem.getByRole("listitem").filter({ hasText: `${flowConfig.condition}` }).click();
|
|
7793
|
+
await AdminFlowBuilderCreate.trueBlockAddActionButton.click();
|
|
7794
|
+
await AdminFlowBuilderCreate.trueBlockActionSelectField.click();
|
|
7795
|
+
await ShopAdmin.expects(AdminFlowBuilderCreate.resultList).toBeVisible();
|
|
7796
|
+
await AdminFlowBuilderCreate.resultListItem.getByRole("listitem").filter({ hasText: `${flowConfig.trueAction}` }).click();
|
|
7797
|
+
await ShopAdmin.expects(AdminFlowBuilderCreate.mailSendModal).toBeVisible();
|
|
7798
|
+
await AdminFlowBuilderCreate.mailSendModalTemplateSelectField.click();
|
|
7799
|
+
await AdminFlowBuilderCreate.resultListItem.waitFor({ state: "visible" });
|
|
7800
|
+
await AdminFlowBuilderCreate.resultListItem.getByRole("listitem").filter({ hasText: `${flowConfig.trueActionIdentifier}` }).click();
|
|
7801
|
+
await AdminFlowBuilderCreate.modalAddButton.click();
|
|
7802
|
+
await ShopAdmin.expects(AdminFlowBuilderCreate.trueBlockActionDescription).toContainText(`${flowConfig.trueActionIdentifier}`);
|
|
7803
|
+
await AdminFlowBuilderCreate.falseBlockAddActionButton.click();
|
|
7804
|
+
await ShopAdmin.expects(AdminFlowBuilderCreate.falseBlockActionSelectField).toBeVisible();
|
|
7805
|
+
await AdminFlowBuilderCreate.falseBlockActionSelectField.click();
|
|
7806
|
+
await ShopAdmin.expects(AdminFlowBuilderCreate.resultList).toBeVisible();
|
|
7807
|
+
await AdminFlowBuilderCreate.resultListItem.getByRole("listitem").filter({ hasText: `${flowConfig.falseAction}` }).click();
|
|
7808
|
+
await ShopAdmin.expects(AdminFlowBuilderCreate.tagModal).toBeVisible();
|
|
7809
|
+
await AdminFlowBuilderCreate.tagModalTagsSelectField.click();
|
|
7810
|
+
await ShopAdmin.expects(AdminFlowBuilderCreate.resultList).toBeVisible();
|
|
7811
|
+
await AdminFlowBuilderCreate.resultListItem.getByRole("listitem").filter({ hasText: `${flowConfig.falseActionIdentifier}` }).click();
|
|
7812
|
+
await AdminFlowBuilderCreate.modalAddButton.click();
|
|
7813
|
+
await ShopAdmin.expects(AdminFlowBuilderCreate.falseBlockActionDescription).toContainText(`Tag: ${flowConfig.falseActionIdentifier}`);
|
|
7814
|
+
await AdminFlowBuilderCreate.saveButton.click();
|
|
7815
|
+
await ShopAdmin.expects(AdminFlowBuilderDetail.successMessage).toBeVisible();
|
|
7816
|
+
const flowURL = AdminFlowBuilderDetail.page.url();
|
|
7817
|
+
const flowID = flowURL.split("/")[flowURL.split("/").length - 2];
|
|
7818
|
+
TestDataService.addCreatedRecord("flow", flowID);
|
|
7819
|
+
};
|
|
7820
|
+
};
|
|
7821
|
+
await use(task);
|
|
7822
|
+
}
|
|
7823
|
+
});
|
|
7824
|
+
|
|
7687
7825
|
const LoginViaReviewsTab = test$f.extend({
|
|
7688
7826
|
LoginViaReviewsTab: async ({ ShopCustomer, DefaultSalesChannel, StorefrontProductDetail }, use) => {
|
|
7689
7827
|
const task = (product, customCustomer) => {
|
|
@@ -7709,6 +7847,7 @@ const test$4 = mergeTests(
|
|
|
7709
7847
|
BulkEditProducts,
|
|
7710
7848
|
BulkEditCustomers,
|
|
7711
7849
|
AssignEntitiesToRule,
|
|
7850
|
+
CreateFlow,
|
|
7712
7851
|
LoginViaReviewsTab
|
|
7713
7852
|
);
|
|
7714
7853
|
|