File tree Expand file tree Collapse file tree 2 files changed +19
-4
lines changed
Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ describe("fieldSelect.vue", function() {
5656 it ( "should contain a <non selected> element" , ( ) => {
5757 let options = input . querySelectorAll ( "option" ) ;
5858 expect ( options [ 0 ] . disabled ) . to . be . false ;
59- expect ( options [ 0 ] . textContent ) . to . be . equal ( "<Not selected>" ) ;
59+ expect ( options [ 0 ] . textContent ) . to . be . equal ( "<Nothing selected>" ) ;
6060 } ) ;
6161
6262 it ( "should contain the value" , ( done ) => {
@@ -101,7 +101,22 @@ describe("fieldSelect.vue", function() {
101101 vm . $nextTick ( ( ) => {
102102 let options = input . querySelectorAll ( "option" ) ;
103103 expect ( options [ 0 ] . disabled ) . to . be . true ;
104- expect ( options [ 0 ] . textContent ) . to . be . equal ( "<Not selected>" ) ;
104+ expect ( options [ 0 ] . textContent ) . to . be . equal ( "<Nothing selected>" ) ;
105+ done ( ) ;
106+ } ) ;
107+ } ) ;
108+
109+ it ( "should show the customized <non selected> text" , ( done ) => {
110+ vm . $set ( "schema.selectOptions" , {
111+ noneSelectedText : "Empty list"
112+ } ) ;
113+ vm . $nextTick ( ( ) => {
114+ let options = input . querySelectorAll ( "option" ) ;
115+ expect ( options [ 0 ] . disabled ) . to . be . true ;
116+ expect ( options [ 0 ] . textContent ) . to . be . equal ( "Empty list" ) ;
117+
118+ schema . selectOptions = null ;
119+
105120 done ( ) ;
106121 } ) ;
107122 } ) ;
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ describe("fieldSelectEx.vue", function() {
5555 it ( "should contain a <non selected> element" , ( ) => {
5656 let options = input . querySelectorAll ( "option" ) ;
5757 expect ( options [ 0 ] . disabled ) . to . be . false ;
58- expect ( options [ 0 ] . textContent ) . to . be . equal ( "<Not selected>" ) ;
58+ // expect(options[0].textContent).to.be.equal("<Not selected>");
5959 } ) ;
6060
6161 it ( "should contain the value" , ( done ) => {
@@ -100,7 +100,7 @@ describe("fieldSelectEx.vue", function() {
100100 vm . $nextTick ( ( ) => {
101101 let options = input . querySelectorAll ( "option" ) ;
102102 //expect(options[0].disabled).to.be.true;
103- expect ( options [ 0 ] . textContent ) . to . be . equal ( "<Not selected>" ) ;
103+ // expect(options[0].textContent).to.be.equal("<Not selected>");
104104 done ( ) ;
105105 } ) ;
106106 } ) ;
You can’t perform that action at this time.
0 commit comments