Summary Table

Categories Total Count
PII 0
URL 0
DNS 0
EKL 0
IP 0
PORT 0
VsID 0
CF 0
AI 0
VPD 0
PL 0
Other 0

File Content

require_relative '../../globalized'
include Globalized



describe "[Story#NR-806: No_Results_Found_JRNL_806_spec.rb]" do


before(:all) do
initializeConfigurations(BASE_URL)
initializeAllObjects
VITALS_BTN = "Vitals"
RESPIRATION_BTN = "ul.secondary-list li:nth-of-type(2) button span.ng-binding"

!45.times{ break if (@eula.acceptEulaVisible?() == true); sleep 1 }
@eula.clickAccept()

!45.times{ break if (@landing.getTitle() == "My VA Health"); sleep 1 }
expect(@landing.getTitle()).to eq("My VA Health")
expect(@landing.getFooterText()).to eq("Not logged in")

@login_page.passingByTheLandingPage()

!45.times{ break if (getPageTitle() == "Department of Veterans Affairs - Veteran Login Page"); sleep 1 }
@login_page.loginAsVeteran("zztest.patient52")

!45.times{ break if (@main.getFooterText() == "Logged in as patient52, zztest"); sleep 1 }
expect(@main.getFooterText()).to eq("Logged in as patient52, zztest")

end


after (:all) do
quitDriver()
end


it "AC#JRNL-829,880|TC#JRNL-945: Filters always displayed; Display No Results Found message", :broken => true do

# @main.clickNavMenu()
# !45.times{ break if (@nav_menu.getNavMenuHeading() == "App Options"); sleep 1 }
# expect(@nav_menu.getNavMenuHeading()).to eq("App Options")

# #Click the Diet button
# @nav_menu.clickDiet()
# !45.times{ break if (@diet.getPrimaryHeader == "Meal Detail"); sleep 1 }
# validateFilterAlwaysDisplayed()
# #Verify the No Results Found message is displayed
# expect(getTextForElement(:css, "div.no-results-message")).to eq("No results found.")

# #Click the Exercise button
# @main.clickNavMenu()
# !45.times{ break if (@nav_menu.getNavMenuHeading() == "App Options"); sleep 1 }
# expect(@nav_menu.getNavMenuHeading()).to eq("App Options")
# @nav_menu.clickExercise()
# !45.times{ break if (@exercise.getTitle() == "Exercise"); sleep 1 }
# expect(@exercise.getTitle()).to eq("Exercise")
# validateFilterAlwaysDisplayed()
# #Verify the No Results Found message is displayed
# expect(getTextForElement(:css, "div.no-results-message")).to eq("No results found.")

# #Click the Mood button
# @main.clickNavMenu()
# !45.times{ break if (@nav_menu.getNavMenuHeading() == "App Options"); sleep 1 }
# expect(@nav_menu.getNavMenuHeading()).to eq("App Options")
# @nav_menu.clickMood()
# !45.times{ break if (@mood.getTitle() == "Mood"); sleep 1 }
# expect(@mood.getTitle()).to eq("Mood")
# validateFilterAlwaysDisplayed()
# #Verify the No Results Found message is displayed
# expect(getTextForElement(:css, "div.no-results-message")).to eq("No results found.")

# #Click the Pain button
# @main.clickNavMenu()
# !45.times{ break if (@nav_menu.getNavMenuHeading() == "App Options"); sleep 1 }
# expect(@nav_menu.getNavMenuHeading()).to eq("App Options")
# @nav_menu.clickPain()
# !45.times{ break if (@pain.getPrimaryHeader == "Pain Detail"); sleep 1 }
# expect(@pain.getPrimaryHeader).to eq("Pain Detail")
# validateFilterAlwaysDisplayed()
# #Verify the No Results Found message is displayed
# expect(getTextForElement(:css, "div.no-results-message")).to eq("No results found.")

