@shopware-ag/acceptance-test-suite 11.18.0 → 11.19.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/dist/index.d.mts +97 -3
- package/dist/index.d.ts +97 -3
- package/dist/index.mjs +1169 -1010
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1161,8 +1161,6 @@ interface HelperFixtureTypes {
|
|
|
1161
1161
|
isSaaS: boolean;
|
|
1162
1162
|
features: FeaturesType;
|
|
1163
1163
|
};
|
|
1164
|
-
HideElementsForScreenshot: (page: Page, selectors: string[]) => Promise<void>;
|
|
1165
|
-
ReplaceElementsForScreenshot: (page: Page, selectors: string[]) => Promise<void>;
|
|
1166
1164
|
}
|
|
1167
1165
|
|
|
1168
1166
|
interface StoreBaseConfig {
|
|
@@ -1240,6 +1238,7 @@ interface PageObject {
|
|
|
1240
1238
|
|
|
1241
1239
|
declare class Home implements PageObject {
|
|
1242
1240
|
readonly page: Page;
|
|
1241
|
+
readonly categoryTitle: Locator;
|
|
1243
1242
|
readonly accountMenuButton: Locator;
|
|
1244
1243
|
readonly closeGuestSessionButton: Locator;
|
|
1245
1244
|
readonly productImages: Locator;
|
|
@@ -1830,6 +1829,8 @@ declare const StorefrontPageObjects: {
|
|
|
1830
1829
|
declare class ProductDetail implements PageObject {
|
|
1831
1830
|
readonly page: Page;
|
|
1832
1831
|
readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
|
|
1832
|
+
readonly contentView: Locator;
|
|
1833
|
+
readonly productHeadline: Locator;
|
|
1833
1834
|
/**
|
|
1834
1835
|
* Save interactions
|
|
1835
1836
|
*/
|
|
@@ -2154,7 +2155,19 @@ declare class DataSharing implements PageObject {
|
|
|
2154
2155
|
|
|
2155
2156
|
declare class Dashboard implements PageObject {
|
|
2156
2157
|
readonly page: Page;
|
|
2158
|
+
readonly contentView: Locator;
|
|
2159
|
+
readonly adminMenuView: Locator;
|
|
2160
|
+
readonly adminMenuCatalog: Locator;
|
|
2161
|
+
readonly adminMenuOrder: Locator;
|
|
2162
|
+
readonly adminMenuCustomer: Locator;
|
|
2163
|
+
readonly adminMenuContent: Locator;
|
|
2164
|
+
readonly adminMenuMarketing: Locator;
|
|
2165
|
+
readonly adminMenuExtension: Locator;
|
|
2166
|
+
readonly adminMenuUserChevron: Locator;
|
|
2167
|
+
readonly adminMenuUserIcon: Locator;
|
|
2168
|
+
readonly adminMenuUserName: Locator;
|
|
2157
2169
|
readonly welcomeHeadline: Locator;
|
|
2170
|
+
readonly welcomeMessage: Locator;
|
|
2158
2171
|
readonly dataSharingConsentBanner: Locator;
|
|
2159
2172
|
readonly dataSharingAgreeButton: Locator;
|
|
2160
2173
|
readonly dataSharingNotAtTheMomentButton: Locator;
|
|
@@ -2162,6 +2175,8 @@ declare class Dashboard implements PageObject {
|
|
|
2162
2175
|
readonly dataSharingSettingsLink: Locator;
|
|
2163
2176
|
readonly dataSharingAcceptMessageText: Locator;
|
|
2164
2177
|
readonly dataSharingNotAtTheMomentMessageText: Locator;
|
|
2178
|
+
readonly statisticsDateRange: Locator;
|
|
2179
|
+
readonly statisticsChart: Locator;
|
|
2165
2180
|
constructor(page: Page);
|
|
2166
2181
|
url(): string;
|
|
2167
2182
|
}
|
|
@@ -2260,6 +2275,10 @@ declare class LandingPageDetail implements PageObject {
|
|
|
2260
2275
|
declare class Categories implements PageObject {
|
|
2261
2276
|
readonly page: Page;
|
|
2262
2277
|
readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
|
|
2278
|
+
/**
|
|
2279
|
+
* Visual tests
|
|
2280
|
+
*/
|
|
2281
|
+
readonly contentView: Locator;
|
|
2263
2282
|
/**
|
|
2264
2283
|
* Landing pages
|
|
2265
2284
|
*/
|
|
@@ -2276,6 +2295,13 @@ declare class Categories implements PageObject {
|
|
|
2276
2295
|
readonly confirmCategoryCreationButton: Locator;
|
|
2277
2296
|
readonly confirmCategoryCancelButton: Locator;
|
|
2278
2297
|
readonly categoryItems: Locator;
|
|
2298
|
+
/**
|
|
2299
|
+
* Tabs
|
|
2300
|
+
*/
|
|
2301
|
+
readonly generalTab: Locator;
|
|
2302
|
+
readonly productsTab: Locator;
|
|
2303
|
+
readonly layoutTab: Locator;
|
|
2304
|
+
readonly seoTab: Locator;
|
|
2279
2305
|
/**
|
|
2280
2306
|
* General
|
|
2281
2307
|
*/
|
|
@@ -2286,6 +2312,8 @@ declare class Categories implements PageObject {
|
|
|
2286
2312
|
readonly saveButton: Locator;
|
|
2287
2313
|
readonly loadingSpinner: Locator;
|
|
2288
2314
|
readonly fadingBar: Locator;
|
|
2315
|
+
readonly configureHomePageButton: Locator;
|
|
2316
|
+
readonly configureModalCancelButton: Locator;
|
|
2289
2317
|
/**
|
|
2290
2318
|
* Customisable link
|
|
2291
2319
|
*/
|
|
@@ -2567,6 +2595,14 @@ declare class CustomerBulkEdit implements PageObject {
|
|
|
2567
2595
|
url(): string;
|
|
2568
2596
|
}
|
|
2569
2597
|
|
|
2598
|
+
declare class SettingsListing implements PageObject {
|
|
2599
|
+
readonly page: Page;
|
|
2600
|
+
readonly contentView: Locator;
|
|
2601
|
+
readonly header: Locator;
|
|
2602
|
+
constructor(page: Page);
|
|
2603
|
+
url(): string;
|
|
2604
|
+
}
|
|
2605
|
+
|
|
2570
2606
|
declare class DocumentListing implements PageObject {
|
|
2571
2607
|
readonly page: Page;
|
|
2572
2608
|
readonly addDocumentButton: Locator;
|
|
@@ -2618,6 +2654,7 @@ interface AdministrationPageTypes {
|
|
|
2618
2654
|
AdminProductListing: ProductListing;
|
|
2619
2655
|
AdminProductBulkEdit: ProductBulkEdit;
|
|
2620
2656
|
AdminCustomerBulkEdit: CustomerBulkEdit;
|
|
2657
|
+
AdminSettingsListing: SettingsListing;
|
|
2621
2658
|
AdminDocumentListing: DocumentListing;
|
|
2622
2659
|
AdminDocumentDetail: DocumentDetail;
|
|
2623
2660
|
}
|
|
@@ -2655,6 +2692,7 @@ declare const AdminPageObjects: {
|
|
|
2655
2692
|
ProductListing: typeof ProductListing;
|
|
2656
2693
|
ProductBulkEdit: typeof ProductBulkEdit;
|
|
2657
2694
|
CustomerBulkEdit: typeof CustomerBulkEdit;
|
|
2695
|
+
SettingsListing: typeof SettingsListing;
|
|
2658
2696
|
DocumentListing: typeof DocumentListing;
|
|
2659
2697
|
DocumentDetail: typeof DocumentDetail;
|
|
2660
2698
|
};
|
|
@@ -2747,6 +2785,62 @@ declare const isThemeCompiled: (context: AdminApiContext, storefrontUrl: string)
|
|
|
2747
2785
|
|
|
2748
2786
|
declare function createRandomImage(width?: number, height?: number): Image;
|
|
2749
2787
|
|
|
2788
|
+
/**
|
|
2789
|
+
* Hides the given page elements using `visibility: hidden`, so they become invisible
|
|
2790
|
+
* without affecting the layout (no realignment occurs).
|
|
2791
|
+
*
|
|
2792
|
+
* @param page - Playwright page object
|
|
2793
|
+
* @param selectors - CSS selectors for elements to hide
|
|
2794
|
+
*/
|
|
2795
|
+
declare function hideElements(page: Page, selectors: (string | Locator)[]): Promise<void>;
|
|
2796
|
+
/**
|
|
2797
|
+
* Replaces the text content of selected elements with `***`.
|
|
2798
|
+
*
|
|
2799
|
+
* @param page - Playwright page object
|
|
2800
|
+
* @param selectors - CSS selectors for elements whose content to replace
|
|
2801
|
+
*/
|
|
2802
|
+
declare function replaceElements(page: Page, selectors: (string | Locator)[]): Promise<void>;
|
|
2803
|
+
/**
|
|
2804
|
+
* Calculates the ideal viewport dimensions for a Playwright test based on scrollable content,
|
|
2805
|
+
* header visibility, and optional configuration. Useful for dynamic screenshot sizing or
|
|
2806
|
+
* testing long-scrolling pages.
|
|
2807
|
+
*
|
|
2808
|
+
* This function:
|
|
2809
|
+
* - Optionally waits for a network request (`requestURL`) before continuing.
|
|
2810
|
+
* - Optionally waits for a specific locator (`waitForLocator`) to become visible.
|
|
2811
|
+
* - Measures scrollable content height (`scrollableElementVertical`) and header height.
|
|
2812
|
+
* - Measures scrollable content width (`scrollableElementHorizontal`).
|
|
2813
|
+
* - Falls back to defaults if elements are not found or inaccessible.
|
|
2814
|
+
*
|
|
2815
|
+
* @param {Page} page - The Playwright `Page` object representing the current browser tab.
|
|
2816
|
+
* @param {Options} [options] - Optional configuration to override default behavior.
|
|
2817
|
+
* @param {string} [options.requestURL] - A URL substring to wait for via `waitForResponse`.
|
|
2818
|
+
* @param {number} [options.width] - Base viewport width to use (default: 1440).
|
|
2819
|
+
* @param {string | Locator} [options.scrollableElementVertical] - Selector or Locator for vertical scroll container.
|
|
2820
|
+
* @param {string | Locator} [options.scrollableElementHorizontal] - Selector or Locator for horizontal scroll container.
|
|
2821
|
+
* @param {number} [options.additionalHeight] - Extra height to add (e.g., to avoid cut-off).
|
|
2822
|
+
* @param {string | Locator} [options.waitForSelector] - A selector or Locator to wait for visibility before measuring.
|
|
2823
|
+
* @param {number} [options.contentHeight] - Default vertical height fallback if measurement fails.
|
|
2824
|
+
* @param {number} [options.headerHeight] - Default header height fallback.
|
|
2825
|
+
* @param {string} [options.headerElement] - Selector for a header element whose height should be added if outside scrollable container.
|
|
2826
|
+
*
|
|
2827
|
+
* @returns {Promise<{ contentWidth: number; totalHeight: number }>} - A Promise resolving to the measured dimensions:
|
|
2828
|
+
* - `contentWidth`: the horizontal scroll width or fallback.
|
|
2829
|
+
* - `totalHeight`: sum of content height, header height, and any additional height.
|
|
2830
|
+
*/
|
|
2831
|
+
interface Options {
|
|
2832
|
+
requestURL?: string;
|
|
2833
|
+
width?: number;
|
|
2834
|
+
scrollableElementVertical?: string | Locator;
|
|
2835
|
+
scrollableElementHorizontal?: string | Locator;
|
|
2836
|
+
additionalHeight?: number;
|
|
2837
|
+
waitForSelector?: string | Locator;
|
|
2838
|
+
contentHeight?: number;
|
|
2839
|
+
headerHeight?: number;
|
|
2840
|
+
headerElement?: string;
|
|
2841
|
+
}
|
|
2842
|
+
declare function setViewport(page: Page, options?: Options): Promise<void>;
|
|
2843
|
+
|
|
2750
2844
|
declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArgs & _playwright_test.PlaywrightTestOptions & FixtureTypes & {
|
|
2751
2845
|
SaveProduct: Task;
|
|
2752
2846
|
} & {
|
|
@@ -2813,4 +2907,4 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
|
|
|
2813
2907
|
SelectProductFilterOption: Task;
|
|
2814
2908
|
}, _playwright_test.PlaywrightWorkerArgs & _playwright_test.PlaywrightWorkerOptions & FixtureTypes>;
|
|
2815
2909
|
|
|
2816
|
-
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 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, isSaaSInstance, isThemeCompiled, setOrderStatus, test };
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1161,8 +1161,6 @@ interface HelperFixtureTypes {
|
|
|
1161
1161
|
isSaaS: boolean;
|
|
1162
1162
|
features: FeaturesType;
|
|
1163
1163
|
};
|
|
1164
|
-
HideElementsForScreenshot: (page: Page, selectors: string[]) => Promise<void>;
|
|
1165
|
-
ReplaceElementsForScreenshot: (page: Page, selectors: string[]) => Promise<void>;
|
|
1166
1164
|
}
|
|
1167
1165
|
|
|
1168
1166
|
interface StoreBaseConfig {
|
|
@@ -1240,6 +1238,7 @@ interface PageObject {
|
|
|
1240
1238
|
|
|
1241
1239
|
declare class Home implements PageObject {
|
|
1242
1240
|
readonly page: Page;
|
|
1241
|
+
readonly categoryTitle: Locator;
|
|
1243
1242
|
readonly accountMenuButton: Locator;
|
|
1244
1243
|
readonly closeGuestSessionButton: Locator;
|
|
1245
1244
|
readonly productImages: Locator;
|
|
@@ -1830,6 +1829,8 @@ declare const StorefrontPageObjects: {
|
|
|
1830
1829
|
declare class ProductDetail implements PageObject {
|
|
1831
1830
|
readonly page: Page;
|
|
1832
1831
|
readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
|
|
1832
|
+
readonly contentView: Locator;
|
|
1833
|
+
readonly productHeadline: Locator;
|
|
1833
1834
|
/**
|
|
1834
1835
|
* Save interactions
|
|
1835
1836
|
*/
|
|
@@ -2154,7 +2155,19 @@ declare class DataSharing implements PageObject {
|
|
|
2154
2155
|
|
|
2155
2156
|
declare class Dashboard implements PageObject {
|
|
2156
2157
|
readonly page: Page;
|
|
2158
|
+
readonly contentView: Locator;
|
|
2159
|
+
readonly adminMenuView: Locator;
|
|
2160
|
+
readonly adminMenuCatalog: Locator;
|
|
2161
|
+
readonly adminMenuOrder: Locator;
|
|
2162
|
+
readonly adminMenuCustomer: Locator;
|
|
2163
|
+
readonly adminMenuContent: Locator;
|
|
2164
|
+
readonly adminMenuMarketing: Locator;
|
|
2165
|
+
readonly adminMenuExtension: Locator;
|
|
2166
|
+
readonly adminMenuUserChevron: Locator;
|
|
2167
|
+
readonly adminMenuUserIcon: Locator;
|
|
2168
|
+
readonly adminMenuUserName: Locator;
|
|
2157
2169
|
readonly welcomeHeadline: Locator;
|
|
2170
|
+
readonly welcomeMessage: Locator;
|
|
2158
2171
|
readonly dataSharingConsentBanner: Locator;
|
|
2159
2172
|
readonly dataSharingAgreeButton: Locator;
|
|
2160
2173
|
readonly dataSharingNotAtTheMomentButton: Locator;
|
|
@@ -2162,6 +2175,8 @@ declare class Dashboard implements PageObject {
|
|
|
2162
2175
|
readonly dataSharingSettingsLink: Locator;
|
|
2163
2176
|
readonly dataSharingAcceptMessageText: Locator;
|
|
2164
2177
|
readonly dataSharingNotAtTheMomentMessageText: Locator;
|
|
2178
|
+
readonly statisticsDateRange: Locator;
|
|
2179
|
+
readonly statisticsChart: Locator;
|
|
2165
2180
|
constructor(page: Page);
|
|
2166
2181
|
url(): string;
|
|
2167
2182
|
}
|
|
@@ -2260,6 +2275,10 @@ declare class LandingPageDetail implements PageObject {
|
|
|
2260
2275
|
declare class Categories implements PageObject {
|
|
2261
2276
|
readonly page: Page;
|
|
2262
2277
|
readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
|
|
2278
|
+
/**
|
|
2279
|
+
* Visual tests
|
|
2280
|
+
*/
|
|
2281
|
+
readonly contentView: Locator;
|
|
2263
2282
|
/**
|
|
2264
2283
|
* Landing pages
|
|
2265
2284
|
*/
|
|
@@ -2276,6 +2295,13 @@ declare class Categories implements PageObject {
|
|
|
2276
2295
|
readonly confirmCategoryCreationButton: Locator;
|
|
2277
2296
|
readonly confirmCategoryCancelButton: Locator;
|
|
2278
2297
|
readonly categoryItems: Locator;
|
|
2298
|
+
/**
|
|
2299
|
+
* Tabs
|
|
2300
|
+
*/
|
|
2301
|
+
readonly generalTab: Locator;
|
|
2302
|
+
readonly productsTab: Locator;
|
|
2303
|
+
readonly layoutTab: Locator;
|
|
2304
|
+
readonly seoTab: Locator;
|
|
2279
2305
|
/**
|
|
2280
2306
|
* General
|
|
2281
2307
|
*/
|
|
@@ -2286,6 +2312,8 @@ declare class Categories implements PageObject {
|
|
|
2286
2312
|
readonly saveButton: Locator;
|
|
2287
2313
|
readonly loadingSpinner: Locator;
|
|
2288
2314
|
readonly fadingBar: Locator;
|
|
2315
|
+
readonly configureHomePageButton: Locator;
|
|
2316
|
+
readonly configureModalCancelButton: Locator;
|
|
2289
2317
|
/**
|
|
2290
2318
|
* Customisable link
|
|
2291
2319
|
*/
|
|
@@ -2567,6 +2595,14 @@ declare class CustomerBulkEdit implements PageObject {
|
|
|
2567
2595
|
url(): string;
|
|
2568
2596
|
}
|
|
2569
2597
|
|
|
2598
|
+
declare class SettingsListing implements PageObject {
|
|
2599
|
+
readonly page: Page;
|
|
2600
|
+
readonly contentView: Locator;
|
|
2601
|
+
readonly header: Locator;
|
|
2602
|
+
constructor(page: Page);
|
|
2603
|
+
url(): string;
|
|
2604
|
+
}
|
|
2605
|
+
|
|
2570
2606
|
declare class DocumentListing implements PageObject {
|
|
2571
2607
|
readonly page: Page;
|
|
2572
2608
|
readonly addDocumentButton: Locator;
|
|
@@ -2618,6 +2654,7 @@ interface AdministrationPageTypes {
|
|
|
2618
2654
|
AdminProductListing: ProductListing;
|
|
2619
2655
|
AdminProductBulkEdit: ProductBulkEdit;
|
|
2620
2656
|
AdminCustomerBulkEdit: CustomerBulkEdit;
|
|
2657
|
+
AdminSettingsListing: SettingsListing;
|
|
2621
2658
|
AdminDocumentListing: DocumentListing;
|
|
2622
2659
|
AdminDocumentDetail: DocumentDetail;
|
|
2623
2660
|
}
|
|
@@ -2655,6 +2692,7 @@ declare const AdminPageObjects: {
|
|
|
2655
2692
|
ProductListing: typeof ProductListing;
|
|
2656
2693
|
ProductBulkEdit: typeof ProductBulkEdit;
|
|
2657
2694
|
CustomerBulkEdit: typeof CustomerBulkEdit;
|
|
2695
|
+
SettingsListing: typeof SettingsListing;
|
|
2658
2696
|
DocumentListing: typeof DocumentListing;
|
|
2659
2697
|
DocumentDetail: typeof DocumentDetail;
|
|
2660
2698
|
};
|
|
@@ -2747,6 +2785,62 @@ declare const isThemeCompiled: (context: AdminApiContext, storefrontUrl: string)
|
|
|
2747
2785
|
|
|
2748
2786
|
declare function createRandomImage(width?: number, height?: number): Image;
|
|
2749
2787
|
|
|
2788
|
+
/**
|
|
2789
|
+
* Hides the given page elements using `visibility: hidden`, so they become invisible
|
|
2790
|
+
* without affecting the layout (no realignment occurs).
|
|
2791
|
+
*
|
|
2792
|
+
* @param page - Playwright page object
|
|
2793
|
+
* @param selectors - CSS selectors for elements to hide
|
|
2794
|
+
*/
|
|
2795
|
+
declare function hideElements(page: Page, selectors: (string | Locator)[]): Promise<void>;
|
|
2796
|
+
/**
|
|
2797
|
+
* Replaces the text content of selected elements with `***`.
|
|
2798
|
+
*
|
|
2799
|
+
* @param page - Playwright page object
|
|
2800
|
+
* @param selectors - CSS selectors for elements whose content to replace
|
|
2801
|
+
*/
|
|
2802
|
+
declare function replaceElements(page: Page, selectors: (string | Locator)[]): Promise<void>;
|
|
2803
|
+
/**
|
|
2804
|
+
* Calculates the ideal viewport dimensions for a Playwright test based on scrollable content,
|
|
2805
|
+
* header visibility, and optional configuration. Useful for dynamic screenshot sizing or
|
|
2806
|
+
* testing long-scrolling pages.
|
|
2807
|
+
*
|
|
2808
|
+
* This function:
|
|
2809
|
+
* - Optionally waits for a network request (`requestURL`) before continuing.
|
|
2810
|
+
* - Optionally waits for a specific locator (`waitForLocator`) to become visible.
|
|
2811
|
+
* - Measures scrollable content height (`scrollableElementVertical`) and header height.
|
|
2812
|
+
* - Measures scrollable content width (`scrollableElementHorizontal`).
|
|
2813
|
+
* - Falls back to defaults if elements are not found or inaccessible.
|
|
2814
|
+
*
|
|
2815
|
+
* @param {Page} page - The Playwright `Page` object representing the current browser tab.
|
|
2816
|
+
* @param {Options} [options] - Optional configuration to override default behavior.
|
|
2817
|
+
* @param {string} [options.requestURL] - A URL substring to wait for via `waitForResponse`.
|
|
2818
|
+
* @param {number} [options.width] - Base viewport width to use (default: 1440).
|
|
2819
|
+
* @param {string | Locator} [options.scrollableElementVertical] - Selector or Locator for vertical scroll container.
|
|
2820
|
+
* @param {string | Locator} [options.scrollableElementHorizontal] - Selector or Locator for horizontal scroll container.
|
|
2821
|
+
* @param {number} [options.additionalHeight] - Extra height to add (e.g., to avoid cut-off).
|
|
2822
|
+
* @param {string | Locator} [options.waitForSelector] - A selector or Locator to wait for visibility before measuring.
|
|
2823
|
+
* @param {number} [options.contentHeight] - Default vertical height fallback if measurement fails.
|
|
2824
|
+
* @param {number} [options.headerHeight] - Default header height fallback.
|
|
2825
|
+
* @param {string} [options.headerElement] - Selector for a header element whose height should be added if outside scrollable container.
|
|
2826
|
+
*
|
|
2827
|
+
* @returns {Promise<{ contentWidth: number; totalHeight: number }>} - A Promise resolving to the measured dimensions:
|
|
2828
|
+
* - `contentWidth`: the horizontal scroll width or fallback.
|
|
2829
|
+
* - `totalHeight`: sum of content height, header height, and any additional height.
|
|
2830
|
+
*/
|
|
2831
|
+
interface Options {
|
|
2832
|
+
requestURL?: string;
|
|
2833
|
+
width?: number;
|
|
2834
|
+
scrollableElementVertical?: string | Locator;
|
|
2835
|
+
scrollableElementHorizontal?: string | Locator;
|
|
2836
|
+
additionalHeight?: number;
|
|
2837
|
+
waitForSelector?: string | Locator;
|
|
2838
|
+
contentHeight?: number;
|
|
2839
|
+
headerHeight?: number;
|
|
2840
|
+
headerElement?: string;
|
|
2841
|
+
}
|
|
2842
|
+
declare function setViewport(page: Page, options?: Options): Promise<void>;
|
|
2843
|
+
|
|
2750
2844
|
declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArgs & _playwright_test.PlaywrightTestOptions & FixtureTypes & {
|
|
2751
2845
|
SaveProduct: Task;
|
|
2752
2846
|
} & {
|
|
@@ -2813,4 +2907,4 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
|
|
|
2813
2907
|
SelectProductFilterOption: Task;
|
|
2814
2908
|
}, _playwright_test.PlaywrightWorkerArgs & _playwright_test.PlaywrightWorkerOptions & FixtureTypes>;
|
|
2815
2909
|
|
|
2816
|
-
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 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, isSaaSInstance, isThemeCompiled, setOrderStatus, test };
|
|
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 };
|