fix(ui): improve test experience in dev-mode

This commit is contained in:
Thijs Louisse 2024-10-30 14:23:20 +01:00 committed by Thijs Louisse
parent 7c2b4692d3
commit 1626dbd460
12 changed files with 74 additions and 0 deletions

View file

@ -0,0 +1,5 @@
---
'@lion/ui': patch
---
improve test experience in dev-mode by limiting verbose warnings

View file

@ -369,6 +369,12 @@ export class LionCalendar extends LocalizeMixin(LitElement) {
}
}
/**
* // TODO: check if this is a false positive or if we can improve
* @configure ReactiveElement
*/
static enabledWarnings = super.enabledWarnings?.filter(w => w !== 'change-in-update') || [];
/**
* @private
*/

View file

@ -49,6 +49,13 @@ const DisabledWithTabIndexMixinImplementation = superclass =>
}
}
/**
* // TODO: check if this is a false positive or if we can improve
* @configure ReactiveElement
*/
// @ts-expect-error
static enabledWarnings = super.enabledWarnings?.filter(w => w !== 'change-in-update') || [];
/**
* @param {number} value
* @private

View file

@ -152,6 +152,12 @@ const FormControlMixinImplementation = superclass =>
return /** @type {LionValidationFeedback} */ (this.__getDirectSlotChild('feedback'));
}
/**
* TODO: check if this is a false positive or if we can improve
* @configure ReactiveElement
*/
static enabledWarnings = super.enabledWarnings?.filter(w => w !== 'change-in-update') || [];
constructor() {
super();

View file

@ -56,6 +56,13 @@ const SyncUpdatableMixinImplementation = superclass =>
this.__SyncUpdatableNamespace.connected = false;
}
/**
* // TODO: check if this is a false positive or if we can improve
* @configure ReactiveElement
*/
// @ts-expect-error
static enabledWarnings = super.enabledWarnings?.filter(w => w !== 'change-in-update') || [];
/**
* Makes the propertyAccessor.`hasChanged` compatible in synchronous updates
* @param {string} name

View file

@ -102,6 +102,12 @@ export class LionIcon extends LitElement {
this.__svg = nothing;
}
/**
* TODO: check if this is a false positive or if we can improve
* @configure ReactiveElement
*/
static enabledWarnings = super.enabledWarnings?.filter(w => w !== 'change-in-update') || [];
/** @param {import('lit').PropertyValues} changedProperties */
update(changedProperties) {
super.update(changedProperties);

View file

@ -189,6 +189,13 @@ export const OverlayMixinImplementation = superclass =>
}
}
/**
* // TODO: check if this is a false positive or if we can improve
* @configure ReactiveElement
*/
// @ts-expect-error
static enabledWarnings = super.enabledWarnings?.filter(w => w !== 'change-in-update') || [];
get _overlayInvokerNode() {
return /** @type {HTMLElement | undefined} */ (
Array.from(this.children).find(child => child.slot === 'invoker')

View file

@ -93,6 +93,12 @@ export class LionProgressIndicator extends LocalizeMixin(LitElement) {
return !this.hasAttribute('value');
}
/**
* // TODO: check if this is a false positive or if we can improve
* @configure ReactiveElement
*/
static enabledWarnings = super.enabledWarnings?.filter(w => w !== 'change-in-update') || [];
/**
* In case of a determinate progress-indicator it returns the progress percentage
* based on value, min & max.

View file

@ -115,4 +115,10 @@ export class LionStep extends LitElement {
const result = this.condition(data);
return this.invertCondition ? !result : result;
}
/**
* // TODO: check if this is a false positive or if we can improve
* @configure ReactiveElement
*/
static enabledWarnings = super.enabledWarnings?.filter(w => w !== 'change-in-update') || [];
}

View file

@ -108,6 +108,12 @@ export class LionSteps extends LitElement {
);
}
/**
* // TODO: check if this is a false positive or if we can improve
* @configure ReactiveElement
*/
static enabledWarnings = super.enabledWarnings?.filter(w => w !== 'change-in-update') || [];
/**
* @param {number} newCurrent
* @param {number} oldCurrent

View file

@ -188,6 +188,12 @@ export class LionTabs extends LitElement {
);
}
/**
* // TODO: check if this is a false positive or if we can improve
* @configure ReactiveElement
*/
static enabledWarnings = super.enabledWarnings?.filter(w => w !== 'change-in-update') || [];
/** @private */
__setupSlots() {
if (this.shadowRoot) {

View file

@ -55,6 +55,12 @@ export class LionTooltip extends ArrowMixin(OverlayMixin(LitElement)) {
this.invokerRelation = 'description';
}
/**
* // TODO: check if this is a false positive or if we can improve
* @configure ReactiveElement
*/
static enabledWarnings = super.enabledWarnings?.filter(w => w !== 'change-in-update') || [];
/** @protected */
// eslint-disable-next-line class-methods-use-this
_defineOverlayConfig() {