diff --git a/src/lightning-stubs/analyticsWaveApi/analyticsWaveApi.js b/src/lightning-stubs/analyticsWaveApi/analyticsWaveApi.js new file mode 100644 index 0000000..be853e8 --- /dev/null +++ b/src/lightning-stubs/analyticsWaveApi/analyticsWaveApi.js @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2021, salesforce.com, inc. + * All rights reserved. + * SPDX-License-Identifier: MIT + * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT + */ +import { createLdsTestWireAdapter } from '@salesforce/wire-service-jest-util'; + +export const createDataflowJob = jest.fn(); +export const deleteDataset = jest.fn(); +export const deleteRecipe = jest.fn(); +export const executeQuery = createLdsTestWireAdapter(jest.fn()); +export const getAnalyticsLimits = createLdsTestWireAdapter(jest.fn()); +export const getDataflowJob = createLdsTestWireAdapter(jest.fn()); +export const getDataflowJobNode = createLdsTestWireAdapter(jest.fn()); +export const getDataflowJobNodes = createLdsTestWireAdapter(jest.fn()); +export const getDataflowJobs = createLdsTestWireAdapter(jest.fn()); +export const getDataset = createLdsTestWireAdapter(jest.fn()); +export const getDatasets = createLdsTestWireAdapter(jest.fn()); +export const getRecipe = createLdsTestWireAdapter(jest.fn()); +export const getRecipes = createLdsTestWireAdapter(jest.fn()); +export const getReplicatedDatasets = createLdsTestWireAdapter(jest.fn()); +export const getSchedule = createLdsTestWireAdapter(jest.fn()); +export const getWaveFolders = createLdsTestWireAdapter(jest.fn()); +export const getXmd = createLdsTestWireAdapter(jest.fn()); +export const updateDataflowJob = jest.fn(); +export const updateSchedule = jest.fn(); diff --git a/src/lightning-stubs/combobox/combobox.js b/src/lightning-stubs/combobox/combobox.js index d76817a..955dd43 100644 --- a/src/lightning-stubs/combobox/combobox.js +++ b/src/lightning-stubs/combobox/combobox.js @@ -7,6 +7,7 @@ import { LightningElement, api } from 'lwc'; export default class Combobox extends LightningElement { + @api autocomplete; @api disabled; @api dropdownAlignment; @api fieldLevelHelp; diff --git a/src/lightning-stubs/datatable/datatable.js b/src/lightning-stubs/datatable/datatable.js index da6acd2..3f04cdc 100644 --- a/src/lightning-stubs/datatable/datatable.js +++ b/src/lightning-stubs/datatable/datatable.js @@ -22,6 +22,7 @@ export default class Datatable extends LightningElement { @api maxColumnWidth; @api maxRowSelection; @api minColumnWidth; + @api renderConfig; @api resizeColumnDisabled; @api resizeStep; @api rowNumberOffset; diff --git a/src/lightning-stubs/formattedPhone/formattedPhone.js b/src/lightning-stubs/formattedPhone/formattedPhone.js index f5960fb..4a6f205 100644 --- a/src/lightning-stubs/formattedPhone/formattedPhone.js +++ b/src/lightning-stubs/formattedPhone/formattedPhone.js @@ -7,5 +7,6 @@ import { LightningElement, api } from 'lwc'; export default class FormattedPhone extends LightningElement { + @api disabled; @api value; } diff --git a/src/lightning-stubs/helptext/helptext.js b/src/lightning-stubs/helptext/helptext.js index a68eaa1..500d4b0 100644 --- a/src/lightning-stubs/helptext/helptext.js +++ b/src/lightning-stubs/helptext/helptext.js @@ -7,6 +7,7 @@ import { LightningElement, api } from 'lwc'; export default class Helptext extends LightningElement { + @api alternativeText; @api content; @api iconName; @api iconVariant; diff --git a/src/lightning-stubs/input/input.js b/src/lightning-stubs/input/input.js index af0d306..8d96594 100644 --- a/src/lightning-stubs/input/input.js +++ b/src/lightning-stubs/input/input.js @@ -43,6 +43,8 @@ export default class Input extends LightningElement { @api placeholder; @api readOnly; @api required; + @api selectionEnd; + @api selectionStart; @api step; @api timeAriaControls; @api timeAriaDescribedBy; diff --git a/src/lightning-stubs/inputAddress/inputAddress.js b/src/lightning-stubs/inputAddress/inputAddress.js index f195aff..c93b145 100644 --- a/src/lightning-stubs/inputAddress/inputAddress.js +++ b/src/lightning-stubs/inputAddress/inputAddress.js @@ -13,6 +13,7 @@ export default class InputAddress extends LightningElement { @api cityLabel; @api cityPlaceholder; @api country; + @api countryDisabled; @api countryLabel; @api countryOptions; @api countryPlaceholder; diff --git a/src/lightning-stubs/inputRichText/inputRichText.js b/src/lightning-stubs/inputRichText/inputRichText.js index 3593415..fcd7e16 100644 --- a/src/lightning-stubs/inputRichText/inputRichText.js +++ b/src/lightning-stubs/inputRichText/inputRichText.js @@ -10,6 +10,7 @@ export default class InputRichText extends LightningElement { @api customButtons; @api disabled; @api disabledCategories; + @api fieldLevelHelp; @api formats; @api label; @api labelVisible; diff --git a/src/lightning-stubs/map/map.js b/src/lightning-stubs/map/map.js index d64ac46..f1d41a7 100644 --- a/src/lightning-stubs/map/map.js +++ b/src/lightning-stubs/map/map.js @@ -11,6 +11,7 @@ export default class Map extends LightningElement { @api listView; @api mapMarkers; @api markersTitle; + @api options; @api selectedMarkerValue; @api showFooter; @api zoomLevel; diff --git a/src/lightning-stubs/messageService/messageService.js b/src/lightning-stubs/messageService/messageService.js index 382a453..7f775bd 100644 --- a/src/lightning-stubs/messageService/messageService.js +++ b/src/lightning-stubs/messageService/messageService.js @@ -4,10 +4,12 @@ * SPDX-License-Identifier: MIT * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT */ +import { createTestWireAdapter } from '@salesforce/wire-service-jest-util'; + export const APPLICATION_SCOPE = Symbol('APPLICATION_SCOPE'); export const createMessageChannel = jest.fn(); export const createMessageContext = jest.fn(); -export const MessageContext = jest.fn(); +export const MessageContext = createTestWireAdapter(jest.fn()); export const publish = jest.fn(); export const releaseMessageContext = jest.fn(); export const subscribe = jest.fn(); diff --git a/src/lightning-stubs/navigation/navigation.js b/src/lightning-stubs/navigation/navigation.js index 7167b0c..d6cc1ca 100644 --- a/src/lightning-stubs/navigation/navigation.js +++ b/src/lightning-stubs/navigation/navigation.js @@ -4,7 +4,9 @@ * SPDX-License-Identifier: MIT * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT */ -export const CurrentPageReference = jest.fn(); +import { createTestWireAdapter } from '@salesforce/wire-service-jest-util'; + +export const CurrentPageReference = createTestWireAdapter(jest.fn()); const Navigate = Symbol('Navigate'); const GenerateUrl = Symbol('GenerateUrl'); diff --git a/src/lightning-stubs/outputField/outputField.js b/src/lightning-stubs/outputField/outputField.js index 3d50820..6542e6c 100644 --- a/src/lightning-stubs/outputField/outputField.js +++ b/src/lightning-stubs/outputField/outputField.js @@ -10,5 +10,6 @@ export default class OutputField extends LightningElement { @api fieldClass; @api fieldName; @api variant; + @api wirePicklistValues() {} @api wireRecordUi() {} } diff --git a/src/lightning-stubs/quickActionPanel/quickActionPanel.html b/src/lightning-stubs/quickActionPanel/quickActionPanel.html new file mode 100644 index 0000000..0a03836 --- /dev/null +++ b/src/lightning-stubs/quickActionPanel/quickActionPanel.html @@ -0,0 +1,10 @@ + + diff --git a/src/lightning-stubs/quickActionPanel/quickActionPanel.js b/src/lightning-stubs/quickActionPanel/quickActionPanel.js new file mode 100644 index 0000000..b0c4a51 --- /dev/null +++ b/src/lightning-stubs/quickActionPanel/quickActionPanel.js @@ -0,0 +1,11 @@ +/* + * Copyright (c) 2018, salesforce.com, inc. + * All rights reserved. + * SPDX-License-Identifier: MIT + * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT + */ +import { LightningElement, api } from 'lwc'; + +export default class QuickActionPanel extends LightningElement { + @api header; +} diff --git a/src/lightning-stubs/textarea/textarea.js b/src/lightning-stubs/textarea/textarea.js index 695b611..1fcc6f3 100644 --- a/src/lightning-stubs/textarea/textarea.js +++ b/src/lightning-stubs/textarea/textarea.js @@ -7,6 +7,7 @@ import { LightningElement, api } from 'lwc'; export default class Textarea extends LightningElement { + @api autocomplete; @api disabled; @api fieldLevelHelp; @api label; diff --git a/src/lightning-stubs/uiAppsApi/uiAppsApi.js b/src/lightning-stubs/uiAppsApi/uiAppsApi.js new file mode 100644 index 0000000..313c670 --- /dev/null +++ b/src/lightning-stubs/uiAppsApi/uiAppsApi.js @@ -0,0 +1,10 @@ +/* + * Copyright (c) 2018, salesforce.com, inc. + * All rights reserved. + * SPDX-License-Identifier: MIT + * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT + */ +import { createLdsTestWireAdapter } from '@salesforce/wire-service-jest-util'; + +export const getNavItems = createLdsTestWireAdapter(jest.fn()); +export const refresh = jest.fn(); diff --git a/src/lightning-stubs/uiListApi/uiListApi.js b/src/lightning-stubs/uiListApi/uiListApi.js index f017c3d..dd7722a 100644 --- a/src/lightning-stubs/uiListApi/uiListApi.js +++ b/src/lightning-stubs/uiListApi/uiListApi.js @@ -4,5 +4,7 @@ * SPDX-License-Identifier: MIT * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT */ -export const getListUi = jest.fn(); +import { createLdsTestWireAdapter } from '@salesforce/wire-service-jest-util'; + +export const getListUi = createLdsTestWireAdapter(jest.fn()); export const MRU = Symbol.for('MRU'); diff --git a/src/lightning-stubs/uiListsApi/uiListsApi.js b/src/lightning-stubs/uiListsApi/uiListsApi.js new file mode 100644 index 0000000..9869d30 --- /dev/null +++ b/src/lightning-stubs/uiListsApi/uiListsApi.js @@ -0,0 +1,7 @@ +/* + * Copyright (c) 2018, salesforce.com, inc. + * All rights reserved. + * SPDX-License-Identifier: MIT + * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT + */ +export const getListInfoByName = jest.fn(); diff --git a/src/lightning-stubs/uiObjectInfoApi/uiObjectInfoApi.js b/src/lightning-stubs/uiObjectInfoApi/uiObjectInfoApi.js index d4d2021..9ec594b 100644 --- a/src/lightning-stubs/uiObjectInfoApi/uiObjectInfoApi.js +++ b/src/lightning-stubs/uiObjectInfoApi/uiObjectInfoApi.js @@ -4,7 +4,9 @@ * SPDX-License-Identifier: MIT * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT */ -export const getObjectInfo = jest.fn(); -export const getObjectInfos = jest.fn(); -export const getPicklistValues = jest.fn(); -export const getPicklistValuesByRecordType = jest.fn(); +import { createLdsTestWireAdapter } from '@salesforce/wire-service-jest-util'; + +export const getObjectInfo = createLdsTestWireAdapter(jest.fn()); +export const getObjectInfos = createLdsTestWireAdapter(jest.fn()); +export const getPicklistValues = createLdsTestWireAdapter(jest.fn()); +export const getPicklistValuesByRecordType = createLdsTestWireAdapter(jest.fn()); diff --git a/src/lightning-stubs/uiRecordApi/uiRecordApi.js b/src/lightning-stubs/uiRecordApi/uiRecordApi.js index 5256b1c..1d8432f 100644 --- a/src/lightning-stubs/uiRecordApi/uiRecordApi.js +++ b/src/lightning-stubs/uiRecordApi/uiRecordApi.js @@ -4,8 +4,10 @@ * SPDX-License-Identifier: MIT * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT */ -export const getRecord = jest.fn(); -export const getRecordCreateDefaults = jest.fn(); +import { createLdsTestWireAdapter } from '@salesforce/wire-service-jest-util'; + +export const getRecord = createLdsTestWireAdapter(jest.fn()); +export const getRecordCreateDefaults = createLdsTestWireAdapter(jest.fn()); export const updateRecord = jest.fn().mockResolvedValue({}); export const createRecord = jest.fn().mockResolvedValue({}); export const deleteRecord = jest.fn().mockResolvedValue(); @@ -14,7 +16,7 @@ export const generateRecordInputForUpdate = jest.fn(); export const createRecordInputFilteredByEditedFields = jest.fn(); export const getRecordInput = jest.fn(); export const refresh = jest.fn().mockResolvedValue(); -export const getRecordUi = jest.fn(); +export const getRecordUi = createLdsTestWireAdapter(jest.fn()); /** * Gets a field's value from a record.