From e023f710c2a9b868abdd4d95ac632f704f1c39cd Mon Sep 17 00:00:00 2001 From: Joseph Snyder Date: Mon, 3 Dec 2018 15:27:36 -0500 Subject: [PATCH] Ensure that new "Ok?" prompts are accounted for Add the necessary multiwaits to account for new "Ok" prompts found in the run of the OSEHRA VistA testing framework. Change-Id: I1bb2d08820e67a56c0388f47693394da869863d4 --- Testing/Functional/RAS/lib/PLActions.py | 38 ++++++++++++++++++------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/Testing/Functional/RAS/lib/PLActions.py b/Testing/Functional/RAS/lib/PLActions.py index f65b7a6bb..a6e57c8b3 100644 --- a/Testing/Functional/RAS/lib/PLActions.py +++ b/Testing/Functional/RAS/lib/PLActions.py @@ -121,7 +121,10 @@ def addcsv(self, ssn, pfile=None, getrow=None, slist=None): else: self.VistA.write("") break - self.VistA.wait('PROBLEM') + index = self.VistA.multiwait(['O[Kk]','PROBLEM']) + if index == 0: + self.VistA.write('') + self.VistA.wait('PROBLEM') self.VistA.write('') self.VistA.wait('Select Action') self.VistA.write('QUIT') @@ -228,8 +231,8 @@ def add(self, ssn, clinic, comment, onsetdate, status, acutechronic, else: self.VistA.write('') while True: - index = self.VistA.multiwait(["PROBLEM:","Select Item",'Select Action']) - if index == 2: + index = self.VistA.multiwait(["O[Kk]","PROBLEM:","Select Item",'Select Action']) + if index == 3: break self.VistA.write('') # optionally, check to make sure user entering the data can't also verify it @@ -281,7 +284,10 @@ def addspec(self, ssn, clinic, comment, onsetdate, status, acutechronic, self.VistA.write('Save') elif rval == 1: self.VistA.write('Save') - self.VistA.wait('PROBLEM') + index = self.VistA.multiwait(['O[Kk]','PROBLEM']) + if index == 0: + self.VistA.write('') + self.VistA.wait('PROBLEM') self.VistA.write('') if vlist is not None: while True: @@ -335,7 +341,10 @@ def dataentry(self, ssn, provider, clinic, problem, comment, onsetdate, status, self.VistA.write('Save') elif rval == 1: self.VistA.write('Save') - self.VistA.wait('PROBLEM:') + index = self.VistA.multiwait(['O[Kk]','PROBLEM']) + if index == 0: + self.VistA.write('') + self.VistA.wait('PROBLEM') self.VistA.write('') self.VistA.wait('Select Action') self.VistA.write('QUIT') @@ -359,7 +368,7 @@ def editsimple(self, ssn, probnum, itemnum, chgval,icd10='',snomed=''): valIndex=0 valList = [icd10,snomed] while True: - rval = self.VistA.multiwait(['Select Item', 'Ok','A suitable term','STOP or Select']) + rval = self.VistA.multiwait(['Select Item', 'O[Kk]','A suitable term','STOP or Select']) if rval == 0: self.VistA.write('SC') break @@ -370,7 +379,10 @@ def editsimple(self, ssn, probnum, itemnum, chgval,icd10='',snomed=''): valIndex +=1 elif rval == 3: self.VistA.write('1') - self.VistA.wait('Select Action') + index = self.VistA.multiwait(['O[Kk]','Select Action']) + if index == 0: + self.VistA.write('') + self.VistA.wait('Select Action') self.VistA.write('QUIT') self.VistA.wait('Print a new problem list') self.VistA.write('N') @@ -393,7 +405,10 @@ def editinactivate (self, ssn, probnum, resdate): self.VistA.write(resdate) self.VistA.wait('Select Item') self.VistA.write('SC') - self.VistA.wait('Select Action') + index = self.VistA.multiwait(['O[Kk]','Select Action']) + if index == 0: + self.VistA.write('') + self.VistA.wait('Select Action') self.VistA.write('QUIT') self.VistA.wait('Print a new problem list') self.VistA.write('N') @@ -416,7 +431,10 @@ def editactivate (self, ssn, probnum, acutechronic): self.VistA.write(acutechronic) self.VistA.wait('Select Item') self.VistA.write('SC') - self.VistA.wait('Select Action') + index = self.VistA.multiwait(['O[Kk]','Select Action']) + if index == 0: + self.VistA.write('') + self.VistA.wait('Select Action') self.VistA.write('QUIT') self.VistA.wait('Print a new problem list') self.VistA.write('N') @@ -1218,7 +1236,7 @@ def editpart2(self, ssn, probnum, itemnum, chgval, icd10='',snomed=''): probList=[chgval,icd10,snomed] probIndex = 0 while True: - rval = self.VistA.multiwait(['Select Item', 'Ok','A suitable term']) + rval = self.VistA.multiwait(['Select Item', 'O[kK]','A suitable term']) if rval == 0: self.VistA.write('SC') break