Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update lightning stubs #206

Merged
merged 1 commit into from
Mar 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions src/lightning-stubs/analyticsWaveApi/analyticsWaveApi.js
Original file line number Diff line number Diff line change
@@ -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();
1 change: 1 addition & 0 deletions src/lightning-stubs/combobox/combobox.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import { LightningElement, api } from 'lwc';

export default class Combobox extends LightningElement {
@api autocomplete;
@api disabled;
@api dropdownAlignment;
@api fieldLevelHelp;
Expand Down
1 change: 1 addition & 0 deletions src/lightning-stubs/datatable/datatable.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export default class Datatable extends LightningElement {
@api maxColumnWidth;
@api maxRowSelection;
@api minColumnWidth;
@api renderConfig;
@api resizeColumnDisabled;
@api resizeStep;
@api rowNumberOffset;
Expand Down
1 change: 1 addition & 0 deletions src/lightning-stubs/formattedPhone/formattedPhone.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
import { LightningElement, api } from 'lwc';

export default class FormattedPhone extends LightningElement {
@api disabled;
@api value;
}
1 change: 1 addition & 0 deletions src/lightning-stubs/helptext/helptext.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import { LightningElement, api } from 'lwc';

export default class Helptext extends LightningElement {
@api alternativeText;
@api content;
@api iconName;
@api iconVariant;
Expand Down
2 changes: 2 additions & 0 deletions src/lightning-stubs/input/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/lightning-stubs/inputAddress/inputAddress.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default class InputAddress extends LightningElement {
@api cityLabel;
@api cityPlaceholder;
@api country;
@api countryDisabled;
@api countryLabel;
@api countryOptions;
@api countryPlaceholder;
Expand Down
1 change: 1 addition & 0 deletions src/lightning-stubs/inputRichText/inputRichText.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default class InputRichText extends LightningElement {
@api customButtons;
@api disabled;
@api disabledCategories;
@api fieldLevelHelp;
@api formats;
@api label;
@api labelVisible;
Expand Down
1 change: 1 addition & 0 deletions src/lightning-stubs/map/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default class Map extends LightningElement {
@api listView;
@api mapMarkers;
@api markersTitle;
@api options;
@api selectedMarkerValue;
@api showFooter;
@api zoomLevel;
Expand Down
4 changes: 3 additions & 1 deletion src/lightning-stubs/messageService/messageService.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 3 additions & 1 deletion src/lightning-stubs/navigation/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
1 change: 1 addition & 0 deletions src/lightning-stubs/outputField/outputField.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ export default class OutputField extends LightningElement {
@api fieldClass;
@api fieldName;
@api variant;
@api wirePicklistValues() {}
@api wireRecordUi() {}
}
10 changes: 10 additions & 0 deletions src/lightning-stubs/quickActionPanel/quickActionPanel.html
Original file line number Diff line number Diff line change
@@ -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
-->
<template>
<slot></slot>
<slot name="footer"></slot>
</template>
11 changes: 11 additions & 0 deletions src/lightning-stubs/quickActionPanel/quickActionPanel.js
Original file line number Diff line number Diff line change
@@ -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;
}
1 change: 1 addition & 0 deletions src/lightning-stubs/textarea/textarea.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import { LightningElement, api } from 'lwc';

export default class Textarea extends LightningElement {
@api autocomplete;
@api disabled;
@api fieldLevelHelp;
@api label;
Expand Down
10 changes: 10 additions & 0 deletions src/lightning-stubs/uiAppsApi/uiAppsApi.js
Original file line number Diff line number Diff line change
@@ -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();
4 changes: 3 additions & 1 deletion src/lightning-stubs/uiListApi/uiListApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
7 changes: 7 additions & 0 deletions src/lightning-stubs/uiListsApi/uiListsApi.js
Original file line number Diff line number Diff line change
@@ -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();
10 changes: 6 additions & 4 deletions src/lightning-stubs/uiObjectInfoApi/uiObjectInfoApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -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());
8 changes: 5 additions & 3 deletions src/lightning-stubs/uiRecordApi/uiRecordApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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.
Expand Down