File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
packages/vaadin-progress-bar Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 6565 "@open-wc/rollup-plugin-html" : " ^1.2.5" ,
6666 "@open-wc/testing-helpers" : " ^1.8.12" ,
6767 "@polymer/iron-component-page" : " ^4.0.0" ,
68- "@web/dev-server" : " ^0.1.4 " ,
69- "@web/test-runner" : " ^0.12.2 " ,
68+ "@web/dev-server" : " ^0.1.5 " ,
69+ "@web/test-runner" : " ^0.12.6 " ,
7070 "@web/test-runner-saucelabs" : " ^0.4.0" ,
7171 "eslint" : " ^7.15.0" ,
7272 "eslint-config-prettier" : " ^6.15.0" ,
Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ describe('progress bar', () => {
1010 value = progress . shadowRoot . querySelector ( '[part="value"]' ) ;
1111 } ) ;
1212
13+ it ( 'should have a valid version number' , ( ) => {
14+ expect ( progress . constructor . version ) . to . match ( / ^ ( \d + \. ) ? ( \d + \. ) ? ( \d + ) ( - ( a l p h a | b e t a ) \d + ) ? $ / ) ;
15+ } ) ;
16+
1317 it ( 'should have proper scale' , ( ) => {
1418 progress . value = 0.1 ;
1519 expect ( value . getBoundingClientRect ( ) . width / progress . offsetWidth ) . to . be . closeTo ( 0.1 , 0.002 ) ;
@@ -47,6 +51,12 @@ describe('progress bar', () => {
4751 expect ( getComputedStyle ( progress ) . getPropertyValue ( '--vaadin-progress-value' ) ) . to . be . equal ( '0' ) ;
4852 } ) ;
4953
54+ it ( 'should set normalized value to 0.5 if the value is 0 and min is -1' , ( ) => {
55+ progress . min = - 1 ;
56+ progress . value = 0 ;
57+ expect ( getComputedStyle ( progress ) . getPropertyValue ( '--vaadin-progress-value' ) ) . to . be . equal ( '0.5' ) ;
58+ } ) ;
59+
5060 it ( 'should clamp normalized value between 0 and 1' , ( ) => {
5161 progress . value = - 1 ;
5262 expect ( getComputedStyle ( progress ) . getPropertyValue ( '--vaadin-progress-value' ) ) . to . be . equal ( '0' ) ;
You can’t perform that action at this time.
0 commit comments