@shopware-ag/acceptance-test-suite 3.2.0 → 3.4.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 +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.mjs +54 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -470,6 +470,12 @@ declare class TestDataService {
|
|
|
470
470
|
* @param overrides - Specific data overrides that will be applied to the payment method data struct.
|
|
471
471
|
*/
|
|
472
472
|
createBasicPaymentMethod(overrides?: Partial<PaymentMethod>): Promise<PaymentMethod>;
|
|
473
|
+
/**
|
|
474
|
+
* Creates a new basic rule with the condition cart amount >= 1.
|
|
475
|
+
*
|
|
476
|
+
* @param overrides - Specific data overrides that will be applied to the payment method data struct.
|
|
477
|
+
*/
|
|
478
|
+
createBasicRule(overrides?: Partial<Rule>): Promise<Rule>;
|
|
473
479
|
/**
|
|
474
480
|
* Creates a payment method with one randomly generated image.
|
|
475
481
|
*
|
|
@@ -612,6 +618,7 @@ declare class TestDataService {
|
|
|
612
618
|
*/
|
|
613
619
|
convertDateTime(date: Date): string;
|
|
614
620
|
getBasicProductStruct(taxId?: string, currencyId?: string, overrides?: Partial<Product>): Partial<Product>;
|
|
621
|
+
getBasicRuleStruct(overrides?: Partial<Rule>, conditionType?: string, operator?: string, amount?: number): Partial<Rule>;
|
|
615
622
|
getProductPriceRangeStruct(currencyId: string, ruleId: string): Partial<Product>;
|
|
616
623
|
getBasicManufacturerStruct(overrides?: Partial<Manufacturer>): Partial<Manufacturer>;
|
|
617
624
|
getBasicPaymentMethodStruct(overrides?: Partial<PaymentMethod>): {
|
|
@@ -873,6 +880,7 @@ declare class AccountLogin implements PageObject {
|
|
|
873
880
|
readonly streetAddressInput: Locator;
|
|
874
881
|
readonly cityInput: Locator;
|
|
875
882
|
readonly countryInput: Locator;
|
|
883
|
+
readonly postalCodeInput: Locator;
|
|
876
884
|
readonly registerButton: Locator;
|
|
877
885
|
constructor(page: Page);
|
|
878
886
|
url(): string;
|
package/dist/index.d.ts
CHANGED
|
@@ -470,6 +470,12 @@ declare class TestDataService {
|
|
|
470
470
|
* @param overrides - Specific data overrides that will be applied to the payment method data struct.
|
|
471
471
|
*/
|
|
472
472
|
createBasicPaymentMethod(overrides?: Partial<PaymentMethod>): Promise<PaymentMethod>;
|
|
473
|
+
/**
|
|
474
|
+
* Creates a new basic rule with the condition cart amount >= 1.
|
|
475
|
+
*
|
|
476
|
+
* @param overrides - Specific data overrides that will be applied to the payment method data struct.
|
|
477
|
+
*/
|
|
478
|
+
createBasicRule(overrides?: Partial<Rule>): Promise<Rule>;
|
|
473
479
|
/**
|
|
474
480
|
* Creates a payment method with one randomly generated image.
|
|
475
481
|
*
|
|
@@ -612,6 +618,7 @@ declare class TestDataService {
|
|
|
612
618
|
*/
|
|
613
619
|
convertDateTime(date: Date): string;
|
|
614
620
|
getBasicProductStruct(taxId?: string, currencyId?: string, overrides?: Partial<Product>): Partial<Product>;
|
|
621
|
+
getBasicRuleStruct(overrides?: Partial<Rule>, conditionType?: string, operator?: string, amount?: number): Partial<Rule>;
|
|
615
622
|
getProductPriceRangeStruct(currencyId: string, ruleId: string): Partial<Product>;
|
|
616
623
|
getBasicManufacturerStruct(overrides?: Partial<Manufacturer>): Partial<Manufacturer>;
|
|
617
624
|
getBasicPaymentMethodStruct(overrides?: Partial<PaymentMethod>): {
|
|
@@ -873,6 +880,7 @@ declare class AccountLogin implements PageObject {
|
|
|
873
880
|
readonly streetAddressInput: Locator;
|
|
874
881
|
readonly cityInput: Locator;
|
|
875
882
|
readonly countryInput: Locator;
|
|
883
|
+
readonly postalCodeInput: Locator;
|
|
876
884
|
readonly registerButton: Locator;
|
|
877
885
|
constructor(page: Page);
|
|
878
886
|
url(): string;
|
package/dist/index.mjs
CHANGED
|
@@ -1291,6 +1291,20 @@ class TestDataService {
|
|
|
1291
1291
|
this.addCreatedRecord("payment_method", paymentMethod.id);
|
|
1292
1292
|
return paymentMethod;
|
|
1293
1293
|
}
|
|
1294
|
+
/**
|
|
1295
|
+
* Creates a new basic rule with the condition cart amount >= 1.
|
|
1296
|
+
*
|
|
1297
|
+
* @param overrides - Specific data overrides that will be applied to the payment method data struct.
|
|
1298
|
+
*/
|
|
1299
|
+
async createBasicRule(overrides = {}) {
|
|
1300
|
+
const basicRule = this.getBasicRuleStruct(overrides);
|
|
1301
|
+
const ruleResponse = await this.AdminApiClient.post("rule?_response=detail", {
|
|
1302
|
+
data: basicRule
|
|
1303
|
+
});
|
|
1304
|
+
const { data: rule } = await ruleResponse.json();
|
|
1305
|
+
this.addCreatedRecord("rule", rule.id);
|
|
1306
|
+
return rule;
|
|
1307
|
+
}
|
|
1294
1308
|
/**
|
|
1295
1309
|
* Creates a payment method with one randomly generated image.
|
|
1296
1310
|
*
|
|
@@ -1704,6 +1718,41 @@ class TestDataService {
|
|
|
1704
1718
|
}
|
|
1705
1719
|
return Object.assign({}, basicProduct, overrides);
|
|
1706
1720
|
}
|
|
1721
|
+
getBasicRuleStruct(overrides = {}, conditionType = "cartCartAmount", operator = ">=", amount = 1) {
|
|
1722
|
+
const { id: ruleId, uuid: ruleUuid } = this.IdProvider.getIdPair();
|
|
1723
|
+
const ruleName = `${this.namePrefix}Rule-${ruleId}${this.nameSuffix}`;
|
|
1724
|
+
const description = `
|
|
1725
|
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
|
|
1726
|
+
At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
|
|
1727
|
+
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
|
|
1728
|
+
At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.`.trim();
|
|
1729
|
+
const basicRuleStruct = {
|
|
1730
|
+
id: ruleUuid,
|
|
1731
|
+
name: ruleName,
|
|
1732
|
+
priority: 1,
|
|
1733
|
+
description,
|
|
1734
|
+
conditions: [
|
|
1735
|
+
{
|
|
1736
|
+
type: "orContainer",
|
|
1737
|
+
children: [
|
|
1738
|
+
{
|
|
1739
|
+
type: "andContainer",
|
|
1740
|
+
children: [
|
|
1741
|
+
{
|
|
1742
|
+
type: conditionType,
|
|
1743
|
+
value: {
|
|
1744
|
+
operator,
|
|
1745
|
+
amount
|
|
1746
|
+
}
|
|
1747
|
+
}
|
|
1748
|
+
]
|
|
1749
|
+
}
|
|
1750
|
+
]
|
|
1751
|
+
}
|
|
1752
|
+
]
|
|
1753
|
+
};
|
|
1754
|
+
return Object.assign({}, basicRuleStruct, overrides);
|
|
1755
|
+
}
|
|
1707
1756
|
getProductPriceRangeStruct(currencyId, ruleId) {
|
|
1708
1757
|
const p = (gross, net) => [
|
|
1709
1758
|
{
|
|
@@ -2452,6 +2501,7 @@ class AccountLogin {
|
|
|
2452
2501
|
__publicField$g(this, "streetAddressInput");
|
|
2453
2502
|
__publicField$g(this, "cityInput");
|
|
2454
2503
|
__publicField$g(this, "countryInput");
|
|
2504
|
+
__publicField$g(this, "postalCodeInput");
|
|
2455
2505
|
__publicField$g(this, "registerButton");
|
|
2456
2506
|
this.emailInput = page.getByLabel("Your email address");
|
|
2457
2507
|
this.passwordInput = page.getByLabel("Your password");
|
|
@@ -2466,6 +2516,7 @@ class AccountLogin {
|
|
|
2466
2516
|
this.streetAddressInput = this.billingAddressFormArea.getByLabel("Street address*");
|
|
2467
2517
|
this.cityInput = this.billingAddressFormArea.getByLabel("City*");
|
|
2468
2518
|
this.countryInput = this.billingAddressFormArea.getByLabel("Country*");
|
|
2519
|
+
this.postalCodeInput = this.billingAddressFormArea.getByLabel("Postal code*");
|
|
2469
2520
|
this.registerButton = page.getByRole("button", { name: "Continue" });
|
|
2470
2521
|
this.logoutLink = page.getByRole("link", { name: "Log out" });
|
|
2471
2522
|
this.successAlert = page.getByText("Successfully logged out.");
|
|
@@ -3685,7 +3736,8 @@ const Register = test$e.extend({
|
|
|
3685
3736
|
password: "shopware",
|
|
3686
3737
|
street: "Ebbinghof 10",
|
|
3687
3738
|
city: "Sch\xF6ppingen",
|
|
3688
|
-
country: "Germany"
|
|
3739
|
+
country: "Germany",
|
|
3740
|
+
postalCode: "48624"
|
|
3689
3741
|
};
|
|
3690
3742
|
const task = (email) => {
|
|
3691
3743
|
return async function Register2() {
|
|
@@ -3697,6 +3749,7 @@ const Register = test$e.extend({
|
|
|
3697
3749
|
await StorefrontAccountLogin.streetAddressInput.fill(registrationData.street);
|
|
3698
3750
|
await StorefrontAccountLogin.cityInput.fill(registrationData.city);
|
|
3699
3751
|
await StorefrontAccountLogin.countryInput.selectOption(registrationData.country);
|
|
3752
|
+
await StorefrontAccountLogin.postalCodeInput.fill(registrationData.postalCode);
|
|
3700
3753
|
await StorefrontAccountLogin.registerButton.click();
|
|
3701
3754
|
};
|
|
3702
3755
|
};
|