@umbraco/playwright-testhelpers 17.0.0-beta.8 → 17.0.2

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.
@@ -34,6 +34,7 @@ export declare class DataTypeApiHelper {
34
34
  createDateTimeDataTypeWithDateFormat(name: string, dateFormat: string): Promise<string | undefined>;
35
35
  createDropdownDataType(name: string, isMultiple: boolean, options: string[]): Promise<string | undefined>;
36
36
  createEmptyBlockListDataType(name: string): Promise<string | undefined>;
37
+ createBlockListDataTypeWithTwoBlocks(name: string, firstContentElementTypeId: string, secondContentElementTypeId: string): Promise<string | undefined>;
37
38
  createBlockListDataTypeWithABlock(name: string, contentElementTypeId: string): Promise<string | undefined>;
38
39
  createBlockListDataTypeWithContentAndSettingsElementType(name: string, contentElementTypeId: string, settingsElementTypeId: string): Promise<string | undefined>;
39
40
  createBlockListDataTypeWithMinAndMaxAmount(name: string, minAmount?: number, maxAmount?: number): Promise<string | undefined>;
@@ -113,6 +114,7 @@ export declare class DataTypeApiHelper {
113
114
  createMultipleTextStringDataType(name: string): Promise<string | undefined>;
114
115
  createSliderDataType(name: string): Promise<string | undefined>;
115
116
  createListViewContentDataType(name?: string): Promise<string | undefined>;
117
+ createListViewContentDataTypeWithLayoutAndPageSize(name?: string, layoutAlias?: string, layoutName?: string, pageSize?: number): Promise<string | undefined>;
116
118
  createListViewContentDataTypeWithAllPermissions(name?: string): Promise<string | undefined>;
117
119
  updateListViewMediaDataType(alias: string, newValue: any): Promise<import("playwright-core").APIResponse>;
118
120
  createDefaultTiptapDataType(name: string): Promise<string | undefined>;
@@ -242,6 +242,19 @@ class DataTypeApiHelper {
242
242
  .build();
243
243
  return await this.save(blockList);
244
244
  }
245
+ async createBlockListDataTypeWithTwoBlocks(name, firstContentElementTypeId, secondContentElementTypeId) {
246
+ await this.ensureNameNotExists(name);
247
+ const blockList = new json_models_builders_1.BlockListDataTypeBuilder()
248
+ .withName(name)
249
+ .addBlock()
250
+ .withContentElementTypeKey(firstContentElementTypeId)
251
+ .done()
252
+ .addBlock()
253
+ .withContentElementTypeKey(secondContentElementTypeId)
254
+ .done()
255
+ .build();
256
+ return await this.save(blockList);
257
+ }
245
258
  async createBlockListDataTypeWithABlock(name, contentElementTypeId) {
246
259
  await this.ensureNameNotExists(name);
247
260
  const blockList = new json_models_builders_1.BlockListDataTypeBuilder()
@@ -947,6 +960,30 @@ class DataTypeApiHelper {
947
960
  .build();
948
961
  return await this.save(dataType);
949
962
  }
963
+ async createListViewContentDataTypeWithLayoutAndPageSize(name = 'List View - Content Test', layoutAlias = 'Umb.CollectionView.Document.Table', layoutName = 'List', pageSize = 100) {
964
+ await this.ensureNameNotExists(name);
965
+ const dataType = new json_models_builders_1.ListViewDataTypeBuilder()
966
+ .withName(name)
967
+ .withPageSize(pageSize)
968
+ .withOrderDirection('asc')
969
+ .addLayout()
970
+ .withName(layoutName)
971
+ .withIcon('icon-list')
972
+ .withCollectionView(layoutAlias)
973
+ .done()
974
+ .addColumnDisplayedProperty()
975
+ .withAlias('updateDate')
976
+ .withHeader('Last edited')
977
+ .withIsSystem(true)
978
+ .done()
979
+ .addColumnDisplayedProperty()
980
+ .withAlias('creator')
981
+ .withHeader('Updated by')
982
+ .withIsSystem(true)
983
+ .done()
984
+ .build();
985
+ return await this.save(dataType);
986
+ }
950
987
  async createListViewContentDataTypeWithAllPermissions(name = 'List View - Content Test') {
951
988
  await this.ensureNameNotExists(name);
952
989
  const dataType = new json_models_builders_1.ListViewDataTypeBuilder()