Produced by Araxis Merge on 5/29/2018 12:14:34 PM Central Daylight 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 | mobile-kidney-web-2.0.0.zip\mobile-kidney-web\acceptance_test\watir\spec\learn-more | Lab_Calcium_and_Phosphorus_Levels_Content_DCKDA_793_spec.rb | Wed Apr 4 20:16:46 2018 UTC |
2 | mobile-kidney-web-2.0.0.zip\mobile-kidney-web\acceptance_test\watir\spec\learn-more | Lab_Calcium_and_Phosphorus_Levels_Content_DCKDA_793_spec.rb | Tue May 29 15:55:24 2018 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 2 | 320 |
Changed | 1 | 2 |
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 | #!/bin/env ruby | |
2 | # encoding : utf-8 | |
3 | ||
4 | require 'r ubygems' | |
5 | require 'r spec' | |
6 | require 'w atir-webdr iver' | |
7 | require 'p age-object ' | |
8 | require 's preadsheet ' | |
9 | ||
10 | require_re lative '.. /rspec_hel per' | |
11 | require_re lative '.. /../lib/pa ges/login_ page' | |
12 | require_re lative '.. /../lib/pa ges/eula' | |
13 | require_re lative '.. /../lib/pa ges/landin g_page' | |
14 | require_re lative '.. /../lib/pa ges/roa' | |
15 | require_re lative '.. /../lib/pa ges/launch pad' | |
16 | require_re lative '.. /../lib/pa ges/common _elements' | |
17 | require_re lative '.. /../lib/pa ges/common _tests' | |
18 | require_re lative '.. /../lib/pa ges/modal_ dialog' | |
19 | require_re lative '.. /../lib/pa ges/left_s ide_nav' | |
20 | require_re lative '.. /../lib/pa ges/learn_ more_accor dions' | |
21 | ||
22 | ||
23 | describe ' Story#DCKD A-793 Lab_ Calcium_an d_Phosphor us_Levels_ Content_DC KDA_793_sp ec.rb' , : regression => true d o | |
24 | include DriverOper ationsModu le | |
25 | ||
26 | headingN ame = "You r Calcium and Phosph orus Level s" | |
27 | ||
28 | before(: all) do | |
29 | ||
30 | initia lizeConfig urations() | |
31 | ||
32 | @commo nElements = CommonEl ement.new( @driver) | |
33 | @login page = Log inPage.new (@driver) | |
34 | @eula = Eula.new (@driver) | |
35 | @landi ng = Landi ngPage.new (@driver) | |
36 | @roa = Roa.new(@ driver) | |
37 | @leftn av = LeftS ideNav.new (@driver) | |
38 | @lp = Launchpad. new(@drive r) | |
39 | @commo nTest = Co mmonTest.n ew(@driver ) | |
40 | @modal = Modal.n ew(@driver ) | |
41 | @lmAcc d = LearnM oreAccd.ne w(@driver) | |
42 | ||
43 | @commonTes t.passByLa ndingPageA ndAuthenti cate(" AI ", " AI ", "patien t01, zztes t", "D1234 01") | |
44 | begin | |
45 | Wati r::Wait.un til | |
46 | @com monElement s.angulart itle_eleme nt.visible ? | |
47 | rescue | |
48 | Wati r::Wait::T imeoutErro r | |
49 | unti l | |
50 | @com monElement s.angulart itle_eleme nt.visible ? | |
51 | end | |
52 | end | |
53 | ||
54 | @commo nTest.wait ForContent LoadedSumm aryPage | |
55 | @leftn av.leftSid eNav | |
56 | ||
57 | @commo nTest.navi gateToAsub Feature("L earnMore", ".laborat ory") | |
58 | ||
59 | @leftn av.clickAc cordion(3) | |
60 | sleep 0.5 | |
61 | end | |
62 | ||
63 | after(:a ll) do | |
64 | @drive r.close | |
65 | end | |
66 | ||
67 | dataShee tFilePath = File.dir name(__FIL E__) + '/. ./../datas heet/Lab_T ext_Conten t.xls' | |
68 | book = S preadsheet .open data SheetFileP ath | |
69 | sheet1 = book.work sheet 'cal ciumAndPho sphorusLev els' | |
70 | ||
71 | counter = 0 | |
72 | sheet1.e ach 1 do | row| | |
73 | counte r = counte r + 1 | |
74 | ||
75 | rowLen gth = row. length | |
76 | ||
77 | sectio nID = row[ 0].to_i | |
78 | ||
79 | expect edImageInf o = row[2] .split(/\r ?\n/) | |
80 | expect edImgName = expected ImageInfo. first | |
81 | expect edImgAckno wledgement = "" | |
82 | if exp ectedImage Info.lengt h > 1 | |
83 | expe ctedImgAck nowledgeme nt = expec tedImageIn fo.last | |
84 | end | |
85 | ||
86 | expect edImgAltNa me = row[3 ] | |
87 | expect edSectionH eader = ro w[4] | |
88 | ||
89 | contex t 'AC#DCKD A-794~804| TC#DCKDA-5 08: Image and conten t for this section d isplays co rrectly - ' + expect edSectionH eader do | |
90 | if r ow[2] != " na" | |
91 | it '. Verify the image file name is correc t: ' do | |
92 | if @lmAccd .getImgtUn derEachSec tion(secti onID, head ingName).i nclude?(ex pectedImgN ame) == fa lse | |
93 | puts "Di fferent! F ailed sect ionID=" + sectionID. to_s + "; Displayed Img=" + @l mAccd.getI mgtUnderEa chSection( sectionID, headingNa me) | |
94 | end | |
95 | expect(@lm Accd.getIm gtUnderEac hSection(s ectionID, headingNam e).include ?(expected ImgName)). to eq(true ) | |
96 | en d | |
97 | ||
98 | it '. Verify that the image has the correc t alt text . ' do | |
99 | if @lmAccd .getImgAlt TextUnderE achSection (sectionID , headingN ame).inclu de?(expect edImgAltNa me) == fal se | |
100 | puts "Di fferent! F ailed sect ionID=" + sectionID. to_s + "; Displayed alt text=" + @lmAccd .getImgAlt TextUnderE achSection (sectionID , headingN ame) | |
101 | puts "\n \nExpected =" + expec tedImgAltN ame | |
102 | end | |
103 | expect(@lm Accd.getIm gAltTextUn derEachSec tion(secti onID, head ingName).i nclude?(ex pectedImgA ltName)).t o eq(true) | |
104 | en d | |
105 | ||
106 | it '. Verify the image acknowled gement is correct: ' do | |
107 | expect(@lm Accd.getIm gAcknowled gementUnde rEachSecti on(section ID, headin gName)).to eq(expect edImgAckno wledgement ) | |
108 | en d | |
109 | ||
110 | it '. Click the image and verify it opens up in a mo dal screen . ' do | |
111 | Watir::Wai t.until {@ lmAccd.tex t.include? "Sources of Calcium "} | |
112 | @lmAccd.cl ickImgtUnd erEachSect ion(sectio nID, headi ngName) | |
113 | @modal.img Title_elem ent.when_v isible(tim eout=10) | |
114 | expect(@mo dal.imgTit le).to eq( expectedSe ctionHeade r) | |
115 | expect(@mo dal.closeI mg?).to eq (true) | |
116 | @modal.clo seImg | |
117 | @modal.img Title_elem ent.when_n ot_visible | |
118 | expect(@mo dal.imgTit le?).to eq (false) | |
119 | e nd | |
120 | ||
121 | it '. Verify that the segment he ader displ ays correc tly. ' do | |
122 | $bodyConte nt = @lmAc cd.getBody ContentUnd erEachSect ion(sectio nID, headi ngName) | |
123 | expect($bo dyContent. include?(e xpectedSec tionHeader )).to eq(t rue) | |
124 | en d | |
125 | ||
126 | it '. Verify the in Ph one form f actor, the image doe s not disp lay. ' do | |
127 | resizeWind owTo(320, 480) | |
128 | sleep 1 | |
129 | expect(@lm Accd.isImg Present(se ctionID, h eadingName )).to eq(f alse) | |
130 | ||
131 | resizeWind owToDefaul t() | |
132 | en d | |
133 | ||
134 | ||
135 | it '. Verify that all segments u nder this section di splays cor rectly. ' do | |
136 | ||
137 | $bodyConte nt = @lmAc cd.getBody ContentUnd erEachSect ion(sectio nID, headi ngName) | |
138 | ||
139 | dataFileCo ntent = ex pectedSect ionHeader | |
140 | for column in 5..row Length-1 | |
141 | ||
142 | expected SegContent = row[col umn].strip | |
143 | dataFile Content += expectedS egContent | |
144 | end | |
145 | ||
146 | totalBodyC ontent = $ bodyConten t.delete!( "\n") | |
147 | ||
148 | expect(dat aFileConte nt).to eq( totalBodyC ontent) | |
149 | en d | |
150 | ||
151 | else | |
152 | ||
153 | it '. Verify the Knowl edge Check text disp lays. ' do | |
154 | $bodyConte nt = @lmAc cd.getBody ContentUnd erEachSect ion(sectio nID, headi ngName) | |
155 | expect($bo dyContent. include?(e xpectedSec tionHeader )).to eq(t rue) | |
156 | en d | |
157 | end | |
158 | end | |
159 | end | |
160 | ||
161 | end |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.