Produced by Araxis Merge on 12/7/2018 11:36:03 AM Central Standard Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | C:\SCRUB\MHED\MHED\VAR 4.10.0\var-web-release-4.10@e10f18de1ef\veteran-appointment-requests\app\modules\new-appointment-request\tests\direct\views | direct-scheduling-spec.js | Mon Oct 22 23:25:20 2018 UTC |
| 2 | C:\MHED-scrubbed\MHED\MHED\VAR 4.10.0\var-web-release-4.10@e10f18de1ef\veteran-appointment-requests\app\modules\new-appointment-request\tests\direct\views | direct-scheduling-spec.js | Fri Dec 7 13:07:36 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 4 | 1226 |
| Changed | 3 | 6 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | define([ | |
| 2 | 'under score', | |
| 3 | 'jquer y', | |
| 4 | 'backb one', | |
| 5 | 'momen t', | |
| 6 | 'modul es/new-app ointment-r equest/vie ws/direct/ clinics/la yout-view' , | |
| 7 | 'modul es/new-app ointment-r equest/vie ws/direct/ layout-vie w', | |
| 8 | 'modul es/new-app ointment-r equest/vie ws/direct/ preferred- date/selec ted-date-t ime', | |
| 9 | 'modul es/new-app ointment-r equest/res ources/dir ect/clinic s/collecti on', | |
| 10 | 'modul es/new-app ointment-r equest/tes ts/helpers /clinics-h elper', | |
| 11 | ], functio n(_, $, Ba ckbone, mo ment, View , DetailsV iew, DateV iew, Colle ction, hel pers) { | |
| 12 | 'use s trict'; | |
| 13 | ||
| 14 | ||
| 15 | /** | |
| 16 | * As a veteran directly b ooking an appointmen t in VAR | |
| 17 | * I w ant to see a list wh ich clinic s are avai lable for a given ty pe of care at my sel ected loca tion | |
| 18 | * So that I can schedule an appoint ment | |
| 19 | */ | |
| 20 | descri be('Specif ication fo r VAR-7748 ', functio n() { | |
| 21 | va r region; | |
| 22 | ||
| 23 | be foreEach(f unction() { | |
| 24 | region = helpers.s etupTestin gRegion(); | |
| 25 | }) ; | |
| 26 | ||
| 27 | af terEach(he lpers.rese tTestingRe gion); | |
| 28 | ||
| 29 | /* * | |
| 30 | * When a us er views t he appoint ment detai ls section of the Ne w appointm ent/Reques t form, | |
| 31 | * after sel ecting “Sc hedule Mys elf” the f ollowing f ields are shown: | |
| 32 | * | |
| 33 | * 1. Clin ic, requir ed field | |
| 34 | * | |
| 35 | * 1.1. Disp lays all c linics mat ching the stop code definition for the s elected | |
| 36 | * type of care a nd the sel ected loca tion, wher e the clin ic profile flag for allow | |
| 37 | * dire ct schedul ing = yes, and the p rofile fla g for disp lay in VAR = yes. | |
| 38 | * / | |
| 39 | de scribe('Cl inic Displ ay', funct ion() { | |
| 40 | ||
| 41 | ||
| 42 | /** | |
| 43 | * 1.2. If only on e clinic i s offered, the form displays t he single clinic (an d its loca tion) | |
| 44 | * as st atic text. | |
| 45 | * 1.2.1 . Display format: | |
| 46 | * 1.2.1 .1. Clinic Name | |
| 47 | * 1.2.1 .2. Clinic Friendly Location N ame | |
| 48 | */ | |
| 49 | describe ('Single C linic', fu nction() { | |
| 50 | var view; | |
| 51 | var clinics; | |
| 52 | ||
| 53 | befo reEach(fun ction() { | |
| 54 | var option s; | |
| 55 | helpers.co llectionFe tchSpy(); | |
| 56 | ||
| 57 | options = { | |
| 58 | custom Messages: new Backbo ne.Model() , | |
| 59 | model: helpers.l ayoutModel Factory(), | |
| 60 | }; | |
| 61 | region.sho w(new View (options)) ; | |
| 62 | view = reg ion.curren tView; | |
| 63 | ||
| 64 | clinics = [helpers.g etMockClin icList()[0 ]]; | |
| 65 | ||
| 66 | view.colle ction = ne w Collecti on(clinics , {parse: true}); | |
| 67 | }); | |
| 68 | ||
| 69 | it(' generates the correc t text', f unction() { | |
| 70 | var $clini c; | |
| 71 | var $label ; | |
| 72 | ||
| 73 | view.showC linics(); | |
| 74 | $clinic = view.$('#c linic'); | |
| 75 | $label = $ clinic.fin d('.label- text > p') ; | |
| 76 | ||
| 77 | expect($cl inic.text( )).toConta in(clinics [0].clinic Name); | |
| 78 | expect($la bel.text() ).toBe(cli nics[0].cl inicFriend lyLocation Name); | |
| 79 | }); | |
| 80 | }); | |
| 81 | ||
| 82 | ||
| 83 | /** | |
| 84 | * 1.3. If more th an one cli nic option is availa ble, each option is listed as a selectio n in a rad io button list. | |
| 85 | * 1.3.1 . Radio bu tton displ ay format: | |
| 86 | * 1.3.1 .1. Clinic Name | |
| 87 | * 1.3.1 .2. Clinic Friendly Location N ame | |
| 88 | * | |
| 89 | * 1.3.2 . The list is ordere d alphabet ically by clinic nam e | |
| 90 | */ | |
| 91 | describe ('Multiple Clinics', function( ) { | |
| 92 | var view; | |
| 93 | var clinics; | |
| 94 | ||
| 95 | befo reEach(fun ction() { | |
| 96 | var option s; | |
| 97 | helpers.co llectionFe tchSpy(); | |
| 98 | ||
| 99 | options = { | |
| 100 | custom Messages: new Backbo ne.Model() , | |
| 101 | model: helpers.l ayoutModel Factory(), | |
| 102 | }; | |
| 103 | region.sho w(new View (options)) ; | |
| 104 | view = reg ion.curren tView; | |
| 105 | ||
| 106 | clinics = helpers.ge tMockClini cList(); | |
| 107 | ||
| 108 | view.colle ction = ne w Collecti on(clinics , {parse: true}); | |
| 109 | }); | |
| 110 | ||
| 111 | it(' generates the correc t text', f unction() { | |
| 112 | var id; | |
| 113 | var $input ; | |
| 114 | var $label ; | |
| 115 | var name; | |
| 116 | var locati onName; | |
| 117 | ||
| 118 | view.showC linics(); | |
| 119 | id = '#cli nic-' + cl inics[0].c linicId; | |
| 120 | $input = v iew.$(id); | |
| 121 | $label = $ input.pare nt(); | |
| 122 | ||
| 123 | name = $la bel.find(' span > spa n > span') .text(); | |
| 124 | locationNa me = $labe l.find('p' ).text(); | |
| 125 | ||
| 126 | expect(nam e).toConta in(clinics [0].clinic Name); | |
| 127 | expect(loc ationName) .toBe(clin ics[0].cli nicFriendl yLocationN ame); | |
| 128 | }); | |
| 129 | ||
| 130 | it(' orders the clinics a lphabetica lly by nam e', functi on() { | |
| 131 | var labels ; | |
| 132 | var labelT ext; | |
| 133 | ||
| 134 | view.showC linics(); | |
| 135 | labels = v iew.$('lab el > .labe l-text'); | |
| 136 | labelText = _.map(la bels, func tion(el) { | |
| 137 | return helpers.c leanString (el.innerT ext); | |
| 138 | }); | |
| 139 | ||
| 140 | console.lo g(labelTex t); | |
| 141 | expect(lab elText[0]. localeComp are(labelT ext[1])).t oBe(-1); | |
| 142 | expect(lab elText[1]. localeComp are(labelT ext[2])).t oBe(-1); | |
| 143 | }); | |
| 144 | }); | |
| 145 | }) ; | |
| 146 | ||
| 147 | ||
| 148 | /* * | |
| 149 | * 1.4. When a user se lects a cl inic, the app checks for avail able slots in the ne xt 90 days . | |
| 150 | * / | |
| 151 | de scribe('Ap pointment Slots', fu nction() { | |
| 152 | ||
| 153 | ||
| 154 | describe ('With Slo ts', funct ion() { | |
| 155 | var view; | |
| 156 | var clinics; | |
| 157 | var slots; | |
| 158 | ||
| 159 | befo reEach(fun ction() { | |
| 160 | var option s; | |
| 161 | var layout ; | |
| 162 | ||
| 163 | helpers.co llectionFe tchSpy(); | |
| 164 | ||
| 165 | options = { | |
| 166 | custom Messages: new Backbo ne.Model() , | |
| 167 | model: helpers.l ayoutModel Factory(), | |
| 168 | }; | |
| 169 | region.sho w(new View (options)) ; | |
| 170 | layout = r egion.curr entView; | |
| 171 | ||
| 172 | clinics = helpers.ge tMockClini cList(); | |
| 173 | ||
| 174 | layout.col lection = new Collec tion(clini cs, {parse : true}); | |
| 175 | layout.sho wClinics() ; | |
| 176 | view = lay out.getReg ion('conta inerRegion ').current View; | |
| 177 | ||
| 178 | spyOn(view , 'updateF DNS el').and.c allThrough (); | |
| 179 | spyOn(view , 'showErr orMessage' ).and.call Fake(_.noo p); | |
| 180 | }); | |
| 181 | ||
| 182 | /** | |
| 183 | * 1 .4.1. Load ing spinne r displays if needed while the app deter mines avai lable slot s. | |
| 184 | */ | |
| 185 | // T EST REMOVE D. This i s handled by the fra mework. | |
| 186 | ||
| 187 | /** | |
| 188 | * C onclusion for 1.4.1 | |
| 189 | */ | |
| 190 | it(' hides the spinner af ter fetch' , function () { | |
| 191 | view.$('in put:first' ).click(); | |
| 192 | view.fetch SlotsSucce ss(new Bac kbone.Coll ection()); | |
| 193 | expect($(' .loaderMod alMask').l ength).toB e(0); | |
| 194 | }); | |
| 195 | ||
| 196 | /** | |
| 197 | * 1 .4.1.1. If slots are found, th e app move s focus to the next field. | |
| 198 | */ | |
| 199 | xit( 'changes f ocus when slots are found', fu nction() { | |
| 200 | // TODO Th is test ca n not pass when writ ten like t his | |
| 201 | // TODO Be cause the region tha t shows th e next sec tion does not exist | |
| 202 | // TODO Cr eate a tes t for pref erred date that chec ks that it give the label focu s | |
| 203 | ||
| 204 | var fakeDa ta = slots [0]; | |
| 205 | fakeData.a ppointment Time = hel pers.getAp pointmentS lots(); | |
| 206 | ||
| 207 | view.$('in put:first' ).click(); | |
| 208 | view.fetch SlotsSucce ss(new Bac kbone.Coll ection([fa keData])); | |
| 209 | ||
| 210 | expect(vie w.updateF DNS el).toHave BeenCalled (); | |
| 211 | expect($(' :focus').t agName).to Be('label' ); | |
| 212 | }); | |
| 213 | }); | |
| 214 | ||
| 215 | ||
| 216 | describe ('Without Slots', fu nction() { | |
| 217 | var view; | |
| 218 | ||
| 219 | befo reAll(func tion() { | |
| 220 | $('.ui-pop up-screen' ).each(fun ction() { | |
| 221 | $(this ).remove() ; | |
| 222 | }); | |
| 223 | }); | |
| 224 | ||
| 225 | befo reEach(fun ction() { | |
| 226 | var option s; | |
| 227 | var layout ; | |
| 228 | var clinic s; | |
| 229 | ||
| 230 | helpers.co llectionFe tchSpy(); | |
| 231 | ||
| 232 | options = { | |
| 233 | custom Messages: new Backbo ne.Model() , | |
| 234 | model: helpers.l ayoutModel Factory(), | |
| 235 | }; | |
| 236 | region.sho w(new View (options)) ; | |
| 237 | layout = r egion.curr entView; | |
| 238 | clinics = helpers.ge tMockClini cList(); | |
| 239 | ||
| 240 | layout.col lection = new Collec tion(clini cs, {parse : true}); | |
| 241 | ||
| 242 | layout.sho wClinics() ; | |
| 243 | view = lay out.getReg ion('conta inerRegion ').current View; | |
| 244 | spyOn(view , 'updateF DNS el').and.c allThrough (); | |
| 245 | }); | |
| 246 | ||
| 247 | /** | |
| 248 | * 1 .4.1.1. If slots are found, th e app move s focus to the next field. | |
| 249 | */ | |
| 250 | it(' creates an error mod al', funct ion() { | |
| 251 | var modal; | |
| 252 | ||
| 253 | view.check Clinic(vie w.model); | |
| 254 | view.slots .trigger(' fetch:succ ess', new Backbone.C ollection( )); | |
| 255 | ||
| 256 | modal = $( '.ui-popup -screen'); | |
| 257 | ||
| 258 | expect(mod al.length) .toBe(1); | |
| 259 | }); | |
| 260 | ||
| 261 | /** | |
| 262 | * 1 .4.1.2.1. Modal Head er: No Ava ilable App ointments | |
| 263 | * 1 .4.1.2.2. Modal Text : Unfortun ately, the re are no available time slots at this c linic. | |
| 264 | * Please sel ect anothe r clinic o r change y our schedu ling metho d to | |
| 265 | * "Submit a Request to VA Schedu ler.” | |
| 266 | * 1 .4.1.2.3. OK button | |
| 267 | */ | |
| 268 | it(' displays t he correct text in t he error m odel', fun ction() { | |
| 269 | var title; | |
| 270 | var text; | |
| 271 | ||
| 272 | view.check Clinic(vie w.model); | |
| 273 | view.slots .trigger(' fetch:succ ess', new Backbone.C ollection( )); | |
| 274 | ||
| 275 | title = $( '.ui-title ')[0].inne rText; | |
| 276 | text = $(' .ui-conten t > p')[0] .innerText ; | |
| 277 | ||
| 278 | expect(tit le).toBe(' No Availab le Appoint ments'); | |
| 279 | expect(tex t).toBe('U nfortunate ly, there are no ava ilable tim e slots at this clin ic. Please select an other clin ic or chan ge your sc heduling m ethod to " Submit a R equest to VA Schedul er.”'); | |
| 280 | }); | |
| 281 | ||
| 282 | /** | |
| 283 | * 1 .4.1.2.3.1 . When OK is chosen, the user' s focus is returned to the cli nic field label. | |
| 284 | */ | |
| 285 | xit( 'restores focus corr ectly afte r okay is clicked', function() { | |
| 286 | // TODO I have to do this from an outer view. The area it i s trying t o restore focus too does not e xist in th is limited view. | |
| 287 | view.check Clinic(vie w.model); | |
| 288 | view.slots .trigger(' fetch:succ ess', new Backbone.C ollection( )); | |
| 289 | $('button' ).click(); | |
| 290 | ||
| 291 | expect($(' :focus').l ength).toB e(1); | |
| 292 | }); | |
| 293 | }); | |
| 294 | }) ; | |
| 295 | ||
| 296 | ||
| 297 | /* * | |
| 298 | * 2. Reason for Appoi ntment | |
| 299 | * 2.1. Requ ired | |
| 300 | * 2.2. Mult i line tex t box, 150 character s, display character countdown in right corner | |
| 301 | * / | |
| 302 | de scribe('Re ason For A ppointment ', functio n() { | |
| 303 | var view ; | |
| 304 | ||
| 305 | beforeEa ch(functio n() { | |
| 306 | var model; | |
| 307 | var options; | |
| 308 | help ers.collec tionFetchS py(); | |
| 309 | ||
| 310 | mode l = helper s.layoutMo delFactory (); | |
| 311 | mode l.set('typ eOfCare', new Backbo ne.Model({ | |
| 312 | id: '323', | |
| 313 | })); | |
| 314 | mode l.set('fac ility', ne w Backbone .Model({ | |
| 315 | institutio nCode: '52 3', | |
| 316 | })); | |
| 317 | opti ons = { | |
| 318 | model: mod el, | |
| 319 | }; | |
| 320 | ||
| 321 | regi on.show(ne w DetailsV iew(option s)); | |
| 322 | view = region. currentVie w; | |
| 323 | view ._showPurp oseSection View(); | |
| 324 | }); | |
| 325 | ||
| 326 | it('is a required field', fu nction() { | |
| 327 | var required = view.$('. validation -required' ); | |
| 328 | expe ct(require d.length). toBe(1); | |
| 329 | }); | |
| 330 | ||
| 331 | it('limi ts the tex t area to 150 chars' , function () { | |
| 332 | var text = vie w.$('texta rea'); | |
| 333 | var maxLength = text.att r('maxleng th'); | |
| 334 | ||
| 335 | expe ct(maxLeng th).toBe(' 150'); | |
| 336 | }); | |
| 337 | ||
| 338 | // Not p art of the spec but still impo rtant to t est | |
| 339 | xit('san itizes the text befo re storing it in the model', f unction() { | |
| 340 | expe ct(false). toBe(null) ; | |
| 341 | }); | |
| 342 | }) ; | |
| 343 | ||
| 344 | ||
| 345 | /* * | |
| 346 | * 3. Prefer red Date ( required, Calendar d ate picker control; date range must be b etween tod ay + 1 and today + 9 0) | |
| 347 | * / | |
| 348 | de scribe('Pr eferred Da te', funct ion() { | |
| 349 | var view ; | |
| 350 | ||
| 351 | beforeEa ch(functio n() { | |
| 352 | var model; | |
| 353 | var options; | |
| 354 | ||
| 355 | help ers.collec tionFetchS py(); | |
| 356 | spyO n(View.pro totype, 'g etTimeSlot s').and.ca llFake(fun ction() { | |
| 357 | return new Backbone. Model({app ointmentTi meSlot: ne w Backbone .Collectio n()}); | |
| 358 | }); | |
| 359 | ||
| 360 | spyO n(DateView .prototype , 'addForm Validation Rules').an d.callFake (_.noop); | |
| 361 | ||
| 362 | mode l = helper s.layoutMo delFactory (); | |
| 363 | mode l.set('typ eOfCare', new Backbo ne.Model({ | |
| 364 | id: '323', | |
| 365 | })); | |
| 366 | mode l.set('fac ility', ne w Backbone .Model({ | |
| 367 | institutio nCode: '52 3', | |
| 368 | })); | |
| 369 | opti ons = { | |
| 370 | model: mod el, | |
| 371 | }; | |
| 372 | ||
| 373 | regi on.show(ne w DetailsV iew(option s)); | |
| 374 | view = region. currentVie w; | |
| 375 | view ._showDate TimeLayout View(); | |
| 376 | }); | |
| 377 | ||
| 378 | it('is a required field', fu nction() { | |
| 379 | var required = view.$('. validation -required' ); | |
| 380 | expe ct(require d.length). toBe(1); | |
| 381 | }); | |
| 382 | ||
| 383 | it('sets the range between 1 and 90 da ys', funct ion() { | |
| 384 | var range = vi ew.$('.for m-input-da tepicker-d escription '); | |
| 385 | var regDate = /\d{2}\/\d {2}\/\d{4} /g; | |
| 386 | var text = ran ge.text(); | |
| 387 | var matches = text.match (regDate); | |
| 388 | var start; | |
| 389 | var end; | |
| 390 | var expectedSt art; | |
| 391 | var expectedEn d; | |
| 392 | ||
| 393 | expe ct(matches .length).t oBe(2); | |
| 394 | ||
| 395 | star t = matche s[0]; | |
| 396 | end = matches[ 1]; | |
| 397 | ||
| 398 | expe ctedStart = moment() .add(1, 'd ay') | |
| 399 | .format('M M/DD/YYYY' ); | |
| 400 | expe ctedEnd = moment().a dd(90, 'da y') | |
| 401 | .format('M M/DD/YYYY' ); | |
| 402 | ||
| 403 | expe ct(start). toBe(expec tedStart); | |
| 404 | expe ct(end).to Be(expecte dEnd); | |
| 405 | // T ODO i need to figure out how t o check th e picker i s enforcin g the rang e. | |
| 406 | }); | |
| 407 | }) ; | |
| 408 | ||
| 409 | ||
| 410 | /* * | |
| 411 | * 4. Show A vailabilit y button | |
| 412 | * / | |
| 413 | de scribe('Sh ow Availab ility butt on', funct ion() { | |
| 414 | ||
| 415 | var view ; | |
| 416 | ||
| 417 | beforeEa ch(functio n() { | |
| 418 | var modal; | |
| 419 | var options; | |
| 420 | ||
| 421 | help ers.collec tionFetchS py(); | |
| 422 | spyO n(View.pro totype, 'g etTimeSlot s').and.ca llFake(fun ction() { | |
| 423 | return new Backbone. Model({app ointmentTi meSlot: ne w Backbone .Collectio n()}); | |
| 424 | }); | |
| 425 | ||
| 426 | spyO n(DateView .prototype , 'addForm Validation Rules').an d.callFake (_.noop); | |
| 427 | moda l = helper s.layoutMo delFactory (); | |
| 428 | moda l.set('typ eOfCare', new Backbo ne.Model({ id: '323'} )); | |
| 429 | moda l.set('fac ility', ne w Backbone .Model({in stitutionC ode: '523' })); | |
| 430 | opti ons = {mod el: modal} ; | |
| 431 | ||
| 432 | regi on.show(ne w DetailsV iew(option s)); | |
| 433 | view = region. currentVie w; | |
| 434 | view ._showDate TimeLayout View(); | |
| 435 | }); | |
| 436 | ||
| 437 | /** | |
| 438 | * 4.1. Disabled when Pref erred Date is null; | |
| 439 | * 4.1.1 . Disabled button is read as d isabled by screen re ader and a dditional informatio n is also read: | |
| 440 | * "Enter a preferred date to e nable Show Availabil ity button " | |
| 441 | */ | |
| 442 | describe ('Before P referred D ate Select ed', funct ion() { | |
| 443 | it(' is disable d', functi on() { | |
| 444 | var button = view.$( '#show-ava ilability- btn'); | |
| 445 | var classL ist = butt on[0].clas sList; | |
| 446 | var isDisa bled = cla ssList.con tains('ui- state-disa bled'); | |
| 447 | ||
| 448 | expect(isD isabled).t oBeTruthy( ); | |
| 449 | }); | |
| 450 | ||
| 451 | it(' has the co rrect scre en reader text', fun ction() { | |
| 452 | var button = view.$( '#show-ava ilability- btn'); | |
| 453 | var ariaLa bel = butt on.attr('a ria-label' ); | |
| 454 | expect(ari aLabel).to Be('Enter a preferre d date to enable Sho w Availabi lity butto n'); | |
| 455 | }); | |
| 456 | }); | |
| 457 | ||
| 458 | ||
| 459 | /** | |
| 460 | * 4.1.2 . When Pre ferred Dat e is value d button b ecomes ena bled; sele cting disp lays Selec t | |
| 461 | * Date/Tim e accordio n, instruc tional tex t based on availabil ity, and s elected ap pointment | |
| 462 | * date/tim e static t ext, as fo llows: | |
| 463 | */ | |
| 464 | xdescrib e('After P referred D ate is Sel ected', fu nction() { | |
| 465 | ||
| 466 | ||
| 467 | /** | |
| 468 | * 4 .1.3. If Preferred Date is a vailable f or schedul ing, displ ay: | |
| 469 | * 4 .1.3.1. Se lect Date/ Time label (required ); note mo nth labels should re ad Month a nd Year (M onth YYYY) | |
| 470 | * 4 .1.3.2. In structiona l Text: Th e followin g times ar e availabl e on your preferred date: | |
| 471 | * 4 .1.3.3. Ac cordion co ntrol disp laying pre ferred dat e as expan ded with t ime option s viewable but none selected | |
| 472 | * 4 .1.3.4. Sh ow All Dat es (button ) is displ ayed | |
| 473 | * | |
| 474 | * 4 .1.3.4.1. If the u ser select s the Show All Dates option wh en their p referred d ate is ava ilable, th en: | |
| 475 | * 4 .1.3.4.1.1 . Focus mo ves to the Select Da te/Time la bel. | |
| 476 | * 4 .1.3.4.1.2 . Instruct ional Text is update d to read "Showing a ll availab le dates." | |
| 477 | * 4 .1.3.4.1.3 . The pref erred date remains e xpanded an d all othe r availabl e dates | |
| 478 | * in the n ext 90 day s are show n | |
| 479 | * | |
| 480 | * 4 .1.3.4.1.4 . Separate accordion s are show n for each month, mo nths are l abeled; | |
| 481 | * times ar e not visi ble for da tes other than the p referred d ate | |
| 482 | * | |
| 483 | * 4 .1.3.4.1.5 . Show All Dates but ton is hid den. | |
| 484 | */ | |
| 485 | desc ribe('Pref erred Date Available ', functio n() { | |
| 486 | it('shows the data t ime label in the req uired form at', funct ion() { | |
| 487 | expect (false).to Be(null); | |
| 488 | }); | |
| 489 | ||
| 490 | it('displa ys the cor rect instr uction tex t', functi on() { | |
| 491 | expect (false).to Be(null); | |
| 492 | }); | |
| 493 | ||
| 494 | it('has an accordion with the time optio ns listed' , function () { | |
| 495 | expect (false).to Be(null); | |
| 496 | }); | |
| 497 | ||
| 498 | it('it doe s not pres elect a ti me', funct ion() { | |
| 499 | expect (false).to Be(null); | |
| 500 | }); | |
| 501 | ||
| 502 | it('has th e show all dates but ton displa yed', func tion() { | |
| 503 | expect (false).to Be(null); | |
| 504 | }); | |
| 505 | ||
| 506 | it('shows the correc t instruct ional text if show a ll dates i s clicked' , function () { | |
| 507 | expect (false).to Be(null); | |
| 508 | }); | |
| 509 | ||
| 510 | it('prefer red dates does not c ollapse wh en show al l is click ed', funct ion() { | |
| 511 | expect (false).to Be(null); | |
| 512 | }); | |
| 513 | ||
| 514 | it('it sho ws all oth er dates o nce the sh ow all is clicked', function() { | |
| 515 | expect (false).to Be(null); | |
| 516 | }); | |
| 517 | ||
| 518 | it('shows times if a different according are click ed', funct ion() { | |
| 519 | expect (false).to Be(null); | |
| 520 | }); | |
| 521 | }); | |
| 522 | ||
| 523 | ||
| 524 | /** | |
| 525 | * 4 .1.4. If Preferred Date is n ot availab le for sch eduling, t hen displa y: | |
| 526 | * 4 .1.4.1. Se lect Date/ Time label (required ) | |
| 527 | * 4 .1.4.2. In structiona l Text: No appointme nts are av ailable on your pref erred date . | |
| 528 | * Th ese are th e closest available dates. Sel ect "Show All Dates" to see al l date opt ions. | |
| 529 | * 4 .1.4.3. Ac cordion co ntrol disp laying the three dat es (collap sed) that are closes t to | |
| 530 | * th e preferre d date (be fore or af ter); if t wo or more dates "ti e" for the closest d ate, | |
| 531 | * th en show th e date(s) that are e arlier/bef ore the pr eferred da te over th e date tha t is after | |
| 532 | * 4 .1.4.4. Sh ow All Dat es (button ) is enabl ed | |
| 533 | * | |
| 534 | * 4 .1.4.4.1. If the u ser select s the Show All Dates option wh en their p referred d ate is not available , then: | |
| 535 | * 4 .1.4.4.1.1 . Focus mo ves to the Select Da te/Time la bel | |
| 536 | * 4 .1.4.4.1.2 . Instruct ional text below the label is updated to read "No appointmen ts are ava ilable on | |
| 537 | * your pre ferred dat e. Showing all avail able dates ." | |
| 538 | * 4 .1.4.4.1.3 . All avai lable date s are show n (collaps ed accordi ons) | |
| 539 | * | |
| 540 | * 4 .1.4.4.1.4 . Separate accordion s are show n for each Month; Mo nths are l abeled. | |
| 541 | * 4 .1.4.4.1.5 . Show All Dates but ton is hid den. | |
| 542 | * 4 .2. Dynamic text based on Date/T ime select ed is disp layed belo w the acco rdion date selectors : | |
| 543 | * You are scheduling an appoin tment for <date> @ < time>. | |
| 544 | */ | |
| 545 | desc ribe('Pref erred Date Not Avail able', fun ction() { | |
| 546 | it('has th e required labels', function() { | |
| 547 | expect (false).to Be(null); | |
| 548 | }); | |
| 549 | ||
| 550 | it('displa ys the cor rect instr uctional t ext', func tion() { | |
| 551 | expect (false).to Be(null); | |
| 552 | }); | |
| 553 | ||
| 554 | it('shows the three closest da tes to pre ferred dat es', funct ion() { | |
| 555 | expect (false).to Be(null); | |
| 556 | }); | |
| 557 | ||
| 558 | it('keeps the dates accordion collapsed' , function () { | |
| 559 | expect (false).to Be(null); | |
| 560 | }); | |
| 561 | ||
| 562 | it('breaks ties with selecting the earli est dates' , function () { | |
| 563 | expect (false).to Be(null); | |
| 564 | }); | |
| 565 | ||
| 566 | it('has sh ow all dat es button enabled', function() { | |
| 567 | expect (false).to Be(null); | |
| 568 | }); | |
| 569 | ||
| 570 | it('shows the correc t instruct ional text s after sh ow all is selected', function( ) { | |
| 571 | expect (false).to Be(null); | |
| 572 | }); | |
| 573 | ||
| 574 | it('all ac cordions a re collaps ed', funct ion() { | |
| 575 | expect (false).to Be(null); | |
| 576 | }); | |
| 577 | ||
| 578 | it('after clicking s how all th e show but ton is hid den', func tion() { | |
| 579 | expect (false).to Be(null); | |
| 580 | }); | |
| 581 | ||
| 582 | it('update s the disp lay texts when a tim e is selec ted', func tion() { | |
| 583 | expect (false).to Be(null); | |
| 584 | }); | |
| 585 | }); | |
| 586 | ||
| 587 | ||
| 588 | /** | |
| 589 | * 4 .3. If Pre ferred Dat e is chang ed after " Show Avail ability" h as been se lected, | |
| 590 | * the Se lect Date/ Time and r elated tex t options are nullif ied and hi dden until | |
| 591 | * Show A vailabilit y is selec ted again for the ne w Preferre d Date. | |
| 592 | */ | |
| 593 | desc ribe('Pref erred Date changed a fter Time Select', f unction() { | |
| 594 | it('resets show avai lability u ntil the i t is selec ted again' , function () { | |
| 595 | expect (false).to Be(null); | |
| 596 | }); | |
| 597 | }); | |
| 598 | ||
| 599 | ||
| 600 | /* | |
| 601 | * 4 .4. Screen readers r ead accord ion contro l actions ("Expand", "Collapse ") and ind icate sele cted date | |
| 602 | * and ti me values. | |
| 603 | */ | |
| 604 | desc ribe('Scre en Reader' , function () { | |
| 605 | it('reads the expand values', function() { | |
| 606 | expect (false).to Be(null); | |
| 607 | }); | |
| 608 | ||
| 609 | it('reads the collap se values' , function () { | |
| 610 | expect (false).to Be(null); | |
| 611 | }); | |
| 612 | }); | |
| 613 | }); | |
| 614 | }) ; | |
| 615 | }); | |
| 616 | }); |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.