예제 #1
0
 def test_discovertab_notclickable(self):
     """Test that once on the discover/home page, the discover tab
     isn't clickable"""
     self.updateSauceName('Pageflow: Discover Tab Not-Clickable')
     self.go_url('/')
     page = pages.HomePage(self.driver)
     clickable = page.discoverTab
     self.assertEqual(clickable.get_attribute('disabled'), 'true')
    def test_late(self):
        """SCOUT-73, testing to see if user can bring up list of
        places open late by clicking view more results"""

        self.updateSauceName("Wireframe: Home to Filter Open Late")
        self.go_url()
        page = pages.HomePage(self.driver)
        page.click_results('late')
        self.assertEqual('page_food', page.pageId)
        self.assertEqual(page.filterBy.text, "Open Period")
        self.assertEqual(page.placesCount.text, "2")
    def test_open_nearby(self):
        """SCOUT-72, testing to see if user can bring up list of
        places open nearby by clicking view more results"""

        self.updateSauceName("Wireframe: Home to Filter Open Nearby")
        self.go_url()
        page = pages.HomePage(self.driver)
        page.click_results('open')
        self.assertEqual('page_food', page.pageId)
        self.assertEqual(page.filterBy.text, "Open Now")
        self.assertEqual(page.placesCount.text, "8")
    def test_coffee(self):
        """SCOUT-71, testing to see if user can bring up list of coffee
        places by clicking view more results"""

        self.updateSauceName("Wireframe: Home to Filter Coffee")
        self.go_url()
        page = pages.HomePage(self.driver)
        page.click_results('coffee')
        self.assertEqual('page_food', page.pageId)
        self.assertEqual(page.filterBy.text, "Food Served")
        self.assertEqual(page.placesCount.text, "2")
    def test_breakfast(self):
        """SCOUT-70, testing to see if user can bring up list of b-fast
        places by clicking view more results"""

        self.updateSauceName("Wireframe: Home to Filter Breakfast")
        self.go_url()
        page = pages.HomePage(self.driver)
        page.click_results('breakfast')
        self.assertEqual('page_food', page.pageId)
        self.assertEqual(page.filterBy.text, "Open Period")
        self.assertEqual(page.placesCount.text, "4")
    def test_details(self):
        """SCOUT-74 testing to see if user can click on a place and
        then see more details from the home page"""

        self.updateSauceName("Wireframe: Home to Details")
        self.go_url()
        page = pages.HomePage(self.driver)
        page.click_place('open', 2)
        tempHref = self.driver.current_url.split('/')
        self.assertIn('page_' + tempHref[len(tempHref) - 2], page.pageId)
        self.assertEqual(page.foodName.text, "Banh & Naan, Husky Den")
        self.assertEqual(page.foodType.text, "FOOD COURT")
예제 #7
0
 def test_main_nav(self):
     """Goes from page to page and verifies that URLs are correct on
     each page """
     self.updateSauceName('Pageflow: Main Navigation')
     self.go_url()
     page = pages.HomePage(self.driver)
     page.click_placestab()
     expLoc = page.placesUrl(0)
     page.click_place(0)
     self.assertLocation(expLoc)
     page.click_placestab()
     self.assertLocation('/food/')
     page.get_filters()
     self.assertLocation('/filter/')
     page.click_home()
     self.assertLocation('/')
예제 #8
0
 def test_home_content(self):
     """Test that the home page id is present"""
     self.updateSauceName('Pageflow: Home Content')
     self.go_url('/')
     page = pages.HomePage(self.driver)
     self.assertEqual(page.pageId, 'page_discover')