Skip to content

Commit

Permalink
chore: lightning-components-stubs v1.0.19 (#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
ekashida committed Jul 27, 2022
1 parent 66c2d87 commit 4da770a
Show file tree
Hide file tree
Showing 27 changed files with 221 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/lightning-stubs/alert/alert.html
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
-->
<template></template>
19 changes: 19 additions & 0 deletions src/lightning-stubs/alert/alert.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* 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 Alert extends LightningElement {
static open() {
throw new Error(
'The LightningAlert documentation contains examples for mocking .open in Jest',
);
}
@api label;
@api message;
@api theme;
@api variant;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* Copyright (c) 2022, 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 getStories = createLdsTestWireAdapter(jest.fn());
38 changes: 38 additions & 0 deletions src/lightning-stubs/analyticsWaveApi/analyticsWaveApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,60 @@
*/
import { createLdsTestWireAdapter } from '@salesforce/wire-service-jest-util';

export const createDataConnector = jest.fn();
export const createDataflowJob = jest.fn();
export const createDataset = jest.fn();
export const createDatasetVersion = jest.fn();
export const createReplicatedDataset = jest.fn();
export const deleteDataConnector = jest.fn();
export const deleteDataset = jest.fn();
export const deleteRecipe = jest.fn();
export const deleteReplicatedDataset = jest.fn();
export const executeQuery = createLdsTestWireAdapter(jest.fn());
export const getActions = createLdsTestWireAdapter(jest.fn());
export const getAnalyticsLimits = createLdsTestWireAdapter(jest.fn());
export const getDataConnector = createLdsTestWireAdapter(jest.fn());
export const getDataConnectors = createLdsTestWireAdapter(jest.fn());
export const getDataConnectorSourceFields = createLdsTestWireAdapter(jest.fn());
export const getDataConnectorSourceObject = createLdsTestWireAdapter(jest.fn());
export const getDataConnectorSourceObjectDataPreviewWithFields = createLdsTestWireAdapter(
jest.fn(),
);
export const getDataConnectorSourceObjects = createLdsTestWireAdapter(jest.fn());
export const getDataConnectorStatus = createLdsTestWireAdapter(jest.fn());
export const getDataConnectorTypes = 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 getDataflows = createLdsTestWireAdapter(jest.fn());
export const getDataset = createLdsTestWireAdapter(jest.fn());
export const getDatasets = createLdsTestWireAdapter(jest.fn());
export const getDatasetVersion = createLdsTestWireAdapter(jest.fn());
export const getDatasetVersions = createLdsTestWireAdapter(jest.fn());
export const getDependencies = createLdsTestWireAdapter(jest.fn());
export const getRecipe = createLdsTestWireAdapter(jest.fn());
export const getRecipeNotification = createLdsTestWireAdapter(jest.fn());
export const getRecipes = createLdsTestWireAdapter(jest.fn());
export const getReplicatedDataset = createLdsTestWireAdapter(jest.fn());
export const getReplicatedDatasets = createLdsTestWireAdapter(jest.fn());
export const getReplicatedFields = createLdsTestWireAdapter(jest.fn());
export const getSchedule = createLdsTestWireAdapter(jest.fn());
export const getSecurityCoverageDatasetVersion = createLdsTestWireAdapter(jest.fn());
export const getWaveFolders = createLdsTestWireAdapter(jest.fn());
export const getWaveTemplate = createLdsTestWireAdapter(jest.fn());
export const getWaveTemplateConfig = createLdsTestWireAdapter(jest.fn());
export const getWaveTemplateReleaseNotes = createLdsTestWireAdapter(jest.fn());
export const getWaveTemplates = createLdsTestWireAdapter(jest.fn());
export const getXmd = createLdsTestWireAdapter(jest.fn());
export const ingestDataConnector = jest.fn();
export const updateDataConnector = jest.fn();
export const updateDataflowJob = jest.fn();
export const updateDataset = jest.fn();
export const updateDatasetVersion = jest.fn();
export const updateRecipe = jest.fn();
export const updateRecipeNotification = jest.fn();
export const updateReplicatedDataset = jest.fn();
export const updateReplicatedFields = jest.fn();
export const updateSchedule = jest.fn();
export const updateXmd = jest.fn();
1 change: 1 addition & 0 deletions src/lightning-stubs/button/button.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ export default class Button extends LightningElement {
@api type;
@api value;
@api variant;
@api disableAnimation;
}
1 change: 1 addition & 0 deletions src/lightning-stubs/buttonMenu/buttonMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default class ButtonMenu extends LightningElement {
@api alternativeText;
@api disabled;
@api draftAlternativeText;
@api groupOrder;
@api iconName;
@api iconSize;
@api isDraft;
Expand Down
1 change: 1 addition & 0 deletions src/lightning-stubs/buttonStateful/buttonStateful.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 ButtonStateful extends LightningElement {
@api groupOrder;
@api iconNameWhenHover;
@api iconNameWhenOff;
@api iconNameWhenOn;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
* 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
*/

export const ingestRecord = jest.fn().mockResolvedValue();
7 changes: 7 additions & 0 deletions src/lightning-stubs/confirm/confirm.html
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
-->
<template></template>
19 changes: 19 additions & 0 deletions src/lightning-stubs/confirm/confirm.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* 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 Confirm extends LightningElement {
static open() {
throw new Error(
'The LightningConfirm documentation contains examples for mocking .open in Jest',
);
}
@api label;
@api message;
@api theme;
@api variant;
}
2 changes: 2 additions & 0 deletions src/lightning-stubs/datatable/datatable.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export default class Datatable extends LightningElement {
@api maxRowSelection;
@api minColumnWidth;
@api renderConfig;
@api renderMode;
@api resizeColumnDisabled;
@api resizeStep;
@api rowNumberOffset;
Expand All @@ -33,4 +34,5 @@ export default class Datatable extends LightningElement {
@api suppressBottomBar;
@api wrapTextMaxLines;
@api getSelectedRows() {}
@api openInlineEdit() {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
* 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 getForm = createLdsTestWireAdapter(jest.fn());
export const saveForm = jest.fn();
export const submitForm = jest.fn();
7 changes: 7 additions & 0 deletions src/lightning-stubs/flow/flow.html
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
-->
<template></template>
16 changes: 16 additions & 0 deletions src/lightning-stubs/flow/flow.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* 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 Flow extends LightningElement {
@api flowApiName;
@api flowFinishBehavior;
@api flowInputVariables;
@api flowInterviewId;
@api resumeFlow() {}
@api startFlow() {}
}
1 change: 1 addition & 0 deletions src/lightning-stubs/formattedAddress/formattedAddress.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default class FormattedAddress extends LightningElement {
@api country;
@api disabled;
@api latitude;
@api locale;
@api longitude;
@api postalCode;
@api province;
Expand Down
2 changes: 2 additions & 0 deletions src/lightning-stubs/inputAddress/inputAddress.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { LightningElement, api } from 'lwc';

export default class InputAddress extends LightningElement {
@api addressLabel;
@api addressLookupLabel;
@api addressLookupPlaceholder;
@api city;
@api cityLabel;
Expand All @@ -19,6 +20,7 @@ export default class InputAddress extends LightningElement {
@api countryPlaceholder;
@api disabled;
@api fieldLevelHelp;
@api locale;
@api postalCode;
@api postalCodeLabel;
@api postalCodePlaceholder;
Expand Down
7 changes: 7 additions & 0 deletions src/lightning-stubs/prompt/prompt.html
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
-->
<template></template>
20 changes: 20 additions & 0 deletions src/lightning-stubs/prompt/prompt.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* 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 Prompt extends LightningElement {
static open() {
throw new Error(
'The LightningPrompt documentation contains examples for mocking .open in Jest',
);
}
@api defaultValue;
@api label;
@api message;
@api theme;
@api variant;
}
1 change: 1 addition & 0 deletions src/lightning-stubs/recordEditForm/recordEditForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export default class RecordEditForm extends LightningElement {
@api formClass;
@api layoutType;
@api objectApiName;
@api optionalFields;
@api recordId;
@api recordTypeId;
@api submit() {}
Expand Down
1 change: 1 addition & 0 deletions src/lightning-stubs/recordViewForm/recordViewForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ import { LightningElement, api } from 'lwc';
export default class RecordViewForm extends LightningElement {
@api density;
@api objectApiName;
@api optionalFields;
@api recordId;
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import { LightningElement, api } from 'lwc';

export default class RichTextToolbarButton extends LightningElement {
@api disabled;
@api groupOrder;
@api iconAlternativeText;
@api iconName;
@api order;
@api selected;
@api closePopup() {}
@api showPopup() {}
Expand Down
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
-->
<template></template>
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 ServiceCloudVoiceToolkitApi extends LightningElement {
@api updateNextBestActions() {}
}
1 change: 1 addition & 0 deletions src/lightning-stubs/uiListsApi/uiListsApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
*/
export const getListInfoByName = jest.fn();
export const getListInfosByName = jest.fn();
1 change: 1 addition & 0 deletions src/lightning-stubs/uiRecordApi/uiRecordApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const generateRecordInputForCreate = jest.fn();
export const generateRecordInputForUpdate = jest.fn();
export const createRecordInputFilteredByEditedFields = jest.fn();
export const getRecordInput = jest.fn();
export const getRecordNotifyChange = createLdsTestWireAdapter(jest.fn());
export const refresh = jest.fn().mockResolvedValue();
export const getRecordUi = createLdsTestWireAdapter(jest.fn());

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
* 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 executeQuery = createLdsTestWireAdapter(jest.fn());

export const getJwt = createLdsTestWireAdapter(jest.fn());
11 changes: 11 additions & 0 deletions src/lightning-stubs/unstable_uiSearchApi/unstable_uiSearchApi.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 { createLdsTestWireAdapter } from '@salesforce/wire-service-jest-util';

export const unstable_getSearchResults = createLdsTestWireAdapter(jest.fn());
export const unstable_getKeywordSearchResults = createLdsTestWireAdapter(jest.fn());
export const unstable_getSearchFilterOptions = createLdsTestWireAdapter(jest.fn());

0 comments on commit 4da770a

Please sign in to comment.