@lion/validate
Advanced tools
Comparing version 0.9.1 to 0.9.2
@@ -6,2 +6,10 @@ # Change Log | ||
## [0.9.2](https://github.com/ing-bank/lion/compare/@lion/validate@0.9.1...@lion/validate@0.9.2) (2020-04-29) | ||
**Note:** Version bump only for package @lion/validate | ||
## [0.9.1](https://github.com/ing-bank/lion/compare/@lion/validate@0.9.0...@lion/validate@0.9.1) (2020-04-02) | ||
@@ -8,0 +16,0 @@ |
{ | ||
"name": "@lion/validate", | ||
"version": "0.9.1", | ||
"version": "0.9.2", | ||
"description": "Validate your form elements", | ||
@@ -39,6 +39,6 @@ "author": "ing-bank", | ||
"dependencies": { | ||
"@lion/core": "0.5.1", | ||
"@lion/localize": "0.9.1" | ||
"@lion/core": "0.5.2", | ||
"@lion/localize": "0.9.2" | ||
}, | ||
"gitHead": "b58aa65377d5e7a0cd4d87917980291c832e7120" | ||
"gitHead": "2476211c21e3f785a909c71e8f94ff307fc6a4fc" | ||
} |
# Validate | ||
> ## 🛠 Status: Pilot Phase | ||
> Lion Web Components are still in an early alpha stage; they should not be considered production ready yet. | ||
> | ||
> The goal of our pilot phase is to gather feedback from a private group of users. | ||
> Therefore, during this phase, we kindly ask you to: | ||
> - not publicly promote or link us yet: (no tweets, blog posts or other forms of communication about Lion Web Components) | ||
> - not publicly promote or link products derived from/based on Lion Web Components | ||
> | ||
> As soon as Pilot Phase ends we will let you know (feel free to subscribe to this issue https://github.com/ing-bank/lion/issues/1) | ||
## Features | ||
@@ -14,0 +4,0 @@ |
@@ -45,9 +45,9 @@ import { html, LitElement } from '@lion/core'; | ||
${this.feedbackData && | ||
this.feedbackData.map( | ||
({ message, type, validator }) => html` | ||
${this._messageTemplate({ message, type, validator })} | ||
`, | ||
)} | ||
this.feedbackData.map( | ||
({ message, type, validator }) => html` | ||
${this._messageTemplate({ message, type, validator })} | ||
`, | ||
)} | ||
`; | ||
} | ||
} |
@@ -1,10 +0,9 @@ | ||
import { expect, fixture, html, unsafeStatic, defineCE } from '@open-wc/testing'; | ||
import sinon from 'sinon'; | ||
import { LitElement } from '@lion/core'; | ||
import { localize } from '@lion/localize'; | ||
import { localizeTearDown } from '@lion/localize/test-helpers.js'; | ||
import { defineCE, expect, fixture, html, unsafeStatic } from '@open-wc/testing'; | ||
import sinon from 'sinon'; | ||
import { DefaultSuccess, MinLength, Required, ValidateMixin, Validator } from '../index.js'; | ||
import { AlwaysInvalid } from '../test-helpers.js'; | ||
import { Validator, Required, MinLength, DefaultSuccess, ValidateMixin } from '../index.js'; | ||
export function runValidateMixinFeedbackPart() { | ||
@@ -244,5 +243,3 @@ describe('Validity Feedback', () => { | ||
render() { | ||
return html` | ||
Custom for ${this.feedbackData[0].validator.constructor.name} | ||
`; | ||
return html`Custom for ${this.feedbackData[0].validator.constructor.name}`; | ||
} | ||
@@ -249,0 +246,0 @@ }, |
/* eslint-disable no-unused-vars, no-param-reassign */ | ||
import { expect, fixture, html } from '@open-wc/testing'; | ||
import sinon from 'sinon'; | ||
import { fixture, html, expect } from '@open-wc/testing'; | ||
import '../lion-validation-feedback.js'; | ||
@@ -9,7 +9,3 @@ import { AlwaysInvalid, AlwaysValid } from '../test-helpers.js'; | ||
it('renders a validation message', async () => { | ||
const el = await fixture( | ||
html` | ||
<lion-validation-feedback></lion-validation-feedback> | ||
`, | ||
); | ||
const el = await fixture(html`<lion-validation-feedback></lion-validation-feedback>`); | ||
expect(el).shadowDom.to.equal(''); | ||
@@ -22,7 +18,3 @@ el.feedbackData = [{ message: 'hello', type: 'error', validator: new AlwaysInvalid() }]; | ||
it('renders the validation type attribute', async () => { | ||
const el = await fixture( | ||
html` | ||
<lion-validation-feedback></lion-validation-feedback> | ||
`, | ||
); | ||
const el = await fixture(html`<lion-validation-feedback></lion-validation-feedback>`); | ||
el.feedbackData = [{ message: 'hello', type: 'error', validator: new AlwaysInvalid() }]; | ||
@@ -38,7 +30,3 @@ await el.updateComplete; | ||
it('success message clears after 3s', async () => { | ||
const el = await fixture( | ||
html` | ||
<lion-validation-feedback></lion-validation-feedback> | ||
`, | ||
); | ||
const el = await fixture(html`<lion-validation-feedback></lion-validation-feedback>`); | ||
@@ -63,7 +51,3 @@ const clock = sinon.useFakeTimers(); | ||
it('does not clear error messages', async () => { | ||
const el = await fixture( | ||
html` | ||
<lion-validation-feedback></lion-validation-feedback> | ||
`, | ||
); | ||
const el = await fixture(html`<lion-validation-feedback></lion-validation-feedback>`); | ||
@@ -70,0 +54,0 @@ const clock = sinon.useFakeTimers(); |
210818
4377
85
+ Added@lion/core@0.5.2(transitive)
+ Added@lion/localize@0.9.2(transitive)
- Removed@lion/core@0.5.1(transitive)
- Removed@lion/localize@0.9.1(transitive)
Updated@lion/core@0.5.2
Updated@lion/localize@0.9.2