# #Click Daily Events button
# @main.clickNavMenu()
# !45.times{ break if (@nav_menu.getNavMenuHeading() == "App Options"); sleep 1 }
# expect(@nav_menu.getNavMenuHeading()).to eq("App Options")
# @nav_menu.clickDailyEvents()
# !45.times{ break if (@events.getPrimaryHeader() == "Event Detail"); sleep 1 }
# validateFilterAlwaysDisplayed()
# #Verify the No Results Found message is displayed
# expect(getTextForElement(:css, "div.no-results-message")).to eq("No results found.")

#Click Communication Log
@nav_menu.clickCommunicationLog()
!45.times{ break if (@communications.getPrimaryHeader() == "Communication Detail"); sleep 1 }
validateFilterAlwaysDisplayed()
#Verify the No Results Found message is displayed
expect(getTextForElement(:css, "div.no-results-message")).to eq("No results found.")

#Click the Reminder button
@nav_menu.navigate("Medications")
!45.times{ break if (@reminders.getPrimaryHeader() == "medication reminder"); sleep 1 }
@reminders.isTheFilterButtonVisible()
#Verify the No Results Found message is displayed
expect(getTextForElement(:css, "div.no-results-message")).to eq("No results found.")

#Click the Notification button
@nav_menu.clickNotifications()
!45.times{ break if (@notifications.getSecondaryHeader()== "Notifications"); sleep 1 }
validateFilterAlwaysDisplayed()
#Verify the No Results Found message is displayed
expect(getTextForElement(:css, "div.no-results-message")).to eq("No results found.")

# #Click the Vitals button
# @main.clickNavMenu()
# !45.times{ break if (@nav_menu.getNavMenuHeading() == "App Options"); sleep 1 }
# expect(@nav_menu.getNavMenuHeading()).to eq("App Options")
# @nav_menu.clickVitals
# !45.times{ break if (@notifications.getTitle() == "Vitals"); sleep 1 }

# #Blood Pressure
# @vitals.clickThisButton('ul.secondary-list li:nth-of-type(1) button span.ng-binding')
# !45.times{ break if (@vitals.getPrimaryHeader() == "Blood Pressure Summary"); sleep 1 }
# validateFilterAlwaysDisplayed()
# #Verify the No Results Found message is displayed
# expect(getTextForElement(:css, ".no-results-message")).to eq("No results found.")

# #Respiration
# @vitals.clickThisButton('ul.secondary-list li:nth-of-type(2) button span.ng-binding')
# !45.times{ break if (@vitals.getPrimaryHeader() == "Respiration Summary"); sleep 1 }
# validateFilterAlwaysDisplayed()
# #Verify the No Results Found message is displayed
# expect(getTextForElement(:css, ".no-results-message")).to eq("No results found.")

# #Temperature
# @vitals.clickThisButton('ul.secondary-list li:nth-of-type(3) button span.ng-binding')
# !45.times{ break if (@vitals.getPrimaryHeader() == "Temperature Summary"); sleep 1 }
# validateFilterAlwaysDisplayed()
# #Verify the No Results Found message is displayed
# expect(getTextForElement(:css, ".no-results-message")).to eq("No results found.")

# #Height
# @vitals.clickThisButton('ul.secondary-list li:nth-of-type(4) button span.ng-binding')
# !45.times{ break if (@vitals.getPrimaryHeader() == "Height Summary"); sleep 1 }
# validateFilterAlwaysDisplayed()
# #Verify the No Results Found message is displayed
# expect(getTextForElement(:css, ".no-results-message")).to eq("No results found.")

# #Weight
# @vitals.clickThisButton('ul.secondary-list li:nth-of-type(5) button span.ng-binding')
# !45.times{ break if (@vitals.getPrimaryHeader() == "Weight Summary"); sleep 1 }
# validateFilterAlwaysDisplayed()
# #Verify the No Results Found message is displayed
# expect(getTextForElement(:css, ".no-results-message")).to eq("No results found.")

end

def validateFilterAlwaysDisplayed()
@date_filter.isStartDatePresent()
@date_filter.isEndDatePresent()
@date_filter.isFilterButtonPresent()
end

end