@shopware-ag/acceptance-test-suite 11.9.2 → 11.10.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 +25 -3
- package/dist/index.d.ts +25 -3
- package/dist/index.mjs +63 -17
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1753,15 +1753,28 @@ declare class ProductDetail implements PageObject {
|
|
|
1753
1753
|
constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
|
|
1754
1754
|
getCustomFieldSetCardContentByName(customFieldSetName: string): Promise<Record<string, Locator>>;
|
|
1755
1755
|
url(productId: string): string;
|
|
1756
|
+
getCustomFieldCardLocators(customFieldSetName: string, customFieldTextName: string): Promise<{
|
|
1757
|
+
customFieldCard: Locator;
|
|
1758
|
+
customFieldSetTab: Locator;
|
|
1759
|
+
customFieldLabel: Locator;
|
|
1760
|
+
customFieldSelect: Locator;
|
|
1761
|
+
}>;
|
|
1756
1762
|
}
|
|
1757
1763
|
|
|
1758
1764
|
declare class OrderDetail implements PageObject {
|
|
1759
1765
|
readonly page: Page;
|
|
1766
|
+
readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
|
|
1760
1767
|
readonly saveButton: Locator;
|
|
1761
1768
|
readonly dataGridContextButton: Locator;
|
|
1762
1769
|
readonly orderTag: Locator;
|
|
1763
|
-
constructor(page: Page);
|
|
1764
|
-
url(orderId: string): string;
|
|
1770
|
+
constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
|
|
1771
|
+
url(orderId: string, tabName?: string): string;
|
|
1772
|
+
getCustomFieldCardLocators(customFieldSetName: string, customFieldTextName: string): Promise<{
|
|
1773
|
+
customFieldCard: Locator;
|
|
1774
|
+
customFieldSetTab: Locator;
|
|
1775
|
+
customFieldLabel: Locator;
|
|
1776
|
+
customFieldSelect: Locator;
|
|
1777
|
+
}>;
|
|
1765
1778
|
}
|
|
1766
1779
|
|
|
1767
1780
|
declare class CustomerListing implements PageObject {
|
|
@@ -2126,6 +2139,7 @@ declare class CustomFieldCreate implements PageObject {
|
|
|
2126
2139
|
|
|
2127
2140
|
declare class CustomFieldDetail extends CustomFieldCreate {
|
|
2128
2141
|
readonly page: Page;
|
|
2142
|
+
readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
|
|
2129
2143
|
readonly newCustomFieldButton: Locator;
|
|
2130
2144
|
readonly customFieldEditDialog: Locator;
|
|
2131
2145
|
readonly newCustomFieldDialog: Locator;
|
|
@@ -2143,9 +2157,11 @@ declare class CustomFieldDetail extends CustomFieldCreate {
|
|
|
2143
2157
|
readonly customFieldDeleteDialog: Locator;
|
|
2144
2158
|
readonly customFieldDeleteCancelButton: Locator;
|
|
2145
2159
|
readonly customFieldDeleteButton: Locator;
|
|
2146
|
-
|
|
2160
|
+
readonly customFieldEditAvailableInShoppingCartCheckbox: Locator;
|
|
2161
|
+
constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
|
|
2147
2162
|
getLineItemByCustomFieldName(customFieldName: string): Promise<Record<string, Locator>>;
|
|
2148
2163
|
url(customFieldUuid?: string): string;
|
|
2164
|
+
getSelectFieldListitem(selectField: Locator, listItem: string): Promise<Locator>;
|
|
2149
2165
|
}
|
|
2150
2166
|
|
|
2151
2167
|
declare class CategoryDetail implements PageObject {
|
|
@@ -2159,6 +2175,12 @@ declare class CategoryDetail implements PageObject {
|
|
|
2159
2175
|
constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
|
|
2160
2176
|
getCustomFieldSetCardContentByName(customFieldSetName: string): Promise<Record<string, Locator>>;
|
|
2161
2177
|
url(categoryUuid: string): string;
|
|
2178
|
+
getCustomFieldCardLocators(customFieldSetName: string, customFieldTextName: string): Promise<{
|
|
2179
|
+
customFieldCard: Locator;
|
|
2180
|
+
customFieldSetTab: Locator;
|
|
2181
|
+
customFieldLabel: Locator;
|
|
2182
|
+
customFieldSelect: Locator;
|
|
2183
|
+
}>;
|
|
2162
2184
|
}
|
|
2163
2185
|
|
|
2164
2186
|
declare class RuleCreate implements PageObject {
|
package/dist/index.d.ts
CHANGED
|
@@ -1753,15 +1753,28 @@ declare class ProductDetail implements PageObject {
|
|
|
1753
1753
|
constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
|
|
1754
1754
|
getCustomFieldSetCardContentByName(customFieldSetName: string): Promise<Record<string, Locator>>;
|
|
1755
1755
|
url(productId: string): string;
|
|
1756
|
+
getCustomFieldCardLocators(customFieldSetName: string, customFieldTextName: string): Promise<{
|
|
1757
|
+
customFieldCard: Locator;
|
|
1758
|
+
customFieldSetTab: Locator;
|
|
1759
|
+
customFieldLabel: Locator;
|
|
1760
|
+
customFieldSelect: Locator;
|
|
1761
|
+
}>;
|
|
1756
1762
|
}
|
|
1757
1763
|
|
|
1758
1764
|
declare class OrderDetail implements PageObject {
|
|
1759
1765
|
readonly page: Page;
|
|
1766
|
+
readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
|
|
1760
1767
|
readonly saveButton: Locator;
|
|
1761
1768
|
readonly dataGridContextButton: Locator;
|
|
1762
1769
|
readonly orderTag: Locator;
|
|
1763
|
-
constructor(page: Page);
|
|
1764
|
-
url(orderId: string): string;
|
|
1770
|
+
constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
|
|
1771
|
+
url(orderId: string, tabName?: string): string;
|
|
1772
|
+
getCustomFieldCardLocators(customFieldSetName: string, customFieldTextName: string): Promise<{
|
|
1773
|
+
customFieldCard: Locator;
|
|
1774
|
+
customFieldSetTab: Locator;
|
|
1775
|
+
customFieldLabel: Locator;
|
|
1776
|
+
customFieldSelect: Locator;
|
|
1777
|
+
}>;
|
|
1765
1778
|
}
|
|
1766
1779
|
|
|
1767
1780
|
declare class CustomerListing implements PageObject {
|
|
@@ -2126,6 +2139,7 @@ declare class CustomFieldCreate implements PageObject {
|
|
|
2126
2139
|
|
|
2127
2140
|
declare class CustomFieldDetail extends CustomFieldCreate {
|
|
2128
2141
|
readonly page: Page;
|
|
2142
|
+
readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
|
|
2129
2143
|
readonly newCustomFieldButton: Locator;
|
|
2130
2144
|
readonly customFieldEditDialog: Locator;
|
|
2131
2145
|
readonly newCustomFieldDialog: Locator;
|
|
@@ -2143,9 +2157,11 @@ declare class CustomFieldDetail extends CustomFieldCreate {
|
|
|
2143
2157
|
readonly customFieldDeleteDialog: Locator;
|
|
2144
2158
|
readonly customFieldDeleteCancelButton: Locator;
|
|
2145
2159
|
readonly customFieldDeleteButton: Locator;
|
|
2146
|
-
|
|
2160
|
+
readonly customFieldEditAvailableInShoppingCartCheckbox: Locator;
|
|
2161
|
+
constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
|
|
2147
2162
|
getLineItemByCustomFieldName(customFieldName: string): Promise<Record<string, Locator>>;
|
|
2148
2163
|
url(customFieldUuid?: string): string;
|
|
2164
|
+
getSelectFieldListitem(selectField: Locator, listItem: string): Promise<Locator>;
|
|
2149
2165
|
}
|
|
2150
2166
|
|
|
2151
2167
|
declare class CategoryDetail implements PageObject {
|
|
@@ -2159,6 +2175,12 @@ declare class CategoryDetail implements PageObject {
|
|
|
2159
2175
|
constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
|
|
2160
2176
|
getCustomFieldSetCardContentByName(customFieldSetName: string): Promise<Record<string, Locator>>;
|
|
2161
2177
|
url(categoryUuid: string): string;
|
|
2178
|
+
getCustomFieldCardLocators(customFieldSetName: string, customFieldTextName: string): Promise<{
|
|
2179
|
+
customFieldCard: Locator;
|
|
2180
|
+
customFieldSetTab: Locator;
|
|
2181
|
+
customFieldLabel: Locator;
|
|
2182
|
+
customFieldSelect: Locator;
|
|
2183
|
+
}>;
|
|
2162
2184
|
}
|
|
2163
2185
|
|
|
2164
2186
|
declare class RuleCreate implements PageObject {
|
package/dist/index.mjs
CHANGED
|
@@ -556,7 +556,7 @@ const isSaaSInstance = async (adminApiContext) => {
|
|
|
556
556
|
const isThemeCompiled = async (context, storefrontUrl) => {
|
|
557
557
|
const response = await context.get(storefrontUrl);
|
|
558
558
|
const body = (await response.body()).toString();
|
|
559
|
-
const matches = body.match(/.*"(https
|
|
559
|
+
const matches = body.match(/.*"(https?:\/\/.*all\.css[^"]*)".*/);
|
|
560
560
|
if (matches && matches?.length > 1) {
|
|
561
561
|
const allCssUrl = matches[1];
|
|
562
562
|
const allCssResponse = await context.get(allCssUrl);
|
|
@@ -602,7 +602,7 @@ const test$b = test$f.extend({
|
|
|
602
602
|
});
|
|
603
603
|
await expect(page.url()).toContain("login");
|
|
604
604
|
await page.getByLabel(/Username|Email address/).fill(adminUser.username);
|
|
605
|
-
await page.getByLabel("Password").fill(adminUser.password);
|
|
605
|
+
await page.getByLabel("Password", { exact: true }).fill(adminUser.password);
|
|
606
606
|
const config = await (await AdminApiContext.get("./_info/config")).json();
|
|
607
607
|
const jsLoadingPromises = [];
|
|
608
608
|
for (const i in config.bundles) {
|
|
@@ -639,16 +639,13 @@ const test$b = test$f.extend({
|
|
|
639
639
|
baseURL: url
|
|
640
640
|
});
|
|
641
641
|
const page = await context.newPage();
|
|
642
|
-
const isSaasInstance = await isSaaSInstance(AdminApiContext);
|
|
643
642
|
if (!await isThemeCompiled(AdminApiContext, DefaultSalesChannel.url)) {
|
|
644
643
|
test$f.slow();
|
|
645
644
|
await AdminApiContext.post(
|
|
646
645
|
`./_action/theme/${SalesChannelBaseConfig.defaultThemeId}/assign/${salesChannel.id}`
|
|
647
646
|
);
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
await page.waitForTimeout(4e3);
|
|
651
|
-
}
|
|
647
|
+
while (!await isThemeCompiled(AdminApiContext, DefaultSalesChannel.url)) {
|
|
648
|
+
await page.waitForTimeout(4e3);
|
|
652
649
|
}
|
|
653
650
|
}
|
|
654
651
|
await page.goto("./", { waitUntil: "load" });
|
|
@@ -4472,6 +4469,24 @@ const test$7 = test$f.extend({
|
|
|
4472
4469
|
}
|
|
4473
4470
|
});
|
|
4474
4471
|
|
|
4472
|
+
async function getCustomFieldCardLocators(page, customFieldSetName, customFieldName, instanceMeta) {
|
|
4473
|
+
let customFieldCard;
|
|
4474
|
+
if (satisfies(instanceMeta.version, "<6.7")) {
|
|
4475
|
+
customFieldCard = page.locator(".sw-card").filter({ hasText: "Custom fields" });
|
|
4476
|
+
} else {
|
|
4477
|
+
customFieldCard = page.locator(".mt-card").filter({ hasText: "Custom fields" });
|
|
4478
|
+
}
|
|
4479
|
+
const customFieldSetTab = customFieldCard.getByText(customFieldSetName);
|
|
4480
|
+
const customFieldLabel = customFieldCard.locator(".sw-custom-field-set-renderer").locator(".sw-field__label").getByText(customFieldName);
|
|
4481
|
+
const customFieldSelect = customFieldCard.locator(`.sw-custom-field-set-renderer-tab-content__${customFieldSetName}`);
|
|
4482
|
+
return {
|
|
4483
|
+
customFieldCard,
|
|
4484
|
+
customFieldSetTab,
|
|
4485
|
+
customFieldLabel,
|
|
4486
|
+
customFieldSelect
|
|
4487
|
+
};
|
|
4488
|
+
}
|
|
4489
|
+
|
|
4475
4490
|
var __defProp$w = Object.defineProperty;
|
|
4476
4491
|
var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4477
4492
|
var __publicField$w = (obj, key, value) => {
|
|
@@ -4599,6 +4614,9 @@ class ProductDetail {
|
|
|
4599
4614
|
url(productId) {
|
|
4600
4615
|
return `#/sw/product/detail/${productId}/base`;
|
|
4601
4616
|
}
|
|
4617
|
+
async getCustomFieldCardLocators(customFieldSetName, customFieldTextName) {
|
|
4618
|
+
return getCustomFieldCardLocators(this.page, customFieldSetName, customFieldTextName, this.instanceMeta);
|
|
4619
|
+
}
|
|
4602
4620
|
}
|
|
4603
4621
|
|
|
4604
4622
|
var __defProp$v = Object.defineProperty;
|
|
@@ -4608,8 +4626,9 @@ var __publicField$v = (obj, key, value) => {
|
|
|
4608
4626
|
return value;
|
|
4609
4627
|
};
|
|
4610
4628
|
class OrderDetail {
|
|
4611
|
-
constructor(page) {
|
|
4629
|
+
constructor(page, instanceMeta) {
|
|
4612
4630
|
this.page = page;
|
|
4631
|
+
this.instanceMeta = instanceMeta;
|
|
4613
4632
|
__publicField$v(this, "saveButton");
|
|
4614
4633
|
__publicField$v(this, "dataGridContextButton");
|
|
4615
4634
|
__publicField$v(this, "orderTag");
|
|
@@ -4617,8 +4636,11 @@ class OrderDetail {
|
|
|
4617
4636
|
this.dataGridContextButton = page.locator(".sw-data-grid__actions-menu").and(page.getByRole("button"));
|
|
4618
4637
|
this.orderTag = page.locator(".sw-select-selection-list__item");
|
|
4619
4638
|
}
|
|
4620
|
-
url(orderId) {
|
|
4621
|
-
return `#/sw/order/detail/${orderId}
|
|
4639
|
+
url(orderId, tabName = "general") {
|
|
4640
|
+
return `#/sw/order/detail/${orderId}/${tabName}`;
|
|
4641
|
+
}
|
|
4642
|
+
async getCustomFieldCardLocators(customFieldSetName, customFieldTextName) {
|
|
4643
|
+
return getCustomFieldCardLocators(this.page, customFieldSetName, customFieldTextName, this.instanceMeta);
|
|
4622
4644
|
}
|
|
4623
4645
|
}
|
|
4624
4646
|
|
|
@@ -5516,6 +5538,17 @@ class CustomFieldCreate {
|
|
|
5516
5538
|
}
|
|
5517
5539
|
}
|
|
5518
5540
|
|
|
5541
|
+
async function getSelectFieldListitem(page, selectField, listItem, instanceMeta) {
|
|
5542
|
+
await selectField.click();
|
|
5543
|
+
if (satisfies(instanceMeta.version, "<6.7")) {
|
|
5544
|
+
await page.locator(".sw-select-result-list__item-list").waitFor({ state: "visible" });
|
|
5545
|
+
return page.locator(".sw-select-result-list__content").getByRole("listitem").filter({ hasText: listItem });
|
|
5546
|
+
} else {
|
|
5547
|
+
await page.locator(".mt-select-result-list__item-list").waitFor({ state: "visible" });
|
|
5548
|
+
return page.locator(".mt-select-result-list__item-list").getByRole("listitem").filter({ hasText: listItem });
|
|
5549
|
+
}
|
|
5550
|
+
}
|
|
5551
|
+
|
|
5519
5552
|
var __defProp$b = Object.defineProperty;
|
|
5520
5553
|
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5521
5554
|
var __publicField$b = (obj, key, value) => {
|
|
@@ -5523,9 +5556,10 @@ var __publicField$b = (obj, key, value) => {
|
|
|
5523
5556
|
return value;
|
|
5524
5557
|
};
|
|
5525
5558
|
class CustomFieldDetail extends CustomFieldCreate {
|
|
5526
|
-
constructor(page) {
|
|
5559
|
+
constructor(page, instanceMeta) {
|
|
5527
5560
|
super(page);
|
|
5528
5561
|
this.page = page;
|
|
5562
|
+
this.instanceMeta = instanceMeta;
|
|
5529
5563
|
__publicField$b(this, "newCustomFieldButton");
|
|
5530
5564
|
__publicField$b(this, "customFieldEditDialog");
|
|
5531
5565
|
__publicField$b(this, "newCustomFieldDialog");
|
|
@@ -5543,19 +5577,25 @@ class CustomFieldDetail extends CustomFieldCreate {
|
|
|
5543
5577
|
__publicField$b(this, "customFieldDeleteDialog");
|
|
5544
5578
|
__publicField$b(this, "customFieldDeleteCancelButton");
|
|
5545
5579
|
__publicField$b(this, "customFieldDeleteButton");
|
|
5580
|
+
__publicField$b(this, "customFieldEditAvailableInShoppingCartCheckbox");
|
|
5546
5581
|
this.newCustomFieldButton = page.getByRole("button", { name: "New custom field" });
|
|
5547
5582
|
this.customFieldDeleteListButton = page.locator(".sw-custom-field-list__delete-button");
|
|
5548
5583
|
this.newCustomFieldDialog = page.getByRole("dialog", { name: "New custom field" });
|
|
5549
5584
|
this.customFieldAddButton = this.newCustomFieldDialog.getByRole("button", { name: "Add" });
|
|
5550
|
-
this.customFieldTechnicalNameInput = this.newCustomFieldDialog.getByLabel("Technical
|
|
5585
|
+
this.customFieldTechnicalNameInput = this.newCustomFieldDialog.getByLabel("Technical name");
|
|
5551
5586
|
this.customFieldPositionInput = this.newCustomFieldDialog.getByLabel("Position");
|
|
5552
|
-
|
|
5587
|
+
if (satisfies(instanceMeta.version, "<6.7")) {
|
|
5588
|
+
this.customFieldTypeSelectionList = this.newCustomFieldDialog.getByLabel("Type");
|
|
5589
|
+
} else {
|
|
5590
|
+
this.customFieldTypeSelectionList = this.newCustomFieldDialog.getByRole("textbox", { name: "Select..." });
|
|
5591
|
+
}
|
|
5553
5592
|
this.customFieldModifyByStoreApiCheckbox = this.newCustomFieldDialog.getByLabel("Modifiable via Store API");
|
|
5554
5593
|
this.customFieldCancelButton = this.newCustomFieldDialog.getByRole("button", { name: "Cancel" });
|
|
5555
5594
|
this.customFieldLabelEnglishGBInput = this.newCustomFieldDialog.getByLabel("Label (English (GB))");
|
|
5556
5595
|
this.customFieldPlaceholderEnglishGBInput = this.newCustomFieldDialog.getByLabel("Placeholder (English (GB))");
|
|
5557
5596
|
this.customFieldHelpTextEnglishGBInput = this.newCustomFieldDialog.getByLabel("Help text (English (GB))");
|
|
5558
5597
|
this.customFieldEditDialog = page.getByRole("dialog", { name: "Edit custom field" });
|
|
5598
|
+
this.customFieldEditAvailableInShoppingCartCheckbox = this.customFieldEditDialog.getByLabel("Available in shopping cart");
|
|
5559
5599
|
this.customFieldEditApplyButton = this.customFieldEditDialog.getByRole("button", { name: "Apply changes" });
|
|
5560
5600
|
this.customFieldDeleteDialog = page.getByRole("dialog", { name: "Delete custom field" });
|
|
5561
5601
|
this.customFieldDeleteCancelButton = this.customFieldDeleteDialog.getByRole("button", { name: "Cancel" });
|
|
@@ -5585,6 +5625,9 @@ class CustomFieldDetail extends CustomFieldCreate {
|
|
|
5585
5625
|
url(customFieldUuid) {
|
|
5586
5626
|
return `#/sw/settings/custom/field/detail/${customFieldUuid}`;
|
|
5587
5627
|
}
|
|
5628
|
+
async getSelectFieldListitem(selectField, listItem) {
|
|
5629
|
+
return getSelectFieldListitem(this.page, selectField, listItem, this.instanceMeta);
|
|
5630
|
+
}
|
|
5588
5631
|
}
|
|
5589
5632
|
|
|
5590
5633
|
var __defProp$a = Object.defineProperty;
|
|
@@ -5629,6 +5672,9 @@ class CategoryDetail {
|
|
|
5629
5672
|
url(categoryUuid) {
|
|
5630
5673
|
return `#/sw/category/index/${categoryUuid}/base`;
|
|
5631
5674
|
}
|
|
5675
|
+
async getCustomFieldCardLocators(customFieldSetName, customFieldTextName) {
|
|
5676
|
+
return getCustomFieldCardLocators(this.page, customFieldSetName, customFieldTextName, this.instanceMeta);
|
|
5677
|
+
}
|
|
5632
5678
|
}
|
|
5633
5679
|
|
|
5634
5680
|
var __defProp$9 = Object.defineProperty;
|
|
@@ -6139,8 +6185,8 @@ const test$6 = test$f.extend({
|
|
|
6139
6185
|
AdminProductDetail: async ({ AdminPage, InstanceMeta }, use) => {
|
|
6140
6186
|
await use(new ProductDetail(AdminPage, InstanceMeta));
|
|
6141
6187
|
},
|
|
6142
|
-
AdminOrderDetail: async ({ AdminPage }, use) => {
|
|
6143
|
-
await use(new OrderDetail(AdminPage));
|
|
6188
|
+
AdminOrderDetail: async ({ AdminPage, InstanceMeta }, use) => {
|
|
6189
|
+
await use(new OrderDetail(AdminPage, InstanceMeta));
|
|
6144
6190
|
},
|
|
6145
6191
|
AdminCustomerListing: async ({ AdminPage }, use) => {
|
|
6146
6192
|
await use(new CustomerListing(AdminPage));
|
|
@@ -6202,8 +6248,8 @@ const test$6 = test$f.extend({
|
|
|
6202
6248
|
AdminCustomFieldCreate: async ({ AdminPage }, use) => {
|
|
6203
6249
|
await use(new CustomFieldCreate(AdminPage));
|
|
6204
6250
|
},
|
|
6205
|
-
AdminCustomFieldDetail: async ({ AdminPage }, use) => {
|
|
6206
|
-
await use(new CustomFieldDetail(AdminPage));
|
|
6251
|
+
AdminCustomFieldDetail: async ({ AdminPage, InstanceMeta }, use) => {
|
|
6252
|
+
await use(new CustomFieldDetail(AdminPage, InstanceMeta));
|
|
6207
6253
|
},
|
|
6208
6254
|
AdminRuleCreate: async ({ AdminPage }, use) => {
|
|
6209
6255
|
await use(new RuleCreate(AdminPage));
|