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

Update stubs #134

Merged
merged 2 commits into from
Mar 3, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 1 addition & 2 deletions src/lightning-stubs/button/button.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@ export default class Button extends LightningElement {
@api type
@api value
@api variant
@api focus() {}
}
}
3 changes: 1 addition & 2 deletions src/lightning-stubs/buttonIcon/buttonIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ export default class ButtonIcon extends LightningElement {
@api type
@api value
@api variant
@api focus() {}
}
}
3 changes: 1 addition & 2 deletions src/lightning-stubs/buttonIconStateful/buttonIconStateful.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@ export default class ButtonIconStateful extends LightningElement {
@api size
@api value
@api variant
@api focus() {}
}
}
3 changes: 1 addition & 2 deletions src/lightning-stubs/buttonMenu/buttonMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ export default class ButtonMenu extends LightningElement {
@api tooltip
@api value
@api variant
@api focus() {}
}
}
1 change: 0 additions & 1 deletion src/lightning-stubs/buttonStateful/buttonStateful.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@ export default class ButtonStateful extends LightningElement {
@api labelWhenOn
@api selected
@api variant
@api focus() {}
}
2 changes: 1 addition & 1 deletion src/lightning-stubs/card/card.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ export default class Card extends LightningElement {
@api iconName
@api title
@api variant
}
}
3 changes: 1 addition & 2 deletions src/lightning-stubs/checkboxGroup/checkboxGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ export default class CheckboxGroup extends LightningElement {
@api value
@api variant
@api checkValidity() {}
@api focus() {}
@api reportValidity() {}
@api setCustomValidity() {}
@api showHelpMessageIfInvalid() {}
}
}
2 changes: 0 additions & 2 deletions src/lightning-stubs/combobox/combobox.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ export default class Combobox extends LightningElement {
@api validity
@api value
@api variant
@api blur() {}
@api checkValidity() {}
@api focus() {}
@api reportValidity() {}
@api setCustomValidity() {}
@api showHelpMessageIfInvalid() {}
Expand Down
7 changes: 4 additions & 3 deletions src/lightning-stubs/configProvider/configProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
* SPDX-License-Identifier: MIT
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
*/
export default configProviderService = jest.fn();
const configProviderService = jest.fn();
export default configProviderService;
export const getPathPrefix = jest.fn();
export const getToken = jest.fn();
export const getLocale = jest.fn();
export const getFormFactor = jest.fn();
export const getLocalizationService = jest.fn();
export const sanitizeDOM = jest.fn();
export const getCoreInfo = jest.fn();
export const getIconSvgTemplates = jest.fn();
export const getOneConfig = jest.fn();
1 change: 1 addition & 0 deletions src/lightning-stubs/datatable/datatable.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ export default class Datatable extends LightningElement {
@api sortedBy
@api sortedDirection
@api suppressBottomBar
@api wrapTextMaxLines
@api getSelectedRows() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,10 @@
* SPDX-License-Identifier: MIT
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
*/
import { api } from 'lwc';
export const baseNavigation = superclass => {
return class extends superclass {
@api keyboardMode
@api focus
[updateActionables]() {}
[handleArrowKeyDown]() {}
[handleArrowLeft]() {}
[handleArrowRight]() {}
[handleTabKey]() {}
[getActiveElement]() {}
[moveToPreviousOf]() {}
[moveToNextOf]() {}
};
};
1 change: 0 additions & 1 deletion src/lightning-stubs/dualListbox/dualListbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export default class DualListbox extends LightningElement {
@api value
@api variant
@api checkValidity() {}
@api focus() {}
@api reportValidity() {}
@api setCustomValidity() {}
@api showHelpMessageIfInvalid() {}
Expand Down
11 changes: 11 additions & 0 deletions src/lightning-stubs/empApi/empApi.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
*/
export const subscribe = jest.fn().mockResolvedValue({});
export const unsubscribe = jest.fn().mockResolvedValue({});
export const onError = jest.fn().mockResolvedValue(jest.fn());
export const setDebugFlag = jest.fn().mockResolvedValue();
export const isEmpEnabled = jest.fn().mockResolvedValue();
3 changes: 0 additions & 3 deletions src/lightning-stubs/formattedEmail/formattedEmail.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,4 @@ export default class FormattedEmail extends LightningElement {
@api hideIcon
@api label
@api value
@api blur() {}
@api click() {}
@api focus() {}
}
3 changes: 0 additions & 3 deletions src/lightning-stubs/formattedPhone/formattedPhone.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,4 @@ import { LightningElement, api } from 'lwc';

export default class FormattedPhone extends LightningElement {
@api value
@api blur() {}
@api click() {}
@api focus() {}
}
2 changes: 0 additions & 2 deletions src/lightning-stubs/formattedUrl/formattedUrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,4 @@ export default class FormattedUrl extends LightningElement {
@api target
@api tooltip
@api value
@api blur() {}
@api focus() {}
}
4 changes: 1 addition & 3 deletions src/lightning-stubs/input/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,8 @@ export default class Input extends LightningElement {
@api validity
@api value
@api variant
@api blur() {}
@api checkValidity() {}
@api focus() {}
@api reportValidity() {}
@api setCustomValidity() {}
@api showHelpMessageIfInvalid() {}
}
}
2 changes: 0 additions & 2 deletions src/lightning-stubs/inputAddress/inputAddress.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ export default class InputAddress extends LightningElement {
@api streetLabel
@api validity
@api variant
@api blur() {}
@api checkValidity() {}
@api focus() {}
@api reportValidity() {}
@api setCustomValidityForField() {}
@api showHelpMessageIfInvalid() {}
Expand Down
2 changes: 0 additions & 2 deletions src/lightning-stubs/inputLocation/inputLocation.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ export default class InputLocation extends LightningElement {
@api required
@api validity
@api variant
@api blur() {}
@api checkValidity() {}
@api focus() {}
@api reportValidity() {}
@api setCustomValidityForField() {}
@api showHelpMessageIfInvalid() {}
Expand Down
8 changes: 6 additions & 2 deletions src/lightning-stubs/inputName/inputName.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,24 @@ export default class InputName extends LightningElement {
@api fieldLevelHelp
@api fieldsToDisplay
@api firstName
@api firstNameLabel
@api informalName
@api informalNameLabel
@api label
@api lastName
@api lastNameLabel
@api middleName
@api middleNameLabel
@api options
@api readOnly
@api required
@api salutation
@api salutationLabel
@api suffix
@api suffixLabel
@api validity
@api variant
@api blur() {}
@api checkValidity() {}
@api focus() {}
@api reportValidity() {}
@api setCustomValidityForField() {}
@api showHelpMessageIfInvalid() {}
Expand Down
2 changes: 0 additions & 2 deletions src/lightning-stubs/inputRichText/inputRichText.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ export default class InputRichText extends LightningElement {
@api valid
@api value
@api variant
@api blur() {}
@api focus() {}
@api getFormat() {}
@api insertTextAtCursor() {}
@api setFormat() {}
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 selectedMarkerValue
@api showFooter
@api zoomLevel
}
2 changes: 1 addition & 1 deletion src/lightning-stubs/menuItem/menuItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import { LightningElement, api } from 'lwc';
export default class MenuItem extends LightningElement {
@api checked
@api disabled
@api download
@api draftAlternativeText
@api href
@api iconName
@api isDraft
@api label
@api prefixIconName
@api value
@api focus() {}
}
8 changes: 8 additions & 0 deletions src/lightning-stubs/pageReferenceUtils/pageReferenceUtils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
* 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 encodeDefaultFieldValues = jest.fn();
export const decodeDefaultFieldValues = jest.fn();
1 change: 0 additions & 1 deletion src/lightning-stubs/pillContainer/pillContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ export default class PillContainer extends LightningElement {
@api label
@api singleLine
@api variant
@api focus() {}
}
1 change: 0 additions & 1 deletion src/lightning-stubs/radioGroup/radioGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export default class RadioGroup extends LightningElement {
@api value
@api variant
@api checkValidity() {}
@api focus() {}
@api reportValidity() {}
@api setCustomValidity() {}
@api showHelpMessageIfInvalid() {}
Expand Down
2 changes: 1 addition & 1 deletion src/lightning-stubs/recordEditForm/recordEditForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ export default class RecordEditForm extends LightningElement {
@api recordId
@api recordTypeId
@api submit() {}
}
}
2 changes: 1 addition & 1 deletion src/lightning-stubs/recordForm/recordForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ export default class RecordForm extends LightningElement {
@api recordId
@api recordTypeId
@api submit() {}
}
}
2 changes: 1 addition & 1 deletion src/lightning-stubs/recordViewForm/recordViewForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ export default class RecordViewForm extends LightningElement {
@api density
@api objectApiName
@api recordId
}
}
2 changes: 0 additions & 2 deletions src/lightning-stubs/slider/slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ export default class Slider extends LightningElement {
@api validity
@api value
@api variant
@api blur() {}
@api checkValidity() {}
@api focus() {}
@api reportValidity() {}
@api setCustomValidity() {}
@api showHelpMessageIfInvalid() {}
Expand Down
2 changes: 2 additions & 0 deletions src/lightning-stubs/tab/tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import { LightningElement, api } from 'lwc';

export default class Tab extends LightningElement {
@api endIconAlternativeText
@api endIconName
@api iconAssistiveText
@api iconName
@api label
Expand Down
2 changes: 0 additions & 2 deletions src/lightning-stubs/textarea/textarea.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ export default class Textarea extends LightningElement {
@api validity
@api value
@api variant
@api blur() {}
@api checkValidity() {}
@api focus() {}
@api reportValidity() {}
@api setCustomValidity() {}
@api showHelpMessageIfInvalid() {}
Expand Down
2 changes: 1 addition & 1 deletion src/lightning-stubs/tree/tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ export default class Tree extends LightningElement {
@api header
@api items
@api selectedItem
}
}