Produced by Araxis Merge on 10/3/2017 11:16:06 AM 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 | ehmp.zip\ehmp\ehmp\product\tests\acceptance-tests\features-arch\old_ehmp_features_ruby\steps | tiu_steps.rb | Tue Dec 15 14:05:18 2015 UTC |
| 2 | ehmp.zip\ehmp\ehmp\product\tests\acceptance-tests\features-arch\old_ehmp_features_ruby\steps | tiu_steps.rb | Mon Oct 2 20:09:47 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 292 |
| Changed | 1 | 4 |
| 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 | When(/^the client re quests doc uments for the patie nt "(.*?)" in JDS$/) do |pid| | |
| 2 | # path = " http:// IP /vpr/9E7A; 3/index/do cument" | |
| 3 | # path = h ttp:// IP /data/find /asu-rule | |
| 4 | base_jds _url = Def aultLogin. jds_url | |
| 5 | p jds_pa th = "#{ba se_jds_url }/vpr/#{pi d}/index/d ocument" | |
| 6 | p rule_p ath = "#{b ase_jds_ur l}/data/fi nd/asu-rul e" | |
| 7 | p doc_de f_path = " #{base_jds _url}/data /find/doc- def" | |
| 8 | @respons e_jds = ni l | |
| 9 | @respons e_jds = HT TPartyWith BasicAuth. get_with_a uthorizati on(jds_pat h) | |
| 10 | fail "Sy ne time ou t error" i f @respons e_jds == n il | |
| 11 | ||
| 12 | @respons e_rule = n il | |
| 13 | @respons e_asu_rule = HTTPart yWithBasic Auth.get_w ith_author ization(ru le_path) | |
| 14 | fail "Sy ne time ou t error" i f @respons e_asu_rule == nil | |
| 15 | ||
| 16 | @respons e_doc_def = nil | |
| 17 | @respons e_doc_def = HTTParty WithBasicA uth.get_wi th_authori zation(doc _def_path) | |
| 18 | fail "Sy ne time ou t error" i f @respons e_doc_def == nil | |
| 19 | end | |
| 20 | ||
| 21 | Then(/^app lication s hould enfo rce ASU Ru les to doc Def UID an d use the same TIU r ule as the parent$/) do | |
| 22 | json_obj ects = JSO N.parse(@r esponse_jd s.body) | |
| 23 | json_obj ects = jso n_objects[ 'data']['i tems'] | |
| 24 | ||
| 25 | rule_obj ects = JSO N.parse(@r esponse_as u_rule.bod y) | |
| 26 | asu_rule _objects = rule_obje cts['data' ]['items'] | |
| 27 | ||
| 28 | doc_def_ objects = JSON.parse (@response _doc_def.b ody) | |
| 29 | doc_def_ objects = doc_def_ob jects['dat a']['items '] | |
| 30 | ||
| 31 | json_obj ects.each do |json_o bject| | |
| 32 | @docum ent_def_ui d = nil | |
| 33 | @statu s_name = n il | |
| 34 | site_i s_9e7a_or_ c877 = che ck_documen tdefuid_is _not_nil_a nd_part_of _9e7a_or_c 877(json_o bject) | |
| 35 | ||
| 36 | check_ rule(asu_r ule_object s, doc_def _objects) if site_is _9e7a_or_c 877 == tru e | |
| 37 | end | |
| 38 | end | |
| 39 | ||
| 40 | def check_ documentde fuid_is_no t_nil_and_ part_of_9e 7a_or_c877 (json_obje ct) | |
| 41 | result = false | |
| 42 | if json_ object['do cumentDefU id'] == ni l | |
| 43 | check_ site_is_no t_9e7a_or_ c877_when_ nil(json_o bject) | |
| 44 | else | |
| 45 | docume nt_def_uid = json_ob ject['docu mentDefUid '] | |
| 46 | result = check_d ocumentdef uid_is_par t_of_9e7a_ or_c877(js on_object) | |
| 47 | end | |
| 48 | return r esult | |
| 49 | end | |
| 50 | ||
| 51 | def check_ site_is_no t_9e7a_or_ c877_when_ nil(json_o bject) | |
| 52 | uid_part s = json_o bject['uid '].split(' :') | |
| 53 | fail "Th ere is no documentDe fUid value for #{uid _parts[3]} " if %w[9E 7A C877].i nclude? ui d_parts[3] | |
| 54 | end | |
| 55 | ||
| 56 | def check_ documentde fuid_is_pa rt_of_9e7a _or_c877(j son_object ) | |
| 57 | result = false | |
| 58 | # p '--- ---------- --' | |
| 59 | @documen t_def_uid = json_obj ect['docum entDefUid' ] | |
| 60 | # p @doc ument_def_ uid | |
| 61 | # p @doc ument_def_ uid = "urn :va:doc-de f:C877:17" | |
| 62 | document defuid_par ts = @docu ment_def_u id.split(' :') | |
| 63 | site_nam e_part_of_ documentde fuid = doc umentdefui d_parts[3] | |
| 64 | if %w[9E 7A C877].i nclude? si te_name_pa rt_of_docu mentdefuid | |
| 65 | result = true | |
| 66 | @statu s_name = j son_object ["status"] | |
| 67 | # p @s tatus_name | |
| 68 | # p @s tatus_name = "UNSIGN ED" | |
| 69 | end | |
| 70 | return r esult | |
| 71 | end | |
| 72 | ||
| 73 | def check_ rule(asu_r ule_object s, doc_def _objects) | |
| 74 | check_la st_part_of _documentd efuid_must _be_numeri c(@documen t_def_uid) | |
| 75 | ||
| 76 | check_ru le_and_act ion_name_a nd_status( asu_rule_o bjects, do c_def_obje cts) | |
| 77 | end | |
| 78 | ||
| 79 | def check_ last_part_ of_documen tdefuid_mu st_be_nume ric(docume nt_def_uid ) | |
| 80 | document defuid_par ts = docum ent_def_ui d.split(': ') | |
| 81 | last_par t_of_docum entdefuid = document defuid_par ts[4].to_i | |
| 82 | fail "La st part of documentd efuid is n ot numeric " unless l ast_part_o f_document defuid.cla ss == Fixn um | |
| 83 | end | |
| 84 | ||
| 85 | def check_ rule_and_a ction_name _and_statu s(asu_rule _objects, doc_def_ob jects) | |
| 86 | has_pare nt = true | |
| 87 | match_fo und = fals e | |
| 88 | old_docu ment_def_u id = @docu ment_def_u id | |
| 89 | while ha s_parent = = true | |
| 90 | docume ntdefuid_m atch_rule = check_do cumentdefu id_must_ex ist_in_the _rules_the n_action_n ame_and_st atus_match (asu_rule_ objects) | |
| 91 | if doc umentdefui d_match_ru le | |
| 92 | has_ parent = f alse | |
| 93 | matc h_found = true | |
| 94 | else | |
| 95 | has_ parent = g et_parent_ of_documen tdefuid(do c_def_obje cts) | |
| 96 | end | |
| 97 | ||
| 98 | end | |
| 99 | fail "Th ere is no match. Thi s recorde should not display f or #{old_d ocument_de f_uid} wit h status # {@status_n ame} " if match_foun d == false | |
| 100 | end | |
| 101 | ||
| 102 | def check_ documentde fuid_must_ exist_in_t he_rules_t hen_action _name_and_ status_mat ch(asu_rul e_objects) | |
| 103 | match = false | |
| 104 | action_n ame = nil | |
| 105 | status_n ame = nil | |
| 106 | error1 = '' | |
| 107 | asu_rule _objects.e ach do |ru le_object| | |
| 108 | action _name = ru le_object[ 'actionNam e'] | |
| 109 | if rul e_object[' docDefUid' ] == @docu ment_def_u id && rule _object['a ctionName' ].upcase = = "VIEW" & & rule_obj ect['statu sName'] == @status_n ame | |
| 110 | # p 'it is tru e' | |
| 111 | matc h = true | |
| 112 | brea k | |
| 113 | end | |
| 114 | end | |
| 115 | # error1 = "or act ionName: ( #{action_n ame}) is n ot VIEW" u nless acti on_name.up case == "V IEW" | |
| 116 | # error = "documen tdefuid: ( #{document _def_uid}) does not exist in t he rules" + error1 + "." | |
| 117 | # fail e rror if ma tch == fal se | |
| 118 | return m atch | |
| 119 | end | |
| 120 | ||
| 121 | def get_pa rent_of_do cumentdefu id(doc_def _objects) | |
| 122 | has_pare nt = false | |
| 123 | doc_def_ objects.ea ch do |doc _def_objec t| | |
| 124 | if doc _def_objec t["item"] == nil | |
| 125 | resu lt = false | |
| 126 | else | |
| 127 | resu lt = find_ parent_of_ documentde fuid(doc_d ef_object[ "item"]) u nless doc_ def_object ["item"] = = nil | |
| 128 | end | |
| 129 | if res ult == tru e | |
| 130 | @doc ument_def_ uid = doc_ def_object ["uid"] | |
| 131 | # p @document_ def_uid | |
| 132 | has_ parent = t rue | |
| 133 | brea k | |
| 134 | end | |
| 135 | end | |
| 136 | return h as_parent | |
| 137 | end | |
| 138 | ||
| 139 | def find_p arent_of_d ocumentdef uid(doc_de f_item) | |
| 140 | result = false | |
| 141 | doc_def_ item.each do |item| | |
| 142 | if ite m["uid"] ! = nil && i tem["uid"] == @docum ent_def_ui d | |
| 143 | resu lt = true | |
| 144 | brea k | |
| 145 | end | |
| 146 | end | |
| 147 | return r esult | |
| 148 | end |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.