@shopware-ag/acceptance-test-suite 11.34.1 → 11.36.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 CHANGED
@@ -8,6 +8,14 @@ export { APIRequestContext, APIResponse, BrowserContext, Locator, Page, Request
8
8
  import { components } from '@shopware/api-client/admin-api-types';
9
9
  import { Image } from 'image-js';
10
10
 
11
+ declare global {
12
+ namespace PlaywrightTest {
13
+ interface Matchers<R> {
14
+ toHaveVisibleFocus(): Promise<R>;
15
+ }
16
+ }
17
+ }
18
+
11
19
  interface RequestOptions$1<PAYLOAD> {
12
20
  [key: string]: unknown;
13
21
  data?: PAYLOAD;
@@ -20,16 +28,20 @@ interface AdminApiContextOptions {
20
28
  admin_username?: string;
21
29
  admin_password?: string;
22
30
  ignoreHTTPSErrors?: boolean;
31
+ authMaxRetries?: number;
32
+ authBaseDelayMs?: number;
23
33
  }
24
34
  declare class AdminApiContext {
25
35
  context: APIRequestContext;
26
- readonly options: AdminApiContextOptions;
36
+ readonly options: Required<AdminApiContextOptions>;
27
37
  private static readonly defaultOptions;
28
- constructor(context: APIRequestContext, options: AdminApiContextOptions);
29
- static create(options?: AdminApiContextOptions): Promise<AdminApiContext>;
38
+ constructor(context: APIRequestContext, options: Required<AdminApiContextOptions>);
39
+ static create(options?: Required<AdminApiContextOptions>): Promise<AdminApiContext>;
30
40
  private static createApiRequestContext;
31
- static authenticateWithClientCredentials(context: APIRequestContext, options: AdminApiContextOptions): Promise<string>;
32
- static authenticateWithUserPassword(context: APIRequestContext, options: AdminApiContextOptions): Promise<string>;
41
+ private static authenticateWithRetry;
42
+ static authenticateWithClientCredentials(context: APIRequestContext, options: Required<AdminApiContextOptions>): Promise<string>;
43
+ static authenticateWithUserPassword(context: APIRequestContext, options: Required<AdminApiContextOptions>): Promise<string>;
44
+ private reauthenticate;
33
45
  isAuthenticated(): boolean;
34
46
  refreshAccessToken(): Promise<void>;
35
47
  get<PAYLOAD>(url: string, options?: RequestOptions$1<PAYLOAD>): Promise<APIResponse>;
@@ -189,6 +201,7 @@ interface TaxRules {
189
201
  }
190
202
  type Order = Omit<components['schemas']['Order'], 'deliveries' | 'price'> & {
191
203
  id: string;
204
+ orderNumber: string;
192
205
  orderCustomer: {
193
206
  firstName: string;
194
207
  lastName: string;
@@ -1460,6 +1473,10 @@ declare const BUNDLED_RESOURCES: {
1460
1473
  userMenu: {
1461
1474
  logout: string;
1462
1475
  };
1476
+ order: {
1477
+ orderTitle: string;
1478
+ orderOverview: string;
1479
+ };
1463
1480
  };
1464
1481
  readonly 'administration/manufacturer': {
1465
1482
  listing: {
@@ -1497,6 +1514,17 @@ declare const BUNDLED_RESOURCES: {
1497
1514
  details: string;
1498
1515
  documents: string;
1499
1516
  };
1517
+ listing: {
1518
+ addOrder: string;
1519
+ };
1520
+ actions: {
1521
+ view: string;
1522
+ delete: string;
1523
+ cancel: string;
1524
+ };
1525
+ dialogs: {
1526
+ warning: string;
1527
+ };
1500
1528
  };
1501
1529
  readonly 'administration/payment': {
1502
1530
  common: {
@@ -2191,6 +2219,10 @@ declare const BUNDLED_RESOURCES: {
2191
2219
  userMenu: {
2192
2220
  logout: string;
2193
2221
  };
2222
+ order: {
2223
+ orderTitle: string;
2224
+ orderOverview: string;
2225
+ };
2194
2226
  };
2195
2227
  readonly 'administration/dataSharing': {
2196
2228
  buttons: {
@@ -2384,6 +2416,17 @@ declare const BUNDLED_RESOURCES: {
2384
2416
  details: string;
2385
2417
  documents: string;
2386
2418
  };
2419
+ listing: {
2420
+ addOrder: string;
2421
+ };
2422
+ actions: {
2423
+ view: string;
2424
+ delete: string;
2425
+ cancel: string;
2426
+ };
2427
+ dialogs: {
2428
+ warning: string;
2429
+ };
2387
2430
  };
2388
2431
  readonly 'administration/payment': {
2389
2432
  common: {
@@ -3228,6 +3271,10 @@ declare const baseNamespaces: {
3228
3271
  userMenu: {
3229
3272
  logout: string;
3230
3273
  };
3274
+ order: {
3275
+ orderTitle: string;
3276
+ orderOverview: string;
3277
+ };
3231
3278
  };
3232
3279
  readonly manufacturer: {
3233
3280
  listing: {
@@ -3265,6 +3312,17 @@ declare const baseNamespaces: {
3265
3312
  details: string;
3266
3313
  documents: string;
3267
3314
  };
3315
+ listing: {
3316
+ addOrder: string;
3317
+ };
3318
+ actions: {
3319
+ view: string;
3320
+ delete: string;
3321
+ cancel: string;
3322
+ };
3323
+ dialogs: {
3324
+ warning: string;
3325
+ };
3268
3326
  };
3269
3327
  readonly payment: {
3270
3328
  common: {
@@ -3932,6 +3990,10 @@ declare class Actor {
3932
3990
  baseURL: string | undefined;
3933
3991
  constructor(name: string, page: Page, baseURL?: string);
3934
3992
  expects: playwright_test.Expect<{}>;
3993
+ a11y_checks(locator: Locator): Promise<void>;
3994
+ fillsIn(locator: Locator, input: string): Promise<void>;
3995
+ presses(locator: Locator, key?: string): Promise<void>;
3996
+ selectsRadioButton(radioGroup: Locator, inputLabel: string): Promise<void>;
3935
3997
  attemptsTo(task: () => Promise<void>): Promise<void>;
3936
3998
  goesTo(url: string, forceReload?: boolean): Promise<void>;
3937
3999
  private camelCaseToLowerCase;
@@ -4193,6 +4255,7 @@ declare class CustomerDetail implements PageObject {
4193
4255
  readonly tagItems: Locator;
4194
4256
  readonly page: Page;
4195
4257
  readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
4258
+ readonly customerEmail: Locator;
4196
4259
  constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
4197
4260
  getCustomFieldSetCardContentByName(customFieldSetName: string): Promise<Record<string, Locator>>;
4198
4261
  getCustomerGroupAlert(customerGroup: string): Promise<Locator>;
@@ -4413,6 +4476,7 @@ declare class Dashboard implements PageObject {
4413
4476
  readonly adminMenuView: Locator;
4414
4477
  readonly adminMenuCatalog: Locator;
4415
4478
  readonly adminMenuOrder: Locator;
4479
+ readonly adminMenuOrderOverview: Locator;
4416
4480
  readonly adminMenuCustomer: Locator;
4417
4481
  readonly adminMenuContent: Locator;
4418
4482
  readonly adminMenuMarketing: Locator;
@@ -5101,6 +5165,32 @@ declare class SalesChannelDetail implements PageObject {
5101
5165
  url(salesChannelId: string): string;
5102
5166
  }
5103
5167
 
5168
+ declare class OrderListing implements PageObject {
5169
+ readonly addOrderButton: Locator;
5170
+ readonly orderRows: Locator;
5171
+ readonly page: Page;
5172
+ readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
5173
+ constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
5174
+ getLineItemByOrderNumber(orderNumber: string): Promise<{
5175
+ orderNumberText: Locator;
5176
+ orderCustomerNameText: Locator;
5177
+ orderDeliveryAddressText: Locator;
5178
+ orderTotalAmountText: Locator;
5179
+ orderStateText: Locator;
5180
+ orderPaymentStateText: Locator;
5181
+ orderDeliveryStateText: Locator;
5182
+ orderDateText: Locator;
5183
+ orderCheckbox: Locator;
5184
+ orderContextButton: Locator;
5185
+ orderViewButton: Locator;
5186
+ orderDeleteButton: Locator;
5187
+ warningDialog: Locator;
5188
+ warningDialogCancelButton: Locator;
5189
+ warningDialogDeleteButton: Locator;
5190
+ }>;
5191
+ url(): string;
5192
+ }
5193
+
5104
5194
  interface AdministrationPageTypes {
5105
5195
  AdminProductDetail: ProductDetail$1;
5106
5196
  AdminOrderDetail: OrderDetail;
@@ -5151,6 +5241,7 @@ interface AdministrationPageTypes {
5151
5241
  AdminLayoutListing: LayoutListing;
5152
5242
  AdminListingPageLayoutDetail: ListingPageLayoutDetail;
5153
5243
  AdminLayoutCreate: LayoutCreate;
5244
+ AdminOrderListing: OrderListing;
5154
5245
  }
5155
5246
  declare const AdminPageObjects: {
5156
5247
  ProductDetail: typeof ProductDetail$1;
@@ -5202,6 +5293,7 @@ declare const AdminPageObjects: {
5202
5293
  LayoutListing: typeof LayoutListing;
5203
5294
  ListingPageLayoutDetail: typeof ListingPageLayoutDetail;
5204
5295
  LayoutCreate: typeof LayoutCreate;
5296
+ OrderListing: typeof OrderListing;
5205
5297
  };
5206
5298
 
5207
5299
  interface DataFixtureTypes {
package/dist/index.d.ts CHANGED
@@ -8,6 +8,14 @@ export { APIRequestContext, APIResponse, BrowserContext, Locator, Page, Request
8
8
  import { components } from '@shopware/api-client/admin-api-types';
9
9
  import { Image } from 'image-js';
10
10
 
11
+ declare global {
12
+ namespace PlaywrightTest {
13
+ interface Matchers<R> {
14
+ toHaveVisibleFocus(): Promise<R>;
15
+ }
16
+ }
17
+ }
18
+
11
19
  interface RequestOptions$1<PAYLOAD> {
12
20
  [key: string]: unknown;
13
21
  data?: PAYLOAD;
@@ -20,16 +28,20 @@ interface AdminApiContextOptions {
20
28
  admin_username?: string;
21
29
  admin_password?: string;
22
30
  ignoreHTTPSErrors?: boolean;
31
+ authMaxRetries?: number;
32
+ authBaseDelayMs?: number;
23
33
  }
24
34
  declare class AdminApiContext {
25
35
  context: APIRequestContext;
26
- readonly options: AdminApiContextOptions;
36
+ readonly options: Required<AdminApiContextOptions>;
27
37
  private static readonly defaultOptions;
28
- constructor(context: APIRequestContext, options: AdminApiContextOptions);
29
- static create(options?: AdminApiContextOptions): Promise<AdminApiContext>;
38
+ constructor(context: APIRequestContext, options: Required<AdminApiContextOptions>);
39
+ static create(options?: Required<AdminApiContextOptions>): Promise<AdminApiContext>;
30
40
  private static createApiRequestContext;
31
- static authenticateWithClientCredentials(context: APIRequestContext, options: AdminApiContextOptions): Promise<string>;
32
- static authenticateWithUserPassword(context: APIRequestContext, options: AdminApiContextOptions): Promise<string>;
41
+ private static authenticateWithRetry;
42
+ static authenticateWithClientCredentials(context: APIRequestContext, options: Required<AdminApiContextOptions>): Promise<string>;
43
+ static authenticateWithUserPassword(context: APIRequestContext, options: Required<AdminApiContextOptions>): Promise<string>;
44
+ private reauthenticate;
33
45
  isAuthenticated(): boolean;
34
46
  refreshAccessToken(): Promise<void>;
35
47
  get<PAYLOAD>(url: string, options?: RequestOptions$1<PAYLOAD>): Promise<APIResponse>;
@@ -189,6 +201,7 @@ interface TaxRules {
189
201
  }
190
202
  type Order = Omit<components['schemas']['Order'], 'deliveries' | 'price'> & {
191
203
  id: string;
204
+ orderNumber: string;
192
205
  orderCustomer: {
193
206
  firstName: string;
194
207
  lastName: string;
@@ -1460,6 +1473,10 @@ declare const BUNDLED_RESOURCES: {
1460
1473
  userMenu: {
1461
1474
  logout: string;
1462
1475
  };
1476
+ order: {
1477
+ orderTitle: string;
1478
+ orderOverview: string;
1479
+ };
1463
1480
  };
1464
1481
  readonly 'administration/manufacturer': {
1465
1482
  listing: {
@@ -1497,6 +1514,17 @@ declare const BUNDLED_RESOURCES: {
1497
1514
  details: string;
1498
1515
  documents: string;
1499
1516
  };
1517
+ listing: {
1518
+ addOrder: string;
1519
+ };
1520
+ actions: {
1521
+ view: string;
1522
+ delete: string;
1523
+ cancel: string;
1524
+ };
1525
+ dialogs: {
1526
+ warning: string;
1527
+ };
1500
1528
  };
1501
1529
  readonly 'administration/payment': {
1502
1530
  common: {
@@ -2191,6 +2219,10 @@ declare const BUNDLED_RESOURCES: {
2191
2219
  userMenu: {
2192
2220
  logout: string;
2193
2221
  };
2222
+ order: {
2223
+ orderTitle: string;
2224
+ orderOverview: string;
2225
+ };
2194
2226
  };
2195
2227
  readonly 'administration/dataSharing': {
2196
2228
  buttons: {
@@ -2384,6 +2416,17 @@ declare const BUNDLED_RESOURCES: {
2384
2416
  details: string;
2385
2417
  documents: string;
2386
2418
  };
2419
+ listing: {
2420
+ addOrder: string;
2421
+ };
2422
+ actions: {
2423
+ view: string;
2424
+ delete: string;
2425
+ cancel: string;
2426
+ };
2427
+ dialogs: {
2428
+ warning: string;
2429
+ };
2387
2430
  };
2388
2431
  readonly 'administration/payment': {
2389
2432
  common: {
@@ -3228,6 +3271,10 @@ declare const baseNamespaces: {
3228
3271
  userMenu: {
3229
3272
  logout: string;
3230
3273
  };
3274
+ order: {
3275
+ orderTitle: string;
3276
+ orderOverview: string;
3277
+ };
3231
3278
  };
3232
3279
  readonly manufacturer: {
3233
3280
  listing: {
@@ -3265,6 +3312,17 @@ declare const baseNamespaces: {
3265
3312
  details: string;
3266
3313
  documents: string;
3267
3314
  };
3315
+ listing: {
3316
+ addOrder: string;
3317
+ };
3318
+ actions: {
3319
+ view: string;
3320
+ delete: string;
3321
+ cancel: string;
3322
+ };
3323
+ dialogs: {
3324
+ warning: string;
3325
+ };
3268
3326
  };
3269
3327
  readonly payment: {
3270
3328
  common: {
@@ -3932,6 +3990,10 @@ declare class Actor {
3932
3990
  baseURL: string | undefined;
3933
3991
  constructor(name: string, page: Page, baseURL?: string);
3934
3992
  expects: playwright_test.Expect<{}>;
3993
+ a11y_checks(locator: Locator): Promise<void>;
3994
+ fillsIn(locator: Locator, input: string): Promise<void>;
3995
+ presses(locator: Locator, key?: string): Promise<void>;
3996
+ selectsRadioButton(radioGroup: Locator, inputLabel: string): Promise<void>;
3935
3997
  attemptsTo(task: () => Promise<void>): Promise<void>;
3936
3998
  goesTo(url: string, forceReload?: boolean): Promise<void>;
3937
3999
  private camelCaseToLowerCase;
@@ -4193,6 +4255,7 @@ declare class CustomerDetail implements PageObject {
4193
4255
  readonly tagItems: Locator;
4194
4256
  readonly page: Page;
4195
4257
  readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
4258
+ readonly customerEmail: Locator;
4196
4259
  constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
4197
4260
  getCustomFieldSetCardContentByName(customFieldSetName: string): Promise<Record<string, Locator>>;
4198
4261
  getCustomerGroupAlert(customerGroup: string): Promise<Locator>;
@@ -4413,6 +4476,7 @@ declare class Dashboard implements PageObject {
4413
4476
  readonly adminMenuView: Locator;
4414
4477
  readonly adminMenuCatalog: Locator;
4415
4478
  readonly adminMenuOrder: Locator;
4479
+ readonly adminMenuOrderOverview: Locator;
4416
4480
  readonly adminMenuCustomer: Locator;
4417
4481
  readonly adminMenuContent: Locator;
4418
4482
  readonly adminMenuMarketing: Locator;
@@ -5101,6 +5165,32 @@ declare class SalesChannelDetail implements PageObject {
5101
5165
  url(salesChannelId: string): string;
5102
5166
  }
5103
5167
 
5168
+ declare class OrderListing implements PageObject {
5169
+ readonly addOrderButton: Locator;
5170
+ readonly orderRows: Locator;
5171
+ readonly page: Page;
5172
+ readonly instanceMeta: HelperFixtureTypes['InstanceMeta'];
5173
+ constructor(page: Page, instanceMeta: HelperFixtureTypes['InstanceMeta']);
5174
+ getLineItemByOrderNumber(orderNumber: string): Promise<{
5175
+ orderNumberText: Locator;
5176
+ orderCustomerNameText: Locator;
5177
+ orderDeliveryAddressText: Locator;
5178
+ orderTotalAmountText: Locator;
5179
+ orderStateText: Locator;
5180
+ orderPaymentStateText: Locator;
5181
+ orderDeliveryStateText: Locator;
5182
+ orderDateText: Locator;
5183
+ orderCheckbox: Locator;
5184
+ orderContextButton: Locator;
5185
+ orderViewButton: Locator;
5186
+ orderDeleteButton: Locator;
5187
+ warningDialog: Locator;
5188
+ warningDialogCancelButton: Locator;
5189
+ warningDialogDeleteButton: Locator;
5190
+ }>;
5191
+ url(): string;
5192
+ }
5193
+
5104
5194
  interface AdministrationPageTypes {
5105
5195
  AdminProductDetail: ProductDetail$1;
5106
5196
  AdminOrderDetail: OrderDetail;
@@ -5151,6 +5241,7 @@ interface AdministrationPageTypes {
5151
5241
  AdminLayoutListing: LayoutListing;
5152
5242
  AdminListingPageLayoutDetail: ListingPageLayoutDetail;
5153
5243
  AdminLayoutCreate: LayoutCreate;
5244
+ AdminOrderListing: OrderListing;
5154
5245
  }
5155
5246
  declare const AdminPageObjects: {
5156
5247
  ProductDetail: typeof ProductDetail$1;
@@ -5202,6 +5293,7 @@ declare const AdminPageObjects: {
5202
5293
  LayoutListing: typeof LayoutListing;
5203
5294
  ListingPageLayoutDetail: typeof ListingPageLayoutDetail;
5204
5295
  LayoutCreate: typeof LayoutCreate;
5296
+ OrderListing: typeof OrderListing;
5205
5297
  };
5206
5298
 
5207
5299
  interface DataFixtureTypes {
package/dist/index.mjs CHANGED
@@ -161,20 +161,29 @@ class AdminApiContext {
161
161
  context;
162
162
  options;
163
163
  static defaultOptions = {
164
- app_url: process.env["ADMIN_API_URL"] || process.env["APP_URL"],
165
- client_id: process.env["SHOPWARE_ACCESS_KEY_ID"],
166
- client_secret: process.env["SHOPWARE_SECRET_ACCESS_KEY"],
164
+ app_url: process.env["ADMIN_API_URL"] || process.env["APP_URL"] || "http://localhost:8000",
165
+ client_id: process.env["SHOPWARE_ACCESS_KEY_ID"] ?? "",
166
+ client_secret: process.env["SHOPWARE_SECRET_ACCESS_KEY"] ?? "",
167
167
  admin_username: process.env["SHOPWARE_ADMIN_USERNAME"] || "admin",
168
168
  admin_password: process.env["SHOPWARE_ADMIN_PASSWORD"] || "shopware",
169
- ignoreHTTPSErrors: true
169
+ ignoreHTTPSErrors: true,
170
+ authMaxRetries: 2,
171
+ authBaseDelayMs: 250,
172
+ access_token: ""
170
173
  };
171
174
  constructor(context, options) {
172
175
  this.context = context;
173
176
  this.options = options;
174
177
  }
175
178
  static async create(options) {
176
- const contextOptions = { ...this.defaultOptions, ...options };
179
+ const contextOptions = {
180
+ ...this.defaultOptions,
181
+ ...options
182
+ };
177
183
  const tmpContext = await this.createApiRequestContext(contextOptions);
184
+ if (!contextOptions.access_token) {
185
+ contextOptions.access_token = await this.authenticateWithRetry(tmpContext, contextOptions);
186
+ }
178
187
  if (!contextOptions.client_id) {
179
188
  contextOptions["access_token"] = await this.authenticateWithUserPassword(tmpContext, contextOptions);
180
189
  const userContext = await this.createApiRequestContext(contextOptions);
@@ -207,6 +216,30 @@ class AdminApiContext {
207
216
  extraHTTPHeaders
208
217
  });
209
218
  }
219
+ static async authenticateWithRetry(tmpContext, options) {
220
+ const max = Math.max(0, options.authMaxRetries);
221
+ const baseDelay = Math.max(0, options.authBaseDelayMs);
222
+ let lastError;
223
+ for (let attempt = 0; attempt <= max; attempt++) {
224
+ try {
225
+ if (options.client_id && options.client_secret) {
226
+ const token = await this.authenticateWithClientCredentials(tmpContext, options);
227
+ if (token) return token;
228
+ }
229
+ if (options.admin_username && options.admin_password) {
230
+ const userToken = await this.authenticateWithUserPassword(tmpContext, options);
231
+ if (userToken) return userToken;
232
+ }
233
+ throw new Error("No valid authentication method available (missing credentials).");
234
+ } catch (err) {
235
+ lastError = err;
236
+ if (attempt === max) break;
237
+ const delay = baseDelay * Math.pow(2, attempt) + Math.floor(Math.random() * baseDelay);
238
+ await new Promise((r) => setTimeout(r, delay));
239
+ }
240
+ }
241
+ throw lastError instanceof Error ? lastError : new Error(`Authentication failed after ${max + 1} attempts: ${String(lastError)}`);
242
+ }
210
243
  static async authenticateWithClientCredentials(context, options) {
211
244
  const authResponse = await context.post("oauth/token", {
212
245
  data: {
@@ -216,8 +249,8 @@ class AdminApiContext {
216
249
  scope: "write"
217
250
  }
218
251
  });
219
- const authData = await authResponse.json();
220
252
  expect(authResponse.ok(), "Should authenticate with client credentials").toBeTruthy();
253
+ const authData = await authResponse.json();
221
254
  if (!authData["access_token"]) {
222
255
  throw new Error(`Failed to authenticate with client_id: ${options.client_id}`);
223
256
  }
@@ -233,13 +266,21 @@ class AdminApiContext {
233
266
  scope: "write"
234
267
  }
235
268
  });
236
- const authData = await authResponse.json();
237
269
  expect(authResponse.ok(), "Should authenticate with user credentials").toBeTruthy();
270
+ const authData = await authResponse.json();
238
271
  if (!authData["access_token"]) {
239
272
  throw new Error(`Failed to authenticate with user: ${options.admin_username}`);
240
273
  }
241
274
  return authData["access_token"];
242
275
  }
276
+ async reauthenticate() {
277
+ const tmp = await AdminApiContext.createApiRequestContext({
278
+ ...this.options,
279
+ access_token: ""
280
+ });
281
+ this.options.access_token = await AdminApiContext.authenticateWithRetry(tmp, this.options);
282
+ this.context = await AdminApiContext.createApiRequestContext(this.options);
283
+ }
243
284
  isAuthenticated() {
244
285
  return !!this.options["access_token"];
245
286
  }
@@ -274,9 +315,17 @@ class AdminApiContext {
274
315
  fetch: this.context.fetch.bind(this.context),
275
316
  head: this.context.head.bind(this.context)
276
317
  };
277
- let response = await methodMap[method](url, options);
278
- if (response.status() === 401) {
279
- await this.refreshAccessToken();
318
+ const withAuth = {
319
+ ...options,
320
+ data: options?.data ?? void 0,
321
+ headers: {
322
+ ...options?.headers || {},
323
+ Authorization: `Bearer ${this.options.access_token}`
324
+ }
325
+ };
326
+ let response = await methodMap[method](url, withAuth);
327
+ if (response.status() === 401 || response.status() === 400) {
328
+ await this.reauthenticate();
280
329
  const updatedOptions = {
281
330
  ...options,
282
331
  data: options?.data ?? void 0,
@@ -563,7 +612,7 @@ const general$a = {
563
612
  "delete": "Delete",
564
613
  customFields: "Custom fields"
565
614
  };
566
- const actions$d = {
615
+ const actions$f = {
567
616
  createCategory: "Create category",
568
617
  addLandingPage: "Add landing page",
569
618
  configureHomePage: "Configure home page",
@@ -594,7 +643,7 @@ const entities$1 = {
594
643
  };
595
644
  const administrationCategory = {
596
645
  general: general$a,
597
- actions: actions$d,
646
+ actions: actions$f,
598
647
  tabs: tabs$9,
599
648
  fields: fields$9,
600
649
  headings: headings$5,
@@ -602,7 +651,7 @@ const administrationCategory = {
602
651
  entities: entities$1
603
652
  };
604
653
 
605
- const listing$k = {
654
+ const listing$m = {
606
655
  customers: "Customers",
607
656
  bulkEdit: "Bulk edit",
608
657
  "delete": "Delete",
@@ -641,7 +690,7 @@ const bulkEdit$3 = {
641
690
  }
642
691
  };
643
692
  const administrationCustomer = {
644
- listing: listing$k,
693
+ listing: listing$m,
645
694
  detail: detail$o,
646
695
  bulkEdit: bulkEdit$3
647
696
  };
@@ -651,7 +700,7 @@ const common$b = {
651
700
  position: "Position",
652
701
  labelEnglishGB: "Label (English (GB))"
653
702
  };
654
- const listing$j = {
703
+ const listing$l = {
655
704
  addNewSet: "Add new set"
656
705
  };
657
706
  const create$d = {
@@ -673,24 +722,24 @@ const detail$n = {
673
722
  const general$9 = {
674
723
  customFields: "Custom fields"
675
724
  };
676
- const actions$c = {
725
+ const actions$e = {
677
726
  edit: "Edit",
678
727
  "delete": "Delete",
679
728
  cancel: "Cancel",
680
729
  applyChanges: "Apply changes"
681
730
  };
682
- const dialogs$5 = {
731
+ const dialogs$7 = {
683
732
  warning: "Warning",
684
733
  deleteCustomField: "Delete custom field"
685
734
  };
686
735
  const administrationCustomField = {
687
736
  common: common$b,
688
- listing: listing$j,
737
+ listing: listing$l,
689
738
  create: create$d,
690
739
  detail: detail$n,
691
740
  general: general$9,
692
- actions: actions$c,
693
- dialogs: dialogs$5
741
+ actions: actions$e,
742
+ dialogs: dialogs$7
694
743
  };
695
744
 
696
745
  const buttons$d = {
@@ -710,7 +759,7 @@ const administrationDataSharing = {
710
759
  headlines: headlines$1
711
760
  };
712
761
 
713
- const listing$i = {
762
+ const listing$k = {
714
763
  addDocument: "Add document"
715
764
  };
716
765
  const types$1 = {
@@ -721,7 +770,7 @@ const detail$m = {
721
770
  save: "Save"
722
771
  };
723
772
  const administrationDocument = {
724
- listing: listing$i,
773
+ listing: listing$k,
725
774
  types: types$1,
726
775
  detail: detail$m
727
776
  };
@@ -750,7 +799,7 @@ const administrationLandingPage = {
750
799
  layout: layout$1
751
800
  };
752
801
 
753
- const listing$h = {
802
+ const listing$j = {
754
803
  createNewLayout: "Create new layout"
755
804
  };
756
805
  const create$b = {
@@ -774,7 +823,7 @@ const detail$l = {
774
823
  layoutAssignment: "Layout assignment"
775
824
  };
776
825
  const administrationLayout = {
777
- listing: listing$h,
826
+ listing: listing$j,
778
827
  create: create$b,
779
828
  detail: detail$l
780
829
  };
@@ -790,7 +839,7 @@ const administrationLogin = {
790
839
  loginButton: loginButton$3
791
840
  };
792
841
 
793
- const listing$g = {
842
+ const listing$i = {
794
843
  "delete": "Delete",
795
844
  downloadFlow: "Download flow",
796
845
  testFlow: "Test flow",
@@ -818,7 +867,7 @@ const messages$6 = {
818
867
  deleteConfirmation: "If you delete this flow, no more actions will be performed for the trigger. Are you sure you want to delete this flow?"
819
868
  };
820
869
  const administrationFlowBuilder = {
821
- listing: listing$g,
870
+ listing: listing$i,
822
871
  create: create$a,
823
872
  detail: detail$k,
824
873
  templates: templates$1,
@@ -839,13 +888,18 @@ const shopwareServices$1 = {
839
888
  const userMenu$1 = {
840
889
  logout: "Logout"
841
890
  };
891
+ const order$1 = {
892
+ orderTitle: "Orders",
893
+ orderOverview: "Overview"
894
+ };
842
895
  const administrationDashboard = {
843
896
  dataSharing: dataSharing$1,
844
897
  shopwareServices: shopwareServices$1,
845
- userMenu: userMenu$1
898
+ userMenu: userMenu$1,
899
+ order: order$1
846
900
  };
847
901
 
848
- const listing$f = {
902
+ const listing$h = {
849
903
  addManufacturer: "Add manufacturer"
850
904
  };
851
905
  const create$9 = {
@@ -857,20 +911,20 @@ const create$9 = {
857
911
  const detail$j = {
858
912
  customFields: "Custom fields"
859
913
  };
860
- const actions$b = {
914
+ const actions$d = {
861
915
  edit: "Edit",
862
916
  "delete": "Delete",
863
917
  cancel: "Cancel"
864
918
  };
865
- const dialogs$4 = {
919
+ const dialogs$6 = {
866
920
  warning: "Warning"
867
921
  };
868
922
  const administrationManufacturer = {
869
- listing: listing$f,
923
+ listing: listing$h,
870
924
  create: create$9,
871
925
  detail: detail$j,
872
- actions: actions$b,
873
- dialogs: dialogs$4
926
+ actions: actions$d,
927
+ dialogs: dialogs$6
874
928
  };
875
929
 
876
930
  const detail$i = {
@@ -886,10 +940,24 @@ const tabs$8 = {
886
940
  details: "Details",
887
941
  documents: "Documents"
888
942
  };
943
+ const listing$g = {
944
+ addOrder: "Add order"
945
+ };
946
+ const actions$c = {
947
+ view: "View",
948
+ "delete": "Delete",
949
+ cancel: "Cancel"
950
+ };
951
+ const dialogs$5 = {
952
+ warning: "Warning"
953
+ };
889
954
  const administrationOrder = {
890
955
  detail: detail$i,
891
956
  contextMenu: contextMenu$1,
892
- tabs: tabs$8
957
+ tabs: tabs$8,
958
+ listing: listing$g,
959
+ actions: actions$c,
960
+ dialogs: dialogs$5
893
961
  };
894
962
 
895
963
  const common$a = {
@@ -921,7 +989,7 @@ const cards$1 = {
921
989
  const headings$4 = {
922
990
  promotionCodes: "Promotion codes"
923
991
  };
924
- const actions$a = {
992
+ const actions$b = {
925
993
  addPromotion: "Add promotion",
926
994
  addDiscount: "Add discount",
927
995
  duplicate: "Duplicate",
@@ -937,7 +1005,7 @@ const administrationPromotion = {
937
1005
  tabs: tabs$7,
938
1006
  cards: cards$1,
939
1007
  headings: headings$4,
940
- actions: actions$a,
1008
+ actions: actions$b,
941
1009
  fields: fields$8
942
1010
  };
943
1011
 
@@ -976,7 +1044,7 @@ const common$9 = {
976
1044
  name: "Name",
977
1045
  availabilityRule: "Availability rule"
978
1046
  };
979
- const listing$e = {
1047
+ const listing$f = {
980
1048
  addShippingMethod: "Add shipping method"
981
1049
  };
982
1050
  const detail$g = {
@@ -986,17 +1054,17 @@ const methods$4 = {
986
1054
  express: "Express",
987
1055
  customShippingMethod: "Custom shipping method"
988
1056
  };
989
- const dialogs$3 = {
1057
+ const dialogs$4 = {
990
1058
  warning: "Warning",
991
1059
  cancel: "Cancel",
992
1060
  "delete": "Delete"
993
1061
  };
994
1062
  const administrationShipping = {
995
1063
  common: common$9,
996
- listing: listing$e,
1064
+ listing: listing$f,
997
1065
  detail: detail$g,
998
1066
  methods: methods$4,
999
- dialogs: dialogs$3
1067
+ dialogs: dialogs$4
1000
1068
  };
1001
1069
 
1002
1070
  const tabs$6 = {
@@ -1017,7 +1085,7 @@ const administrationYourProfile = {
1017
1085
  buttons: buttons$b
1018
1086
  };
1019
1087
 
1020
- const listing$d = {
1088
+ const listing$e = {
1021
1089
  customerGroups: "Customer groups"
1022
1090
  };
1023
1091
  const detail$f = {
@@ -1033,7 +1101,7 @@ const create$8 = {
1033
1101
  seoMetaDescription: "SEO meta description"
1034
1102
  };
1035
1103
  const administrationCustomerGroup = {
1036
- listing: listing$d,
1104
+ listing: listing$e,
1037
1105
  detail: detail$f,
1038
1106
  create: create$8
1039
1107
  };
@@ -1131,7 +1199,7 @@ const bulkEdit$2 = {
1131
1199
  success: "Bulk edit - Success",
1132
1200
  close: "Close"
1133
1201
  };
1134
- const listing$c = {
1202
+ const listing$d = {
1135
1203
  bulkEdit: "Bulk edit",
1136
1204
  startBulkEdit: "Start bulk edit"
1137
1205
  };
@@ -1160,7 +1228,7 @@ const administrationProduct = {
1160
1228
  flows: flows$1,
1161
1229
  errors: errors$3,
1162
1230
  bulkEdit: bulkEdit$2,
1163
- listing: listing$c,
1231
+ listing: listing$d,
1164
1232
  tabs: tabs$5,
1165
1233
  buttons: buttons$8,
1166
1234
  modals: modals$2
@@ -1282,7 +1350,7 @@ const common$7 = {
1282
1350
  street: "Street",
1283
1351
  postalCode: "Postal code"
1284
1352
  };
1285
- const actions$9 = {
1353
+ const actions$a = {
1286
1354
  editAddress: "Edit address",
1287
1355
  useAsDefaultBilling: "Use as default billing address",
1288
1356
  useAsDefaultShipping: "Use as default shipping address",
@@ -1293,7 +1361,7 @@ const messages$4 = {
1293
1361
  };
1294
1362
  const storefrontAddress = {
1295
1363
  common: common$7,
1296
- actions: actions$9,
1364
+ actions: actions$a,
1297
1365
  messages: messages$4
1298
1366
  };
1299
1367
 
@@ -1350,7 +1418,7 @@ const review$1 = {
1350
1418
  emptyText: "No reviews found. Share your insights with others.",
1351
1419
  submitMessage: "Thank you for submitting your review. We will examine the review and eventually unlock it, please be patient."
1352
1420
  };
1353
- const listing$b = {
1421
+ const listing$c = {
1354
1422
  sorting: "Sorting",
1355
1423
  noProductsFound: "No products found."
1356
1424
  };
@@ -1361,7 +1429,7 @@ const storefrontProduct = {
1361
1429
  removeFromWishlist: removeFromWishlist$1,
1362
1430
  deliveryTime: deliveryTime$1,
1363
1431
  review: review$1,
1364
- listing: listing$b
1432
+ listing: listing$c
1365
1433
  };
1366
1434
 
1367
1435
  const pageNotFound$1 = {
@@ -1482,7 +1550,7 @@ const storefrontLogin = {
1482
1550
  register: register$2
1483
1551
  };
1484
1552
 
1485
- const actions$8 = {
1553
+ const actions$9 = {
1486
1554
  cancelOrder: "Cancel order",
1487
1555
  back: "Back"
1488
1556
  };
@@ -1491,7 +1559,7 @@ const shipping$1 = {
1491
1559
  express: "Express"
1492
1560
  };
1493
1561
  const storefrontOrder = {
1494
- actions: actions$8,
1562
+ actions: actions$9,
1495
1563
  shipping: shipping$1
1496
1564
  };
1497
1565
 
@@ -1509,13 +1577,13 @@ const methods$3 = {
1509
1577
  paidInAdvance: "Paid in advance",
1510
1578
  invoice: "Invoice"
1511
1579
  };
1512
- const actions$7 = {
1580
+ const actions$8 = {
1513
1581
  change: "Change",
1514
1582
  completePayment: "Complete payment"
1515
1583
  };
1516
1584
  const storefrontPayment = {
1517
1585
  methods: methods$3,
1518
- actions: actions$7
1586
+ actions: actions$8
1519
1587
  };
1520
1588
 
1521
1589
  const passwordRecovery$1 = "Password recovery";
@@ -1560,7 +1628,7 @@ const general$5 = {
1560
1628
  "delete": "Löschen",
1561
1629
  customFields: "Feld"
1562
1630
  };
1563
- const actions$6 = {
1631
+ const actions$7 = {
1564
1632
  createCategory: "Kategorie erstellen",
1565
1633
  addLandingPage: "Landingpage hinzufügen",
1566
1634
  configureHomePage: "Startseite konfigurieren",
@@ -1591,7 +1659,7 @@ const entities = {
1591
1659
  };
1592
1660
  const deAdministrationCategory = {
1593
1661
  general: general$5,
1594
- actions: actions$6,
1662
+ actions: actions$7,
1595
1663
  tabs: tabs$4,
1596
1664
  fields: fields$4,
1597
1665
  headings: headings$2,
@@ -1599,7 +1667,7 @@ const deAdministrationCategory = {
1599
1667
  entities: entities
1600
1668
  };
1601
1669
 
1602
- const listing$a = {
1670
+ const listing$b = {
1603
1671
  customers: "Kunden",
1604
1672
  bulkEdit: "Massenbearbeitung",
1605
1673
  startBulkEdit: "Massenbearbeitung starten",
@@ -1638,12 +1706,12 @@ const bulkEdit$1 = {
1638
1706
  }
1639
1707
  };
1640
1708
  const deAdministrationCustomer = {
1641
- listing: listing$a,
1709
+ listing: listing$b,
1642
1710
  detail: detail$d,
1643
1711
  bulkEdit: bulkEdit$1
1644
1712
  };
1645
1713
 
1646
- const listing$9 = {
1714
+ const listing$a = {
1647
1715
  addCustomerGroup: "Kundengruppe hinzufügen",
1648
1716
  customerGroups: "Kundengruppen"
1649
1717
  };
@@ -1665,7 +1733,7 @@ const detail$c = {
1665
1733
  technicalUrl: "Technische URL"
1666
1734
  };
1667
1735
  const deAdministrationCustomerGroup = {
1668
- listing: listing$9,
1736
+ listing: listing$a,
1669
1737
  create: create$7,
1670
1738
  detail: detail$c
1671
1739
  };
@@ -1678,7 +1746,7 @@ const common$5 = {
1678
1746
  customFieldSet: "Eigene Felder Set",
1679
1747
  labelEnglishGB: "Label (English (GB))"
1680
1748
  };
1681
- const listing$8 = {
1749
+ const listing$9 = {
1682
1750
  addCustomField: "Eigenes Feld hinzufügen",
1683
1751
  addNewSet: "Hinzufügen"
1684
1752
  };
@@ -1706,24 +1774,24 @@ const detail$b = {
1706
1774
  const general$4 = {
1707
1775
  customFields: "Feld"
1708
1776
  };
1709
- const actions$5 = {
1777
+ const actions$6 = {
1710
1778
  edit: "Bearbeiten",
1711
1779
  "delete": "Löschen",
1712
1780
  cancel: "Abbrechen",
1713
1781
  applyChanges: "Anwenden"
1714
1782
  };
1715
- const dialogs$2 = {
1783
+ const dialogs$3 = {
1716
1784
  warning: "Warnung",
1717
1785
  deleteCustomField: "Löschen"
1718
1786
  };
1719
1787
  const deAdministrationCustomField = {
1720
1788
  common: common$5,
1721
- listing: listing$8,
1789
+ listing: listing$9,
1722
1790
  create: create$6,
1723
1791
  detail: detail$b,
1724
1792
  general: general$4,
1725
- actions: actions$5,
1726
- dialogs: dialogs$2
1793
+ actions: actions$6,
1794
+ dialogs: dialogs$3
1727
1795
  };
1728
1796
 
1729
1797
  const dataSharing = {
@@ -1740,10 +1808,15 @@ const shopwareServices = {
1740
1808
  const userMenu = {
1741
1809
  logout: "Abmelden"
1742
1810
  };
1811
+ const order = {
1812
+ orderTitle: "Bestellungen",
1813
+ orderOverview: "Übersicht"
1814
+ };
1743
1815
  const deAdministrationDashboard = {
1744
1816
  dataSharing: dataSharing,
1745
1817
  shopwareServices: shopwareServices,
1746
- userMenu: userMenu
1818
+ userMenu: userMenu,
1819
+ order: order
1747
1820
  };
1748
1821
 
1749
1822
  const buttons$6 = {
@@ -1763,7 +1836,7 @@ const deAdministrationDataSharing = {
1763
1836
  headlines: headlines
1764
1837
  };
1765
1838
 
1766
- const listing$7 = {
1839
+ const listing$8 = {
1767
1840
  addDocument: "Dokument hinzufügen"
1768
1841
  };
1769
1842
  const types = {
@@ -1774,7 +1847,7 @@ const detail$a = {
1774
1847
  save: "Speichern"
1775
1848
  };
1776
1849
  const deAdministrationDocument = {
1777
- listing: listing$7,
1850
+ listing: listing$8,
1778
1851
  types: types,
1779
1852
  detail: detail$a
1780
1853
  };
@@ -1821,7 +1894,7 @@ const deAdministrationFirstRunWizard = {
1821
1894
  regions: regions
1822
1895
  };
1823
1896
 
1824
- const listing$6 = {
1897
+ const listing$7 = {
1825
1898
  addFlow: "Flow hinzufügen",
1826
1899
  "delete": "Löschen",
1827
1900
  downloadFlow: "Herunterladen",
@@ -1857,7 +1930,7 @@ const messages$2 = {
1857
1930
  deleteConfirmation: "Löschen"
1858
1931
  };
1859
1932
  const deAdministrationFlowBuilder = {
1860
- listing: listing$6,
1933
+ listing: listing$7,
1861
1934
  create: create$5,
1862
1935
  detail: detail$9,
1863
1936
  templates: templates,
@@ -1897,7 +1970,7 @@ const deAdministrationLandingPage = {
1897
1970
  layout: layout
1898
1971
  };
1899
1972
 
1900
- const listing$5 = {
1973
+ const listing$6 = {
1901
1974
  createNewLayout: "Neues Layout erstellen"
1902
1975
  };
1903
1976
  const create$3 = {
@@ -1921,7 +1994,7 @@ const detail$7 = {
1921
1994
  layoutAssignment: "Layout-Zuordnung"
1922
1995
  };
1923
1996
  const deAdministrationLayout = {
1924
- listing: listing$5,
1997
+ listing: listing$6,
1925
1998
  create: create$3,
1926
1999
  detail: detail$7
1927
2000
  };
@@ -1937,7 +2010,7 @@ const deAdministrationLogin = {
1937
2010
  loginButton: loginButton$1
1938
2011
  };
1939
2012
 
1940
- const listing$4 = {
2013
+ const listing$5 = {
1941
2014
  addManufacturer: "Hersteller hinzufügen"
1942
2015
  };
1943
2016
  const create$2 = {
@@ -1949,20 +2022,20 @@ const create$2 = {
1949
2022
  const detail$6 = {
1950
2023
  customFields: "Zusatzfelder"
1951
2024
  };
1952
- const actions$4 = {
2025
+ const actions$5 = {
1953
2026
  edit: "Bearbeiten",
1954
2027
  "delete": "Löschen",
1955
2028
  cancel: "Abbrechen"
1956
2029
  };
1957
- const dialogs$1 = {
2030
+ const dialogs$2 = {
1958
2031
  warning: "Warnung"
1959
2032
  };
1960
2033
  const deAdministrationManufacturer = {
1961
- listing: listing$4,
2034
+ listing: listing$5,
1962
2035
  create: create$2,
1963
2036
  detail: detail$6,
1964
- actions: actions$4,
1965
- dialogs: dialogs$1
2037
+ actions: actions$5,
2038
+ dialogs: dialogs$2
1966
2039
  };
1967
2040
 
1968
2041
  const detail$5 = {
@@ -1978,10 +2051,24 @@ const tabs$3 = {
1978
2051
  details: "Details",
1979
2052
  documents: "Dokumente"
1980
2053
  };
2054
+ const listing$4 = {
2055
+ addOrder: "Bestellung anlegen"
2056
+ };
2057
+ const actions$4 = {
2058
+ view: "Anzeigen",
2059
+ "delete": "Löschen",
2060
+ cancel: "Abbrechen"
2061
+ };
2062
+ const dialogs$1 = {
2063
+ warning: "Warnung"
2064
+ };
1981
2065
  const deAdministrationOrder = {
1982
2066
  detail: detail$5,
1983
2067
  contextMenu: contextMenu,
1984
- tabs: tabs$3
2068
+ tabs: tabs$3,
2069
+ listing: listing$4,
2070
+ actions: actions$4,
2071
+ dialogs: dialogs$1
1985
2072
  };
1986
2073
 
1987
2074
  const common$4 = {
@@ -3148,6 +3235,59 @@ class Actor {
3148
3235
  this.baseURL = baseURL;
3149
3236
  }
3150
3237
  expects = expect;
3238
+ async a11y_checks(locator) {
3239
+ await locator.focus();
3240
+ await expect(locator).toBeFocused();
3241
+ await expect(locator).toHaveVisibleFocus();
3242
+ }
3243
+ async fillsIn(locator, input) {
3244
+ const stepTitle = `${this.name} fills ${locator} with text "${input}"`;
3245
+ await test$e.step(stepTitle, async () => {
3246
+ await this.a11y_checks(locator);
3247
+ await locator.fill(input);
3248
+ });
3249
+ }
3250
+ async presses(locator, key) {
3251
+ let defaultKey = "Space";
3252
+ const tagName = await locator.evaluate((el) => el.tagName);
3253
+ if (tagName === "BUTTON" || tagName === "A") {
3254
+ await this.page.keyboard.press("Shift");
3255
+ defaultKey = "Enter";
3256
+ }
3257
+ const inputKey = key ?? defaultKey;
3258
+ const stepTitle = `${this.name} presses ${inputKey} on ${locator}`;
3259
+ await test$e.step(stepTitle, async () => {
3260
+ await this.a11y_checks(locator);
3261
+ await locator.press(inputKey);
3262
+ });
3263
+ }
3264
+ async selectsRadioButton(radioGroup, inputLabel) {
3265
+ const stepTitle = `${this.name} selects radio button ${inputLabel}`;
3266
+ await test$e.step(stepTitle, async () => {
3267
+ const desiredOption = radioGroup.getByRole("radio", { name: inputLabel });
3268
+ if (!await desiredOption.isChecked()) {
3269
+ const options = [];
3270
+ for (const labelEl of await radioGroup.locator("label").all()) {
3271
+ const label = await labelEl.innerText();
3272
+ const radioButton = radioGroup.getByRole("radio", { name: label });
3273
+ const isChecked = await radioButton.isChecked();
3274
+ options.push({ label, locator: radioButton, isChecked });
3275
+ }
3276
+ const defaultOptionIndex = options.findIndex((opt) => opt.isChecked);
3277
+ const desiredOptionIndex = options.findIndex((opt) => opt.label === inputLabel);
3278
+ if (defaultOptionIndex === -1) {
3279
+ throw new Error(`No option is selected by default.`);
3280
+ }
3281
+ const step = defaultOptionIndex < desiredOptionIndex ? 1 : -1;
3282
+ const inputKey = step === 1 ? "ArrowDown" : "ArrowUp";
3283
+ for (let i = defaultOptionIndex; i !== desiredOptionIndex; i += step) {
3284
+ await this.presses(options[i].locator, inputKey);
3285
+ await this.page.waitForLoadState("domcontentloaded");
3286
+ }
3287
+ }
3288
+ await this.a11y_checks(desiredOption);
3289
+ });
3290
+ }
3151
3291
  async attemptsTo(task) {
3152
3292
  const stepTitle = `${this.name} attempts to ${this.camelCaseToLowerCase(task.name)}`;
3153
3293
  await test$e.step(stepTitle, async () => await task());
@@ -7678,14 +7818,16 @@ class CustomerDetail {
7678
7818
  tagItems;
7679
7819
  page;
7680
7820
  instanceMeta;
7821
+ customerEmail;
7681
7822
  constructor(page, instanceMeta) {
7682
7823
  this.page = page;
7683
7824
  this.instanceMeta = instanceMeta;
7684
7825
  this.editButton = page.getByRole("button", { name: translate("administration:customer:detail.edit") });
7685
- this.generalTab = page.getByRole("link", { name: translate("administration:customer:detail.general") });
7826
+ this.generalTab = page.getByRole("tab", { name: translate("administration:customer:detail.general") });
7686
7827
  this.addressesTab = page.getByRole("tab", { name: translate("administration:customer:detail.addresses") });
7687
7828
  this.ordersTab = page.getByRole("tab", { name: translate("administration:customer:detail.orders") });
7688
7829
  this.accountCard = page.locator(".sw-customer-card");
7830
+ this.customerEmail = page.locator(".sw-customer-card-email-link");
7689
7831
  if (satisfies(instanceMeta.version, "<6.7")) {
7690
7832
  this.customFieldCard = page.locator(".sw-card").getByText(translate("administration:customField:general.customFields"));
7691
7833
  } else {
@@ -8227,6 +8369,7 @@ class Dashboard {
8227
8369
  adminMenuView;
8228
8370
  adminMenuCatalog;
8229
8371
  adminMenuOrder;
8372
+ adminMenuOrderOverview;
8230
8373
  adminMenuCustomer;
8231
8374
  adminMenuContent;
8232
8375
  adminMenuMarketing;
@@ -8257,6 +8400,7 @@ class Dashboard {
8257
8400
  this.contentView = page.locator(".sw-desktop__content");
8258
8401
  this.adminMenuCatalog = page.locator(".sw-catalogue");
8259
8402
  this.adminMenuOrder = page.locator(".sw-order");
8403
+ this.adminMenuOrderOverview = this.adminMenuOrder.getByTitle(translate("administration:dashboard:order.orderOverview"));
8260
8404
  this.adminMenuCustomer = page.locator(".sw-customer");
8261
8405
  this.adminMenuContent = page.locator(".sw-content");
8262
8406
  this.adminMenuMarketing = page.locator(".sw-marketing");
@@ -9697,6 +9841,66 @@ class SalesChannelDetail {
9697
9841
  }
9698
9842
  }
9699
9843
 
9844
+ class OrderListing {
9845
+ addOrderButton;
9846
+ orderRows;
9847
+ page;
9848
+ instanceMeta;
9849
+ constructor(page, instanceMeta) {
9850
+ this.page = page;
9851
+ this.instanceMeta = instanceMeta;
9852
+ this.addOrderButton = page.getByText(translate("administration:order:listing.addOrder"));
9853
+ this.orderRows = page.getByRole("row");
9854
+ }
9855
+ async getLineItemByOrderNumber(orderNumber) {
9856
+ let orderDeliveryStateText;
9857
+ let orderPaymentStateText;
9858
+ let orderDeliveryAddressText;
9859
+ const lineItem = this.page.getByRole("row").filter({ hasText: orderNumber });
9860
+ const orderNumberText = lineItem.getByText(orderNumber);
9861
+ const orderCustomerNameText = lineItem.locator(".sw-data-grid__cell--orderCustomer-firstName");
9862
+ if (satisfies(this.instanceMeta.version, "<=6.7.0.0")) {
9863
+ orderDeliveryAddressText = lineItem.locator(".sw-order-list__delivery_address");
9864
+ orderPaymentStateText = lineItem.locator(".sw-data-grid__cell--transactions-last\\(\\)-stateMachineState-name");
9865
+ orderDeliveryStateText = lineItem.locator(".sw-data-grid__cell--deliveries\\[0\\]-stateMachineState-name");
9866
+ } else {
9867
+ orderDeliveryStateText = lineItem.locator(".sw-data-grid__cell--primaryOrderDelivery-stateMachineState-name");
9868
+ orderPaymentStateText = lineItem.locator(".sw-data-grid__cell--primaryOrderTransaction-stateMachineState-name");
9869
+ orderDeliveryAddressText = lineItem.locator(".sw-data-grid__cell--primaryOrderDelivery-shippingOrderAddress-street");
9870
+ }
9871
+ const orderTotalAmountText = lineItem.locator(".sw-data-grid__cell--amountTotal");
9872
+ const orderStateText = lineItem.locator(".sw-data-grid__cell--stateMachineState-name");
9873
+ const orderDateText = lineItem.locator(".sw-data-grid__cell--orderDateTime");
9874
+ const orderCheckbox = lineItem.locator(".sw-data-grid__cell--selection");
9875
+ const orderContextButton = lineItem.locator(".sw-context-button__button");
9876
+ const orderViewButton = this.page.locator(".sw-context-menu__content").getByRole("link", { name: translate("administration:order:actions.view") });
9877
+ const orderDeleteButton = this.page.locator(".sw-context-menu__content").getByRole("link", { name: translate("administration:order:actions.delete") });
9878
+ const warningDialog = this.page.getByRole("dialog", { name: translate("administration:order:dialogs.warning") });
9879
+ const warningDialogCancelButton = warningDialog.getByRole("button", { name: translate("administration:order:actions.cancel") });
9880
+ const warningDialogDeleteButton = warningDialog.getByRole("button", { name: translate("administration:order:actions.delete") });
9881
+ return {
9882
+ orderNumberText,
9883
+ orderCustomerNameText,
9884
+ orderDeliveryAddressText,
9885
+ orderTotalAmountText,
9886
+ orderStateText,
9887
+ orderPaymentStateText,
9888
+ orderDeliveryStateText,
9889
+ orderDateText,
9890
+ orderCheckbox,
9891
+ orderContextButton,
9892
+ orderViewButton,
9893
+ orderDeleteButton,
9894
+ warningDialog,
9895
+ warningDialogCancelButton,
9896
+ warningDialogDeleteButton
9897
+ };
9898
+ }
9899
+ url() {
9900
+ return `#/sw/order/index`;
9901
+ }
9902
+ }
9903
+
9700
9904
  const AdminPageObjects = {
9701
9905
  ProductDetail,
9702
9906
  OrderDetail,
@@ -9746,7 +9950,8 @@ const AdminPageObjects = {
9746
9950
  MediaListing,
9747
9951
  LayoutListing,
9748
9952
  ListingPageLayoutDetail,
9749
- LayoutCreate
9953
+ LayoutCreate,
9954
+ OrderListing
9750
9955
  };
9751
9956
  const test$6 = test$e.extend({
9752
9957
  AdminProductDetail: async ({ AdminPage, InstanceMeta }, use) => {
@@ -9895,6 +10100,9 @@ const test$6 = test$e.extend({
9895
10100
  },
9896
10101
  AdminSalesChannelDetail: async ({ AdminPage }, use) => {
9897
10102
  await use(new SalesChannelDetail(AdminPage));
10103
+ },
10104
+ AdminOrderListing: async ({ AdminPage, InstanceMeta }, use) => {
10105
+ await use(new OrderListing(AdminPage, InstanceMeta));
9898
10106
  }
9899
10107
  });
9900
10108
 
@@ -11550,6 +11758,40 @@ const test$1 = test$e.extend({
11550
11758
  ]
11551
11759
  });
11552
11760
 
11761
+ expect.extend({
11762
+ async toHaveVisibleFocus(locator) {
11763
+ try {
11764
+ const boxShadowStyle = await locator.evaluate((element) => {
11765
+ const computedStyle = window.getComputedStyle(element);
11766
+ return computedStyle.boxShadow !== "none";
11767
+ });
11768
+ const borderStyle = await locator.evaluate((element) => {
11769
+ const computedStyle = window.getComputedStyle(element);
11770
+ return computedStyle.borderStyle !== "none" && computedStyle.borderWidth !== "0px" && computedStyle.borderColor !== "transparent" && !computedStyle.borderColor.includes("rgba(0, 0, 0, 0)");
11771
+ });
11772
+ const outlineStyle = await locator.evaluate((element) => {
11773
+ const computedStyle = window.getComputedStyle(element);
11774
+ return computedStyle.outline !== "none" && computedStyle.outlineWidth !== "0px" && computedStyle.borderColor !== "transparent" && !computedStyle.borderColor.includes("rgba(0, 0, 0, 0)");
11775
+ });
11776
+ if (!boxShadowStyle && !borderStyle && !outlineStyle) {
11777
+ return {
11778
+ message: () => `expected ${locator} to have visible focus, but no outline, border or box-shadow was detected`,
11779
+ pass: false
11780
+ };
11781
+ }
11782
+ return {
11783
+ message: () => `${locator} has visible focus`,
11784
+ pass: true
11785
+ };
11786
+ } catch (error) {
11787
+ return {
11788
+ message: () => `expected ${locator} to have visible focus, but it failed with error: ${error.message}`,
11789
+ pass: false
11790
+ };
11791
+ }
11792
+ }
11793
+ });
11794
+
11553
11795
  async function applyToElements(page, selectors, stringHandler, locatorHandler) {
11554
11796
  if (!selectors.length) return;
11555
11797
  const stringSelectors = selectors.filter((s) => typeof s === "string");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopware-ag/acceptance-test-suite",
3
- "version": "11.34.1",
3
+ "version": "11.36.0",
4
4
  "description": "Shopware Acceptance Test Suite",
5
5
  "author": "shopware AG",
6
6
  "license": "MIT",