@shopware-ag/acceptance-test-suite 12.19.0 → 12.20.1
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/README.md +2 -0
- package/dist/index.d.mts +17 -3
- package/dist/index.d.ts +17 -3
- package/dist/index.mjs +81 -21
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -6,4 +6,6 @@
|
|
|
6
6
|
|
|
7
7
|
This repository remains the source code for the test suite but all guides, examples, and setup instructions is in the [documentation](https://developer.shopware.com/docs/guides/development/testing/e2e-playwright/)
|
|
8
8
|
|
|
9
|
+
Using an AI coding agent in your project? `npx skills add shopware/acceptance-test-suite` installs a skill for writing tests against this package.
|
|
10
|
+
|
|
9
11
|
Feel free to open [issues](https://github.com/shopware/acceptance-test-suite/issues) or [pull requests](https://github.com/shopware/acceptance-test-suite/pulls) for bugs or improvements related to the test suite code itself.
|
package/dist/index.d.mts
CHANGED
|
@@ -6,7 +6,6 @@ import * as axe_core from 'axe-core';
|
|
|
6
6
|
import * as playwright_test from '@playwright/test';
|
|
7
7
|
import { Page as Page$1, Locator as Locator$1, Browser } from '@playwright/test';
|
|
8
8
|
export { expect, mergeTests } from '@playwright/test';
|
|
9
|
-
import { Image } from 'image-js';
|
|
10
9
|
|
|
11
10
|
interface RequestOptions$1<PAYLOAD> {
|
|
12
11
|
[key: string]: unknown;
|
|
@@ -489,7 +488,7 @@ declare class Actor {
|
|
|
489
488
|
a11y_checks(locator: Locator): Promise<void>;
|
|
490
489
|
fillsIn(locator: Locator, input: string): Promise<void>;
|
|
491
490
|
presses(locator: Locator, key?: string): Promise<void>;
|
|
492
|
-
selectsRadioButton(radioGroup: Locator, inputLabel: string): Promise<void>;
|
|
491
|
+
selectsRadioButton(radioGroup: Locator, inputLabel: string, strictMatch?: boolean): Promise<void>;
|
|
493
492
|
attemptsTo(task: () => Promise<void>): Promise<void>;
|
|
494
493
|
goesTo(url: string, forceReload?: boolean): Promise<void>;
|
|
495
494
|
private camelCaseToLowerCase;
|
|
@@ -5437,6 +5436,7 @@ declare class FlowBuilderCreate implements PageObject {
|
|
|
5437
5436
|
readonly saveButton: Locator;
|
|
5438
5437
|
readonly header: Locator;
|
|
5439
5438
|
readonly smartBarHeader: Locator;
|
|
5439
|
+
readonly skeletonLoader: Locator;
|
|
5440
5440
|
readonly generalTab: Locator;
|
|
5441
5441
|
readonly flowTab: Locator;
|
|
5442
5442
|
readonly nameField: Locator;
|
|
@@ -5511,6 +5511,11 @@ declare class FlowBuilderTemplates extends FlowBuilderListing implements PageObj
|
|
|
5511
5511
|
lineItem: playwright_core.Locator;
|
|
5512
5512
|
templateDetailLink: playwright_core.Locator;
|
|
5513
5513
|
}>;
|
|
5514
|
+
searchLineItemByFlowName(searchTerm: string, flowName: string): Promise<{
|
|
5515
|
+
createFlowLink: playwright_core.Locator;
|
|
5516
|
+
lineItem: playwright_core.Locator;
|
|
5517
|
+
templateDetailLink: playwright_core.Locator;
|
|
5518
|
+
}>;
|
|
5514
5519
|
}
|
|
5515
5520
|
|
|
5516
5521
|
declare class FlowBuilderDetail extends FlowBuilderCreate implements PageObject {
|
|
@@ -6632,6 +6637,13 @@ declare const isSaaSInstance: (adminApiContext: AdminApiContext) => Promise<bool
|
|
|
6632
6637
|
declare const isPaaSInstance: () => boolean;
|
|
6633
6638
|
declare const isThemeCompiled: (context: StoreApiContext, storefrontUrl: string) => Promise<boolean>;
|
|
6634
6639
|
|
|
6640
|
+
interface Image {
|
|
6641
|
+
width: number;
|
|
6642
|
+
height: number;
|
|
6643
|
+
data: Uint8Array;
|
|
6644
|
+
channels: 3;
|
|
6645
|
+
depth: 8;
|
|
6646
|
+
}
|
|
6635
6647
|
declare function createRandomImage(width?: number, height?: number): Image;
|
|
6636
6648
|
declare function createSolidColorImage(width?: number, height?: number, color?: [number, number, number]): Image;
|
|
6637
6649
|
declare function encodeImage(image: Image): Buffer<ArrayBuffer>;
|
|
@@ -6808,6 +6820,8 @@ declare const test: playwright_test.TestType<playwright_test.PlaywrightTestArgs
|
|
|
6808
6820
|
CheckVisibilityOfServicesBanner: Task;
|
|
6809
6821
|
} & {
|
|
6810
6822
|
DeactivateShopwareServices: Task;
|
|
6823
|
+
} & {
|
|
6824
|
+
SelectExtensionCategory: Task;
|
|
6811
6825
|
} & {
|
|
6812
6826
|
Login: Task;
|
|
6813
6827
|
} & {
|
|
@@ -6877,4 +6891,4 @@ declare const test: playwright_test.TestType<playwright_test.PlaywrightTestArgs
|
|
|
6877
6891
|
}>;
|
|
6878
6892
|
|
|
6879
6893
|
export { Actor, AdminPageObjects, BUNDLED_RESOURCES, COUNTRY_ADDRESS_DATA, FeatureService, IdProvider, LanguageHelper, RuleType, StorefrontPageObjects, TestDataService, assertScreenshot, baseNamespaces, clearDelayedCache, compareFlowTemplateWithFlow, createNewAdminPageContext, createRandomImage, createSolidColorImage, encodeImage, expandAdminMenu, extractIdFromUrl, formatPrice, getCountryAddressData, getCountryCodeFromLocale, getCountryId, getCurrency, getCurrencyCodeFromLocale, getCurrencySymbolFromLocale, getCurrentContext, getDefaultShippingMethodId, getFlow, getFlowId, getFlowTemplate, getLanguageCode, getLanguageData, getLocale, getMediaId, getOrderTransactionId, getPaymentMethodId, getPromotionWithDiscount, getSalutationId, getShippingMethodId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, hideElements, hideSymfonyToolbarOnReload, isPaaSInstance, isSaaSInstance, isThemeCompiled, loginToAdministration, mockApiCalls, replaceElements, replaceElementsIndividually, setCurrentContext, setOrderStatus, setViewport, test, translate, updateAdminUser, uploadRandomPngMedia };
|
|
6880
|
-
export type { AccountData, AclRole, Address, CalculatedTaxes, Category$1 as Category, CategoryCustomizableLinkData, CategoryData, CmsPage, Country$1 as Country, CreatedRecord, Currency$2 as Currency, CustomField, CustomFieldData, CustomFieldSet, Customer, CustomerAddress, CustomerGroup, DataServiceOptions, DeliveryTime, FixtureTypes, Flow, FlowConfig, FlowTemplate, Language$2 as Language, Manufacturer, Media$1 as Media, Options, Order, OrderDelivery, OrderLineItem, OrderStatus, PageObject, PaymentMethod$1 as PaymentMethod, Price, Product, ProductCrossSelling, ProductPrice, ProductReview, Promotion, PromotionDiscount, PropertyGroup, PropertyGroupOption, RegistrationData, ReplaceTarget, Rule, RuleAssignmentEntity, SalesChannel, SalesChannelAnalytics, SalesChannelDomain, SalesChannelRecord, Salutation, ShippingMethod$1 as ShippingMethod, SimpleLineItem, StateMachine, StateMachineState, SyncApiOperation, SystemConfig, Tag, TagData, Task, Tax$1 as Tax, TaxRules, TranslateFn, TranslationKey, UploadMediaTarget, User, VariantListingConfig };
|
|
6894
|
+
export type { AccountData, AclRole, Address, CalculatedTaxes, Category$1 as Category, CategoryCustomizableLinkData, CategoryData, CmsPage, Country$1 as Country, CreatedRecord, Currency$2 as Currency, CustomField, CustomFieldData, CustomFieldSet, Customer, CustomerAddress, CustomerGroup, DataServiceOptions, DeliveryTime, FixtureTypes, Flow, FlowConfig, FlowTemplate, Image, Language$2 as Language, Manufacturer, Media$1 as Media, Options, Order, OrderDelivery, OrderLineItem, OrderStatus, PageObject, PaymentMethod$1 as PaymentMethod, Price, Product, ProductCrossSelling, ProductPrice, ProductReview, Promotion, PromotionDiscount, PropertyGroup, PropertyGroupOption, RegistrationData, ReplaceTarget, Rule, RuleAssignmentEntity, SalesChannel, SalesChannelAnalytics, SalesChannelDomain, SalesChannelRecord, Salutation, ShippingMethod$1 as ShippingMethod, SimpleLineItem, StateMachine, StateMachineState, SyncApiOperation, SystemConfig, Tag, TagData, Task, Tax$1 as Tax, TaxRules, TranslateFn, TranslationKey, UploadMediaTarget, User, VariantListingConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ import * as axe_core from 'axe-core';
|
|
|
6
6
|
import * as playwright_test from '@playwright/test';
|
|
7
7
|
import { Page as Page$1, Locator as Locator$1, Browser } from '@playwright/test';
|
|
8
8
|
export { expect, mergeTests } from '@playwright/test';
|
|
9
|
-
import { Image } from 'image-js';
|
|
10
9
|
|
|
11
10
|
interface RequestOptions$1<PAYLOAD> {
|
|
12
11
|
[key: string]: unknown;
|
|
@@ -489,7 +488,7 @@ declare class Actor {
|
|
|
489
488
|
a11y_checks(locator: Locator): Promise<void>;
|
|
490
489
|
fillsIn(locator: Locator, input: string): Promise<void>;
|
|
491
490
|
presses(locator: Locator, key?: string): Promise<void>;
|
|
492
|
-
selectsRadioButton(radioGroup: Locator, inputLabel: string): Promise<void>;
|
|
491
|
+
selectsRadioButton(radioGroup: Locator, inputLabel: string, strictMatch?: boolean): Promise<void>;
|
|
493
492
|
attemptsTo(task: () => Promise<void>): Promise<void>;
|
|
494
493
|
goesTo(url: string, forceReload?: boolean): Promise<void>;
|
|
495
494
|
private camelCaseToLowerCase;
|
|
@@ -5437,6 +5436,7 @@ declare class FlowBuilderCreate implements PageObject {
|
|
|
5437
5436
|
readonly saveButton: Locator;
|
|
5438
5437
|
readonly header: Locator;
|
|
5439
5438
|
readonly smartBarHeader: Locator;
|
|
5439
|
+
readonly skeletonLoader: Locator;
|
|
5440
5440
|
readonly generalTab: Locator;
|
|
5441
5441
|
readonly flowTab: Locator;
|
|
5442
5442
|
readonly nameField: Locator;
|
|
@@ -5511,6 +5511,11 @@ declare class FlowBuilderTemplates extends FlowBuilderListing implements PageObj
|
|
|
5511
5511
|
lineItem: playwright_core.Locator;
|
|
5512
5512
|
templateDetailLink: playwright_core.Locator;
|
|
5513
5513
|
}>;
|
|
5514
|
+
searchLineItemByFlowName(searchTerm: string, flowName: string): Promise<{
|
|
5515
|
+
createFlowLink: playwright_core.Locator;
|
|
5516
|
+
lineItem: playwright_core.Locator;
|
|
5517
|
+
templateDetailLink: playwright_core.Locator;
|
|
5518
|
+
}>;
|
|
5514
5519
|
}
|
|
5515
5520
|
|
|
5516
5521
|
declare class FlowBuilderDetail extends FlowBuilderCreate implements PageObject {
|
|
@@ -6632,6 +6637,13 @@ declare const isSaaSInstance: (adminApiContext: AdminApiContext) => Promise<bool
|
|
|
6632
6637
|
declare const isPaaSInstance: () => boolean;
|
|
6633
6638
|
declare const isThemeCompiled: (context: StoreApiContext, storefrontUrl: string) => Promise<boolean>;
|
|
6634
6639
|
|
|
6640
|
+
interface Image {
|
|
6641
|
+
width: number;
|
|
6642
|
+
height: number;
|
|
6643
|
+
data: Uint8Array;
|
|
6644
|
+
channels: 3;
|
|
6645
|
+
depth: 8;
|
|
6646
|
+
}
|
|
6635
6647
|
declare function createRandomImage(width?: number, height?: number): Image;
|
|
6636
6648
|
declare function createSolidColorImage(width?: number, height?: number, color?: [number, number, number]): Image;
|
|
6637
6649
|
declare function encodeImage(image: Image): Buffer<ArrayBuffer>;
|
|
@@ -6808,6 +6820,8 @@ declare const test: playwright_test.TestType<playwright_test.PlaywrightTestArgs
|
|
|
6808
6820
|
CheckVisibilityOfServicesBanner: Task;
|
|
6809
6821
|
} & {
|
|
6810
6822
|
DeactivateShopwareServices: Task;
|
|
6823
|
+
} & {
|
|
6824
|
+
SelectExtensionCategory: Task;
|
|
6811
6825
|
} & {
|
|
6812
6826
|
Login: Task;
|
|
6813
6827
|
} & {
|
|
@@ -6877,4 +6891,4 @@ declare const test: playwright_test.TestType<playwright_test.PlaywrightTestArgs
|
|
|
6877
6891
|
}>;
|
|
6878
6892
|
|
|
6879
6893
|
export { Actor, AdminPageObjects, BUNDLED_RESOURCES, COUNTRY_ADDRESS_DATA, FeatureService, IdProvider, LanguageHelper, RuleType, StorefrontPageObjects, TestDataService, assertScreenshot, baseNamespaces, clearDelayedCache, compareFlowTemplateWithFlow, createNewAdminPageContext, createRandomImage, createSolidColorImage, encodeImage, expandAdminMenu, extractIdFromUrl, formatPrice, getCountryAddressData, getCountryCodeFromLocale, getCountryId, getCurrency, getCurrencyCodeFromLocale, getCurrencySymbolFromLocale, getCurrentContext, getDefaultShippingMethodId, getFlow, getFlowId, getFlowTemplate, getLanguageCode, getLanguageData, getLocale, getMediaId, getOrderTransactionId, getPaymentMethodId, getPromotionWithDiscount, getSalutationId, getShippingMethodId, getSnippetSetId, getStateMachineId, getStateMachineStateId, getTaxId, getThemeId, hideElements, hideSymfonyToolbarOnReload, isPaaSInstance, isSaaSInstance, isThemeCompiled, loginToAdministration, mockApiCalls, replaceElements, replaceElementsIndividually, setCurrentContext, setOrderStatus, setViewport, test, translate, updateAdminUser, uploadRandomPngMedia };
|
|
6880
|
-
export type { AccountData, AclRole, Address, CalculatedTaxes, Category$1 as Category, CategoryCustomizableLinkData, CategoryData, CmsPage, Country$1 as Country, CreatedRecord, Currency$2 as Currency, CustomField, CustomFieldData, CustomFieldSet, Customer, CustomerAddress, CustomerGroup, DataServiceOptions, DeliveryTime, FixtureTypes, Flow, FlowConfig, FlowTemplate, Language$2 as Language, Manufacturer, Media$1 as Media, Options, Order, OrderDelivery, OrderLineItem, OrderStatus, PageObject, PaymentMethod$1 as PaymentMethod, Price, Product, ProductCrossSelling, ProductPrice, ProductReview, Promotion, PromotionDiscount, PropertyGroup, PropertyGroupOption, RegistrationData, ReplaceTarget, Rule, RuleAssignmentEntity, SalesChannel, SalesChannelAnalytics, SalesChannelDomain, SalesChannelRecord, Salutation, ShippingMethod$1 as ShippingMethod, SimpleLineItem, StateMachine, StateMachineState, SyncApiOperation, SystemConfig, Tag, TagData, Task, Tax$1 as Tax, TaxRules, TranslateFn, TranslationKey, UploadMediaTarget, User, VariantListingConfig };
|
|
6894
|
+
export type { AccountData, AclRole, Address, CalculatedTaxes, Category$1 as Category, CategoryCustomizableLinkData, CategoryData, CmsPage, Country$1 as Country, CreatedRecord, Currency$2 as Currency, CustomField, CustomFieldData, CustomFieldSet, Customer, CustomerAddress, CustomerGroup, DataServiceOptions, DeliveryTime, FixtureTypes, Flow, FlowConfig, FlowTemplate, Image, Language$2 as Language, Manufacturer, Media$1 as Media, Options, Order, OrderDelivery, OrderLineItem, OrderStatus, PageObject, PaymentMethod$1 as PaymentMethod, Price, Product, ProductCrossSelling, ProductPrice, ProductReview, Promotion, PromotionDiscount, PropertyGroup, PropertyGroupOption, RegistrationData, ReplaceTarget, Rule, RuleAssignmentEntity, SalesChannel, SalesChannelAnalytics, SalesChannelDomain, SalesChannelRecord, Salutation, ShippingMethod$1 as ShippingMethod, SimpleLineItem, StateMachine, StateMachineState, SyncApiOperation, SystemConfig, Tag, TagData, Task, Tax$1 as Tax, TaxRules, TranslateFn, TranslationKey, UploadMediaTarget, User, VariantListingConfig };
|
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { test as test$e, expect, request, mergeTests } from '@playwright/test';
|
|
|
2
2
|
export { expect, mergeTests } from '@playwright/test';
|
|
3
3
|
import { AsyncLocalStorage } from 'async_hooks';
|
|
4
4
|
import { createInstance } from 'i18next';
|
|
5
|
-
import {
|
|
5
|
+
import { encode } from 'fast-png';
|
|
6
6
|
import crypto from 'crypto';
|
|
7
7
|
import { stringify } from 'uuid';
|
|
8
8
|
import { satisfies } from 'compare-versions';
|
|
@@ -4088,10 +4088,11 @@ class Actor {
|
|
|
4088
4088
|
await locator.press(inputKey);
|
|
4089
4089
|
});
|
|
4090
4090
|
}
|
|
4091
|
-
async selectsRadioButton(radioGroup, inputLabel) {
|
|
4091
|
+
async selectsRadioButton(radioGroup, inputLabel, strictMatch) {
|
|
4092
4092
|
const stepTitle = `${this.name} selects radio button ${inputLabel}`;
|
|
4093
4093
|
await test$e.step(stepTitle, async () => {
|
|
4094
|
-
|
|
4094
|
+
let defaultStrictMatch = false;
|
|
4095
|
+
const desiredOption = radioGroup.getByRole("radio", { name: inputLabel, exact: strictMatch ?? defaultStrictMatch });
|
|
4095
4096
|
if (await desiredOption.isChecked()) {
|
|
4096
4097
|
await this.a11y_checks(desiredOption);
|
|
4097
4098
|
return;
|
|
@@ -4164,11 +4165,13 @@ function createRandomImage(width = 800, height = 600) {
|
|
|
4164
4165
|
for (let i = 0; i < data.length; i++) {
|
|
4165
4166
|
data[i] = Math.random() * 256 | 0;
|
|
4166
4167
|
}
|
|
4167
|
-
return
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
data
|
|
4171
|
-
|
|
4168
|
+
return {
|
|
4169
|
+
width,
|
|
4170
|
+
height,
|
|
4171
|
+
data,
|
|
4172
|
+
channels: 3,
|
|
4173
|
+
depth: 8
|
|
4174
|
+
};
|
|
4172
4175
|
}
|
|
4173
4176
|
function createSolidColorImage(width = 800, height = 600, color = [255, 0, 0]) {
|
|
4174
4177
|
const channels = 3;
|
|
@@ -4179,14 +4182,24 @@ function createSolidColorImage(width = 800, height = 600, color = [255, 0, 0]) {
|
|
|
4179
4182
|
data[i + 1] = g;
|
|
4180
4183
|
data[i + 2] = b;
|
|
4181
4184
|
}
|
|
4182
|
-
return
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
data
|
|
4186
|
-
|
|
4185
|
+
return {
|
|
4186
|
+
width,
|
|
4187
|
+
height,
|
|
4188
|
+
data,
|
|
4189
|
+
channels: 3,
|
|
4190
|
+
depth: 8
|
|
4191
|
+
};
|
|
4187
4192
|
}
|
|
4188
4193
|
function encodeImage(image) {
|
|
4189
|
-
return Buffer.from(
|
|
4194
|
+
return Buffer.from(
|
|
4195
|
+
encode({
|
|
4196
|
+
width: image.width,
|
|
4197
|
+
height: image.height,
|
|
4198
|
+
data: image.data,
|
|
4199
|
+
channels: image.channels,
|
|
4200
|
+
depth: image.depth
|
|
4201
|
+
})
|
|
4202
|
+
);
|
|
4190
4203
|
}
|
|
4191
4204
|
|
|
4192
4205
|
class TestDataService {
|
|
@@ -8995,7 +9008,7 @@ class FirstRunWizard {
|
|
|
8995
9008
|
this.dataImportCard = page.locator(".sw-first-run-wizard-data-import__card");
|
|
8996
9009
|
this.defaultValuesHeader = page.locator(".sw-modal__title", { hasText: translate("administration:firstRunWizard:headers.defaultValues") });
|
|
8997
9010
|
this.salesChannelSelectionMultiSelect = page.getByPlaceholder(translate("administration:firstRunWizard:placeholders.selectSalesChannels"));
|
|
8998
|
-
this.salesChannelSelectionList = page.locator(".sw-popover__wrapper").getByRole("listitem");
|
|
9011
|
+
this.salesChannelSelectionList = page.locator(".sw-popover__wrapper, .sw-select-result-list-popover-wrapper").getByRole("listitem");
|
|
8999
9012
|
this.mailerConfigurationHeader = page.locator(".sw-modal__title", { hasText: translate("administration:firstRunWizard:headers.mailerConfiguration") });
|
|
9000
9013
|
this.smtpServerButton = page.getByText(translate("administration:firstRunWizard:buttons.configureOwnSmtpServer"), { exact: true });
|
|
9001
9014
|
this.smtpServerTitle = page.getByText(translate("administration:firstRunWizard:text.smtpServer"), { exact: true });
|
|
@@ -9055,6 +9068,7 @@ class FlowBuilderCreate {
|
|
|
9055
9068
|
saveButton;
|
|
9056
9069
|
header;
|
|
9057
9070
|
smartBarHeader;
|
|
9071
|
+
skeletonLoader;
|
|
9058
9072
|
//tabs
|
|
9059
9073
|
generalTab;
|
|
9060
9074
|
flowTab;
|
|
@@ -9101,9 +9115,15 @@ class FlowBuilderCreate {
|
|
|
9101
9115
|
this.saveButton = page.locator(".sw-flow-detail__save");
|
|
9102
9116
|
this.header = page.locator("h2");
|
|
9103
9117
|
this.smartBarHeader = page.locator(".smart-bar__header");
|
|
9104
|
-
this.
|
|
9118
|
+
this.skeletonLoader = page.locator(".sw-skeleton");
|
|
9105
9119
|
this.triggerSelectField = page.locator(".sw-flow-detail-flow__trigger-card").getByRole("textbox");
|
|
9106
|
-
|
|
9120
|
+
if (instanceMeta.features["V6_8_0_0"]) {
|
|
9121
|
+
this.generalTab = page.locator('.mt-tabs__item[data-item-name="sw.flow.create.general"]');
|
|
9122
|
+
this.flowTab = page.locator('.mt-tabs__item[data-item-name="sw.flow.create.flow"]');
|
|
9123
|
+
} else {
|
|
9124
|
+
this.generalTab = page.locator(".sw-flow-detail__tab-general");
|
|
9125
|
+
this.flowTab = page.locator(".sw-tabs__content").locator(".sw-flow-detail__tab-flow");
|
|
9126
|
+
}
|
|
9107
9127
|
if (satisfies(instanceMeta.version, "<6.7")) {
|
|
9108
9128
|
this.modalAddButton = page.locator(".sw-button--primary").getByText(translate("administration:flowBuilder:create.addAction"));
|
|
9109
9129
|
} else {
|
|
@@ -9231,6 +9251,21 @@ class FlowBuilderTemplates extends FlowBuilderListing {
|
|
|
9231
9251
|
templateDetailLink
|
|
9232
9252
|
};
|
|
9233
9253
|
}
|
|
9254
|
+
async searchLineItemByFlowName(searchTerm, flowName) {
|
|
9255
|
+
const searchResponse = this.page.waitForResponse((response) => {
|
|
9256
|
+
if (!response.url().includes("/api/search/flow-template") || response.request().method() !== "POST") {
|
|
9257
|
+
return false;
|
|
9258
|
+
}
|
|
9259
|
+
if (!response.ok()) {
|
|
9260
|
+
return false;
|
|
9261
|
+
}
|
|
9262
|
+
const requestData = response.request().postDataJSON();
|
|
9263
|
+
return requestData?.term === searchTerm;
|
|
9264
|
+
});
|
|
9265
|
+
await this.searchBar.fill(searchTerm);
|
|
9266
|
+
await searchResponse;
|
|
9267
|
+
return this.getLineItemByFlowName(flowName);
|
|
9268
|
+
}
|
|
9234
9269
|
}
|
|
9235
9270
|
|
|
9236
9271
|
async function getTooltipText(page, tooltipArea) {
|
|
@@ -9253,7 +9288,13 @@ class FlowBuilderDetail extends FlowBuilderCreate {
|
|
|
9253
9288
|
messageClose;
|
|
9254
9289
|
constructor(page, instanceMeta) {
|
|
9255
9290
|
super(page, instanceMeta);
|
|
9256
|
-
|
|
9291
|
+
if (instanceMeta.features["V6_8_0_0"]) {
|
|
9292
|
+
this.generalTab = page.locator('.mt-tabs__item[data-item-name="sw.flow.detail.general"]');
|
|
9293
|
+
this.flowTab = page.locator('.mt-tabs__item[data-item-name="sw.flow.detail.flow"]');
|
|
9294
|
+
} else {
|
|
9295
|
+
this.generalTab = page.locator(".sw-flow-detail__tab-general");
|
|
9296
|
+
this.flowTab = page.locator(".sw-flow-detail__tab-flow");
|
|
9297
|
+
}
|
|
9257
9298
|
if (satisfies(instanceMeta.version, "<6.7")) {
|
|
9258
9299
|
this.successMessage = page.locator(".sw-alert__title");
|
|
9259
9300
|
this.saveButtonLoader = page.locator(".sw-button--primary").locator(".sw-button_loader");
|
|
@@ -9266,7 +9307,6 @@ class FlowBuilderDetail extends FlowBuilderCreate {
|
|
|
9266
9307
|
this.alertMessage = page.locator(".mt-banner__title");
|
|
9267
9308
|
}
|
|
9268
9309
|
this.saveButton = page.locator(".sw-flow-detail__save");
|
|
9269
|
-
this.flowTab = page.locator(".sw-flow-detail__tab-flow");
|
|
9270
9310
|
this.templateName = page.getByLabel(translate("administration:flowBuilder:detail.name"));
|
|
9271
9311
|
this.actionContentTag = page.locator(".sw-flow-sequence-action__content").locator(".tag");
|
|
9272
9312
|
this.skeletonLoader = page.locator(".sw-skeleton");
|
|
@@ -11599,7 +11639,7 @@ const MediaData = test$e.extend({
|
|
|
11599
11639
|
console.error(err);
|
|
11600
11640
|
}
|
|
11601
11641
|
}
|
|
11602
|
-
fs.writeFileSync(imageFilePath,
|
|
11642
|
+
fs.writeFileSync(imageFilePath, encodeImage(image));
|
|
11603
11643
|
const mediaResponse = await AdminApiContext.post("media?_response", {
|
|
11604
11644
|
data: {
|
|
11605
11645
|
private: false
|
|
@@ -12199,8 +12239,12 @@ const CreateFlow = test$e.extend({
|
|
|
12199
12239
|
CreateFlow: async ({ AdminFlowBuilderCreate, AdminFlowBuilderDetail, AdminFlowBuilderListing, ShopAdmin, TestDataService }, use) => {
|
|
12200
12240
|
const task = (flowConfig) => {
|
|
12201
12241
|
return async function createFlow() {
|
|
12242
|
+
await ShopAdmin.expects(AdminFlowBuilderListing.createFlowButton).toBeEnabled();
|
|
12202
12243
|
const flowActionsLoaded = AdminFlowBuilderCreate.page.waitForResponse((response) => response.url().includes("/_info/flow-actions.json") && response.ok());
|
|
12244
|
+
const navigatedToCreate = AdminFlowBuilderCreate.page.waitForURL((url) => url.hash.includes("/sw/flow/create/"));
|
|
12203
12245
|
await AdminFlowBuilderListing.createFlowButton.click();
|
|
12246
|
+
await navigatedToCreate;
|
|
12247
|
+
await ShopAdmin.expects(AdminFlowBuilderCreate.skeletonLoader).toHaveCount(0);
|
|
12204
12248
|
await ShopAdmin.expects(AdminFlowBuilderCreate.smartBarHeader).toHaveText(translate("administration:flowBuilder:create.newFlow"));
|
|
12205
12249
|
await AdminFlowBuilderCreate.nameField.fill(`${flowConfig.name}`);
|
|
12206
12250
|
await AdminFlowBuilderCreate.descriptionField.fill(`${flowConfig.description}`);
|
|
@@ -12233,8 +12277,10 @@ const CreateFlow = test$e.extend({
|
|
|
12233
12277
|
await AdminFlowBuilderCreate.resultListItem.getByRole("listitem").filter({ hasText: `${flowConfig.falseAction}` }).click();
|
|
12234
12278
|
await ShopAdmin.expects(AdminFlowBuilderCreate.tagModal).toBeVisible();
|
|
12235
12279
|
await AdminFlowBuilderCreate.tagModalTagsSelectField.click();
|
|
12280
|
+
await AdminFlowBuilderCreate.tagModalTagsSelectField.fill(flowConfig.falseActionIdentifier);
|
|
12236
12281
|
await ShopAdmin.expects(AdminFlowBuilderCreate.resultList).toBeVisible();
|
|
12237
12282
|
await AdminFlowBuilderCreate.resultListItem.getByRole("listitem").filter({ hasText: `${flowConfig.falseActionIdentifier}` }).click();
|
|
12283
|
+
await AdminFlowBuilderCreate.tagModalTagsSelectField.press("Escape");
|
|
12238
12284
|
await AdminFlowBuilderCreate.modalAddButton.click();
|
|
12239
12285
|
await ShopAdmin.expects(AdminFlowBuilderCreate.falseBlockActionDescription).toContainText(`Tag: ${flowConfig.falseActionIdentifier}`);
|
|
12240
12286
|
await AdminFlowBuilderCreate.saveButton.click();
|
|
@@ -12336,6 +12382,19 @@ const CheckAccessToShopwareServices = test$e.extend({
|
|
|
12336
12382
|
}
|
|
12337
12383
|
});
|
|
12338
12384
|
|
|
12385
|
+
const SelectExtensionCategory = test$e.extend({
|
|
12386
|
+
SelectExtensionCategory: async ({ AdminFirstRunWizard }, use) => {
|
|
12387
|
+
const task = (category) => {
|
|
12388
|
+
return async function SelectExtensionCategory2() {
|
|
12389
|
+
const recommendationsLoaded = AdminFirstRunWizard.page.waitForResponse((response) => response.url().includes("/_action/store/recommendations") && response.ok());
|
|
12390
|
+
await category.click();
|
|
12391
|
+
await recommendationsLoaded;
|
|
12392
|
+
};
|
|
12393
|
+
};
|
|
12394
|
+
await use(task);
|
|
12395
|
+
}
|
|
12396
|
+
});
|
|
12397
|
+
|
|
12339
12398
|
const test$4 = mergeTests(
|
|
12340
12399
|
SaveProduct,
|
|
12341
12400
|
ExpectNotification,
|
|
@@ -12347,7 +12406,8 @@ const test$4 = mergeTests(
|
|
|
12347
12406
|
LoginViaReviewsTab,
|
|
12348
12407
|
CheckAccessToShopwareServices,
|
|
12349
12408
|
CheckVisibilityOfServicesBanner,
|
|
12350
|
-
DeactivateShopwareServices
|
|
12409
|
+
DeactivateShopwareServices,
|
|
12410
|
+
SelectExtensionCategory
|
|
12351
12411
|
);
|
|
12352
12412
|
|
|
12353
12413
|
const Login = test$e.extend({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopware-ag/acceptance-test-suite",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.20.1",
|
|
4
4
|
"description": "Shopware Acceptance Test Suite",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fixtures",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"@shopware/api-client": "1.5.1",
|
|
44
44
|
"axe-html-reporter": "2.2.11",
|
|
45
45
|
"compare-versions": "6.1.1",
|
|
46
|
+
"fast-png": "8.0.0",
|
|
46
47
|
"i18next": "26.3.1",
|
|
47
|
-
"image-js": "1.3.0",
|
|
48
48
|
"uuid": "14.0.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|