@shopware-ag/acceptance-test-suite 11.17.1 → 11.19.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 +130 -3
- package/dist/index.d.ts +130 -3
- package/dist/index.mjs +1228 -997
- 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;
|
|
@@ -1578,6 +1577,9 @@ declare class AccountOrder implements PageObject {
|
|
|
1578
1577
|
readonly dialogOrderCancel: Locator;
|
|
1579
1578
|
readonly dialogOrderCancelButton: Locator;
|
|
1580
1579
|
readonly dialogBackButton: Locator;
|
|
1580
|
+
readonly orderDetails: Locator;
|
|
1581
|
+
readonly invoiceHTML: Locator;
|
|
1582
|
+
readonly creditItem: Locator;
|
|
1581
1583
|
constructor(page: Page);
|
|
1582
1584
|
getOrderByOrderNumber(orderNumber: string): Promise<Record<string, Locator>>;
|
|
1583
1585
|
url(): string;
|
|
@@ -1827,6 +1829,8 @@ declare const StorefrontPageObjects: {
|
|
|
1827
1829
|
declare class ProductDetail implements PageObject {
|
|
1828
1830
|
readonly page: Page;
|
|
1829
1831
|
readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
|
|
1832
|
+
readonly contentView: Locator;
|
|
1833
|
+
readonly productHeadline: Locator;
|
|
1830
1834
|
/**
|
|
1831
1835
|
* Save interactions
|
|
1832
1836
|
*/
|
|
@@ -1913,7 +1917,16 @@ declare class OrderDetail implements PageObject {
|
|
|
1913
1917
|
readonly saveButton: Locator;
|
|
1914
1918
|
readonly dataGridContextButton: Locator;
|
|
1915
1919
|
readonly orderTag: Locator;
|
|
1920
|
+
readonly lineItem: Locator;
|
|
1921
|
+
readonly lineItemsTable: Locator;
|
|
1922
|
+
readonly documentType: Locator;
|
|
1923
|
+
readonly contextMenuButton: Locator;
|
|
1924
|
+
readonly contextMenu: Locator;
|
|
1925
|
+
readonly contextMenuSendDocument: Locator;
|
|
1926
|
+
readonly sendDocumentModal: Locator;
|
|
1927
|
+
readonly sendDocumentButton: Locator;
|
|
1916
1928
|
readonly itemsCardHeader: Locator;
|
|
1929
|
+
readonly sentCheckmark: Locator;
|
|
1917
1930
|
/**
|
|
1918
1931
|
* Tabs
|
|
1919
1932
|
*/
|
|
@@ -2142,7 +2155,19 @@ declare class DataSharing implements PageObject {
|
|
|
2142
2155
|
|
|
2143
2156
|
declare class Dashboard implements PageObject {
|
|
2144
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;
|
|
2145
2169
|
readonly welcomeHeadline: Locator;
|
|
2170
|
+
readonly welcomeMessage: Locator;
|
|
2146
2171
|
readonly dataSharingConsentBanner: Locator;
|
|
2147
2172
|
readonly dataSharingAgreeButton: Locator;
|
|
2148
2173
|
readonly dataSharingNotAtTheMomentButton: Locator;
|
|
@@ -2150,6 +2175,8 @@ declare class Dashboard implements PageObject {
|
|
|
2150
2175
|
readonly dataSharingSettingsLink: Locator;
|
|
2151
2176
|
readonly dataSharingAcceptMessageText: Locator;
|
|
2152
2177
|
readonly dataSharingNotAtTheMomentMessageText: Locator;
|
|
2178
|
+
readonly statisticsDateRange: Locator;
|
|
2179
|
+
readonly statisticsChart: Locator;
|
|
2153
2180
|
constructor(page: Page);
|
|
2154
2181
|
url(): string;
|
|
2155
2182
|
}
|
|
@@ -2248,6 +2275,10 @@ declare class LandingPageDetail implements PageObject {
|
|
|
2248
2275
|
declare class Categories implements PageObject {
|
|
2249
2276
|
readonly page: Page;
|
|
2250
2277
|
readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
|
|
2278
|
+
/**
|
|
2279
|
+
* Visual tests
|
|
2280
|
+
*/
|
|
2281
|
+
readonly contentView: Locator;
|
|
2251
2282
|
/**
|
|
2252
2283
|
* Landing pages
|
|
2253
2284
|
*/
|
|
@@ -2264,6 +2295,13 @@ declare class Categories implements PageObject {
|
|
|
2264
2295
|
readonly confirmCategoryCreationButton: Locator;
|
|
2265
2296
|
readonly confirmCategoryCancelButton: Locator;
|
|
2266
2297
|
readonly categoryItems: Locator;
|
|
2298
|
+
/**
|
|
2299
|
+
* Tabs
|
|
2300
|
+
*/
|
|
2301
|
+
readonly generalTab: Locator;
|
|
2302
|
+
readonly productsTab: Locator;
|
|
2303
|
+
readonly layoutTab: Locator;
|
|
2304
|
+
readonly seoTab: Locator;
|
|
2267
2305
|
/**
|
|
2268
2306
|
* General
|
|
2269
2307
|
*/
|
|
@@ -2274,6 +2312,8 @@ declare class Categories implements PageObject {
|
|
|
2274
2312
|
readonly saveButton: Locator;
|
|
2275
2313
|
readonly loadingSpinner: Locator;
|
|
2276
2314
|
readonly fadingBar: Locator;
|
|
2315
|
+
readonly configureHomePageButton: Locator;
|
|
2316
|
+
readonly configureModalCancelButton: Locator;
|
|
2277
2317
|
/**
|
|
2278
2318
|
* Customisable link
|
|
2279
2319
|
*/
|
|
@@ -2555,6 +2595,31 @@ declare class CustomerBulkEdit implements PageObject {
|
|
|
2555
2595
|
url(): string;
|
|
2556
2596
|
}
|
|
2557
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
|
+
|
|
2606
|
+
declare class DocumentListing implements PageObject {
|
|
2607
|
+
readonly page: Page;
|
|
2608
|
+
readonly addDocumentButton: Locator;
|
|
2609
|
+
readonly invoiceLink: Locator;
|
|
2610
|
+
constructor(page: Page);
|
|
2611
|
+
url(): string;
|
|
2612
|
+
}
|
|
2613
|
+
|
|
2614
|
+
declare class DocumentDetail implements PageObject {
|
|
2615
|
+
readonly page: Page;
|
|
2616
|
+
readonly showInAccountSwitch: Locator;
|
|
2617
|
+
readonly saveButton: Locator;
|
|
2618
|
+
readonly documentTypeSelect: Locator;
|
|
2619
|
+
constructor(page: Page);
|
|
2620
|
+
url(documentId: string): string;
|
|
2621
|
+
}
|
|
2622
|
+
|
|
2558
2623
|
interface AdministrationPageTypes {
|
|
2559
2624
|
AdminProductDetail: ProductDetail;
|
|
2560
2625
|
AdminOrderDetail: OrderDetail;
|
|
@@ -2589,6 +2654,9 @@ interface AdministrationPageTypes {
|
|
|
2589
2654
|
AdminProductListing: ProductListing;
|
|
2590
2655
|
AdminProductBulkEdit: ProductBulkEdit;
|
|
2591
2656
|
AdminCustomerBulkEdit: CustomerBulkEdit;
|
|
2657
|
+
AdminSettingsListing: SettingsListing;
|
|
2658
|
+
AdminDocumentListing: DocumentListing;
|
|
2659
|
+
AdminDocumentDetail: DocumentDetail;
|
|
2592
2660
|
}
|
|
2593
2661
|
declare const AdminPageObjects: {
|
|
2594
2662
|
ProductDetail: typeof ProductDetail;
|
|
@@ -2624,6 +2692,9 @@ declare const AdminPageObjects: {
|
|
|
2624
2692
|
ProductListing: typeof ProductListing;
|
|
2625
2693
|
ProductBulkEdit: typeof ProductBulkEdit;
|
|
2626
2694
|
CustomerBulkEdit: typeof CustomerBulkEdit;
|
|
2695
|
+
SettingsListing: typeof SettingsListing;
|
|
2696
|
+
DocumentListing: typeof DocumentListing;
|
|
2697
|
+
DocumentDetail: typeof DocumentDetail;
|
|
2627
2698
|
};
|
|
2628
2699
|
|
|
2629
2700
|
interface DataFixtureTypes {
|
|
@@ -2714,6 +2785,62 @@ declare const isThemeCompiled: (context: AdminApiContext, storefrontUrl: string)
|
|
|
2714
2785
|
|
|
2715
2786
|
declare function createRandomImage(width?: number, height?: number): Image;
|
|
2716
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
|
+
|
|
2717
2844
|
declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArgs & _playwright_test.PlaywrightTestOptions & FixtureTypes & {
|
|
2718
2845
|
SaveProduct: Task;
|
|
2719
2846
|
} & {
|
|
@@ -2780,4 +2907,4 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
|
|
|
2780
2907
|
SelectProductFilterOption: Task;
|
|
2781
2908
|
}, _playwright_test.PlaywrightWorkerArgs & _playwright_test.PlaywrightWorkerOptions & FixtureTypes>;
|
|
2782
2909
|
|
|
2783
|
-
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;
|
|
@@ -1578,6 +1577,9 @@ declare class AccountOrder implements PageObject {
|
|
|
1578
1577
|
readonly dialogOrderCancel: Locator;
|
|
1579
1578
|
readonly dialogOrderCancelButton: Locator;
|
|
1580
1579
|
readonly dialogBackButton: Locator;
|
|
1580
|
+
readonly orderDetails: Locator;
|
|
1581
|
+
readonly invoiceHTML: Locator;
|
|
1582
|
+
readonly creditItem: Locator;
|
|
1581
1583
|
constructor(page: Page);
|
|
1582
1584
|
getOrderByOrderNumber(orderNumber: string): Promise<Record<string, Locator>>;
|
|
1583
1585
|
url(): string;
|
|
@@ -1827,6 +1829,8 @@ declare const StorefrontPageObjects: {
|
|
|
1827
1829
|
declare class ProductDetail implements PageObject {
|
|
1828
1830
|
readonly page: Page;
|
|
1829
1831
|
readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
|
|
1832
|
+
readonly contentView: Locator;
|
|
1833
|
+
readonly productHeadline: Locator;
|
|
1830
1834
|
/**
|
|
1831
1835
|
* Save interactions
|
|
1832
1836
|
*/
|
|
@@ -1913,7 +1917,16 @@ declare class OrderDetail implements PageObject {
|
|
|
1913
1917
|
readonly saveButton: Locator;
|
|
1914
1918
|
readonly dataGridContextButton: Locator;
|
|
1915
1919
|
readonly orderTag: Locator;
|
|
1920
|
+
readonly lineItem: Locator;
|
|
1921
|
+
readonly lineItemsTable: Locator;
|
|
1922
|
+
readonly documentType: Locator;
|
|
1923
|
+
readonly contextMenuButton: Locator;
|
|
1924
|
+
readonly contextMenu: Locator;
|
|
1925
|
+
readonly contextMenuSendDocument: Locator;
|
|
1926
|
+
readonly sendDocumentModal: Locator;
|
|
1927
|
+
readonly sendDocumentButton: Locator;
|
|
1916
1928
|
readonly itemsCardHeader: Locator;
|
|
1929
|
+
readonly sentCheckmark: Locator;
|
|
1917
1930
|
/**
|
|
1918
1931
|
* Tabs
|
|
1919
1932
|
*/
|
|
@@ -2142,7 +2155,19 @@ declare class DataSharing implements PageObject {
|
|
|
2142
2155
|
|
|
2143
2156
|
declare class Dashboard implements PageObject {
|
|
2144
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;
|
|
2145
2169
|
readonly welcomeHeadline: Locator;
|
|
2170
|
+
readonly welcomeMessage: Locator;
|
|
2146
2171
|
readonly dataSharingConsentBanner: Locator;
|
|
2147
2172
|
readonly dataSharingAgreeButton: Locator;
|
|
2148
2173
|
readonly dataSharingNotAtTheMomentButton: Locator;
|
|
@@ -2150,6 +2175,8 @@ declare class Dashboard implements PageObject {
|
|
|
2150
2175
|
readonly dataSharingSettingsLink: Locator;
|
|
2151
2176
|
readonly dataSharingAcceptMessageText: Locator;
|
|
2152
2177
|
readonly dataSharingNotAtTheMomentMessageText: Locator;
|
|
2178
|
+
readonly statisticsDateRange: Locator;
|
|
2179
|
+
readonly statisticsChart: Locator;
|
|
2153
2180
|
constructor(page: Page);
|
|
2154
2181
|
url(): string;
|
|
2155
2182
|
}
|
|
@@ -2248,6 +2275,10 @@ declare class LandingPageDetail implements PageObject {
|
|
|
2248
2275
|
declare class Categories implements PageObject {
|
|
2249
2276
|
readonly page: Page;
|
|
2250
2277
|
readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
|
|
2278
|
+
/**
|
|
2279
|
+
* Visual tests
|
|
2280
|
+
*/
|
|
2281
|
+
readonly contentView: Locator;
|
|
2251
2282
|
/**
|
|
2252
2283
|
* Landing pages
|
|
2253
2284
|
*/
|
|
@@ -2264,6 +2295,13 @@ declare class Categories implements PageObject {
|
|
|
2264
2295
|
readonly confirmCategoryCreationButton: Locator;
|
|
2265
2296
|
readonly confirmCategoryCancelButton: Locator;
|
|
2266
2297
|
readonly categoryItems: Locator;
|
|
2298
|
+
/**
|
|
2299
|
+
* Tabs
|
|
2300
|
+
*/
|
|
2301
|
+
readonly generalTab: Locator;
|
|
2302
|
+
readonly productsTab: Locator;
|
|
2303
|
+
readonly layoutTab: Locator;
|
|
2304
|
+
readonly seoTab: Locator;
|
|
2267
2305
|
/**
|
|
2268
2306
|
* General
|
|
2269
2307
|
*/
|
|
@@ -2274,6 +2312,8 @@ declare class Categories implements PageObject {
|
|
|
2274
2312
|
readonly saveButton: Locator;
|
|
2275
2313
|
readonly loadingSpinner: Locator;
|
|
2276
2314
|
readonly fadingBar: Locator;
|
|
2315
|
+
readonly configureHomePageButton: Locator;
|
|
2316
|
+
readonly configureModalCancelButton: Locator;
|
|
2277
2317
|
/**
|
|
2278
2318
|
* Customisable link
|
|
2279
2319
|
*/
|
|
@@ -2555,6 +2595,31 @@ declare class CustomerBulkEdit implements PageObject {
|
|
|
2555
2595
|
url(): string;
|
|
2556
2596
|
}
|
|
2557
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
|
+
|
|
2606
|
+
declare class DocumentListing implements PageObject {
|
|
2607
|
+
readonly page: Page;
|
|
2608
|
+
readonly addDocumentButton: Locator;
|
|
2609
|
+
readonly invoiceLink: Locator;
|
|
2610
|
+
constructor(page: Page);
|
|
2611
|
+
url(): string;
|
|
2612
|
+
}
|
|
2613
|
+
|
|
2614
|
+
declare class DocumentDetail implements PageObject {
|
|
2615
|
+
readonly page: Page;
|
|
2616
|
+
readonly showInAccountSwitch: Locator;
|
|
2617
|
+
readonly saveButton: Locator;
|
|
2618
|
+
readonly documentTypeSelect: Locator;
|
|
2619
|
+
constructor(page: Page);
|
|
2620
|
+
url(documentId: string): string;
|
|
2621
|
+
}
|
|
2622
|
+
|
|
2558
2623
|
interface AdministrationPageTypes {
|
|
2559
2624
|
AdminProductDetail: ProductDetail;
|
|
2560
2625
|
AdminOrderDetail: OrderDetail;
|
|
@@ -2589,6 +2654,9 @@ interface AdministrationPageTypes {
|
|
|
2589
2654
|
AdminProductListing: ProductListing;
|
|
2590
2655
|
AdminProductBulkEdit: ProductBulkEdit;
|
|
2591
2656
|
AdminCustomerBulkEdit: CustomerBulkEdit;
|
|
2657
|
+
AdminSettingsListing: SettingsListing;
|
|
2658
|
+
AdminDocumentListing: DocumentListing;
|
|
2659
|
+
AdminDocumentDetail: DocumentDetail;
|
|
2592
2660
|
}
|
|
2593
2661
|
declare const AdminPageObjects: {
|
|
2594
2662
|
ProductDetail: typeof ProductDetail;
|
|
@@ -2624,6 +2692,9 @@ declare const AdminPageObjects: {
|
|
|
2624
2692
|
ProductListing: typeof ProductListing;
|
|
2625
2693
|
ProductBulkEdit: typeof ProductBulkEdit;
|
|
2626
2694
|
CustomerBulkEdit: typeof CustomerBulkEdit;
|
|
2695
|
+
SettingsListing: typeof SettingsListing;
|
|
2696
|
+
DocumentListing: typeof DocumentListing;
|
|
2697
|
+
DocumentDetail: typeof DocumentDetail;
|
|
2627
2698
|
};
|
|
2628
2699
|
|
|
2629
2700
|
interface DataFixtureTypes {
|
|
@@ -2714,6 +2785,62 @@ declare const isThemeCompiled: (context: AdminApiContext, storefrontUrl: string)
|
|
|
2714
2785
|
|
|
2715
2786
|
declare function createRandomImage(width?: number, height?: number): Image;
|
|
2716
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
|
+
|
|
2717
2844
|
declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArgs & _playwright_test.PlaywrightTestOptions & FixtureTypes & {
|
|
2718
2845
|
SaveProduct: Task;
|
|
2719
2846
|
} & {
|
|
@@ -2780,4 +2907,4 @@ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArg
|
|
|
2780
2907
|
SelectProductFilterOption: Task;
|
|
2781
2908
|
}, _playwright_test.PlaywrightWorkerArgs & _playwright_test.PlaywrightWorkerOptions & FixtureTypes>;
|
|
2782
2909
|
|
|
2783
|
-
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 };
|