Exemplo n.º 1
0
def test(args):
    #setup
    driver = args['driver']
    program_url = args['url']
    data = args['data']
    os = args['os']

    landing_page = LandingPage(driver, 'Login Page', program_url, os)

    #test
    landing_page.login(data)
Exemplo n.º 2
0
def test(args):
    #setup
    driver = args['driver']
    program_url = args['url']
    data = args['data']
    os = args['os']

    landing_page = LandingPage(driver, 'Login Page', program_url, os)
    try:
        landing_page.login(data)
    except Exception, e:
        pass
Exemplo n.º 3
0
def test(args):
  #setup
  driver = args['driver']
  program_url = args['url']
  data = args['data']
  os = args['os']

  landing_page = LandingPage(driver, 'Login Page', program_url, os)
  landing_page.login(data)

  #test
  volunteer_exp = landing_page.navigate_to('Volunteer Experience')
  data.auto_fill(volunteer_exp)
Exemplo n.º 4
0
def test(args):
    #setup
    driver = args['driver']
    program_url = args['url']
    data = args['data']
    os = args['os']

    landing_page = LandingPage(driver, 'Login Page', program_url, os)
    landing_page.login(data)

    #test
    employment_info = landing_page.navigate_to('Employment Information')
    data.auto_fill(employment_info)
Exemplo n.º 5
0
def test(args):
    #setup
    driver = args['driver']
    program_url = args['url']
    data = args['data']
    os = args['os']

    landing_page = LandingPage(driver, 'Login Page', program_url, os)
    landing_page.login(data)

    #test
    acad_background = landing_page.navigate_to('Academic Background')
    data.auto_fill(acad_background)
Exemplo n.º 6
0
def test(args):
    #setup
    driver = args['driver']
    program_url = args['url']
    data = args['data']
    os = args['os']

    landing_page = LandingPage(driver, 'Login Page', program_url, os)
    landing_page.login(data)

    #test
    security_questions = landing_page.navigate_to('Security Questions')
    data.auto_fill(security_questions)
Exemplo n.º 7
0
def test(args):
  #setup
  driver = args['driver']
  program_url = args['url']
  data = args['data']
  os = args['os']

  landing_page = LandingPage(driver, 'Login Page', program_url, os)
  landing_page.login(data)

  #test
  clinical_experience = landing_page.navigate_to('Clinical Experience')
  data.auto_fill(clinical_experience)
Exemplo n.º 8
0
def test(args):
  #setup
  driver = args['driver']
  program_url = args['url']
  data = args['data']
  os = args['os']

  landing_page = LandingPage(driver, 'Login Page', program_url, os)
  landing_page.login(data)

  #test
  uploads = landing_page.navigate_to('Uploads')
  data.auto_fill(uploads)
Exemplo n.º 9
0
def test(args):
  #setup
  driver = args['driver']
  program_url = args['url']
  data = args['data']
  os = args['os']

  landing_page = LandingPage(driver, 'Login Page', program_url, os)
  landing_page.login(data)

  #test
  prof_exp = landing_page.navigate_to('Professional')
  data.auto_fill(prof_exp)
Exemplo n.º 10
0
def test(args):
    #setup
    driver = args['driver']
    program_url = args['url']
    data = args['data']
    os = args['os']

    landing_page = LandingPage(driver, 'Login Page', program_url, os)
    landing_page.login(data)

    #test
    fin_aid_info = landing_page.navigate_to('Financial Aid Information')
    data.auto_fill(fin_aid_info)
Exemplo n.º 11
0
def test(args):
  #setup
  driver = args['driver']
  program_url = args['url']
  data = args['data']
  os = args['os']

  landing_page = LandingPage(driver, 'Login Page', program_url, os)
  landing_page.login(data)

  #test
  statement_of_purpose = landing_page.navigate_to('Statement of Purpose')
  data.auto_fill(statement_of_purpose)
Exemplo n.º 12
0
def test(args):
  #setup
  driver = args['driver']
  program_url = args['url']
  data = args['data']
  os = args['os']

  landing_page = LandingPage(driver, 'Login Page', program_url, os)
  landing_page.login(data)

  #test
  recommendations = landing_page.navigate_to('Recommendations')
  data.auto_fill(recommendations)
  #recommendations.teardown()
 def test_login_verify(self):
     driver = self.driver
     driver.get(
         "https://mtrx.travel/sv?gclid=EAIaIQobChMI_JHoqpyD6QIVxIGyCh3T0A4TEAAYASAAEgKmM_D_BwE"
     )
     landingpage1 = LandingPage(driver)
     landingpage1.navigate_to_loginpage()
     Loginpage1 = LoginPage(driver)
     Loginpage1.username_txtbox("*****@*****.**")
     Loginpage1.password_txtbox("allpurpose")
     Loginpage1.click_login()
     secondpage1 = SecondPage(driver)
     secondpage1.click_mittkonto()
     logoutpage1 = LogoutPage(driver)
     logoutpage1.click_logout()
     time.sleep(3)
Exemplo n.º 14
0
def test(args):
    #setup
    driver = args['driver']
    program_url = args['url']
    data = args['data']
    os = args['os']

    landing_page = LandingPage(driver, 'Login Page', program_url, os)
    landing_page.login(data)

    #test
    preview_page = landing_page.preview_application()
    preview_page.continue_to_page()
    data.auto_fill(preview_page)
    preview_page.submit()
    preview_page.confirm_submit(data)
    preview_page.verify_application_submitted()
Exemplo n.º 15
0
def test(args):
  #setup
  driver = args['driver']
  program_url = args['url']
  data = args['data']
  os = args['os']

  landing_page = LandingPage(driver, 'Login Page', program_url, os)
  landing_page.login(data)

  #test
  all_pages = landing_page.get_all_pages_from_navbar()
  
  for page in all_pages:
    page.navigate_to()
    data.auto_fill(page)
    page.save_and_continue()

  recommendations = landing_page.navigate_to('Recommendations')
  #needs two recommendations for a complete application
  data.auto_fill(recommendations)
  data.auto_fill(recommendations)
  recommendations.save_and_continue()

  preview_page = landing_page.preview_application()
  preview_page.continue_to_page()
  data.auto_fill(preview_page)
  preview_page.submit()
  preview_page.submit_with_offline_payment()
  preview_page.verify_application_submitted()
Exemplo n.º 16
0
def test(args):
    #setup
    driver = args['driver']
    program_url = args['url']
    data = args['data']
    os = args['os']

    landing_page = LandingPage(driver, 'Login Page', program_url, os)
    data.create_random_username()

    #test
    landing_page.start_new_app(data)

    email_page = landing_page.navigate_to('Email')
    email_page.sign_in_to_gmail(data)
    email_page.check_for_and_click_email_verification_link(data)
    email_page.switch_to_newest_window()

    landing_page.set_password(data)
Exemplo n.º 17
0
def test(args):
  #setup
  driver = args['driver']
  program_url = args['url']
  data = args['data']
  os = args['os']
  
  landing_page = LandingPage(driver, 'Login Page', program_url, os)
  data.create_random_username()
  
  #test
  landing_page.start_new_app(data)

  email_page = landing_page.navigate_to('Email')
  email_page.sign_in_to_gmail(data)
  email_page.check_for_and_click_email_verification_link(data)
  email_page.switch_to_newest_window()
  
  landing_page.set_password(data)

  all_pages = landing_page.get_all_pages_from_navbar()
  
  for page in all_pages:
    page.navigate_to()
    data.auto_fill(page)
    page.save_and_continue()

  recommendations = landing_page.navigate_to('Recommendations')
  #needs two recommendations for a complete application
  data.auto_fill(recommendations)
  data.auto_fill(recommendations)
  recommendations.save_and_continue()

  landing_page.is_complete(data, all_pages)

  preview_page = landing_page.preview_application()
  preview_page.continue_to_page()
  data.auto_fill(preview_page)
  preview_page.submit()
  preview_page.confirm_submit(data)
  preview_page.verify_application_submitted()
Exemplo n.º 18
0
 def setUp(self):
     super(LandingTests, self).setUp()
     self.page = LandingPage(self.browser)
Exemplo n.º 19
0
class LandingTests(PageTestMixin, LoginMixin, LogoutMixin, FooterLegalMixin,
                   WebAppTest):
    def setUp(self):
        super(LandingTests, self).setUp()
        self.page = LandingPage(self.browser)

    def test_page(self):
        super(LandingTests, self).test_page()
        # landing page will not be viewable by logged in users
        self.page.browser.get(self.page.path)
        self.assertFalse(self.page.is_browser_on_page())

        # landing page only accessible to logged out users
        self.logout()
        # logout page will redirect to the landing page
        self._test_lenses()
        self._test_audience_messages()

    def _test_lenses(self):
        question_elements = self.page.q(css='.lens-question')
        self.assertTrue(question_elements.present)

        expected_questions = [
            'Who are my students?',
            'What are students engaging with in my course?',
            'How well is my content supporting student learning?'
        ]
        num_lenses = len(expected_questions)
        self.assertEqual(len(question_elements), num_lenses)

        for i in range(num_lenses):
            self.assertEqual(question_elements[i].text, expected_questions[i])

        summary_elements = self.page.q(css='.lens-summary')
        self.assertTrue(summary_elements.present)
        self.assertTrue(len(summary_elements), num_lenses)

        lens_icon_elements = self.page.q(css='.lens-summary h1 i')
        self.assertTrue(lens_icon_elements.present)
        self.assertTrue(len(lens_icon_elements), num_lenses)

        # make sure that the icons are hidden from screen readers
        for i in range(num_lenses):
            self.assertEqual(
                lens_icon_elements.attrs('aria-hidden')[i], 'true')

    def _test_audience_messages(self):
        element = self.page.q(css='.audience-message')
        self.assertTrue(element.present)

        expected_headers = ['Join the Open Source Community', 'Need Help?']
        if SHOW_LANDING_RESEARCH:
            expected_headers.insert(1, 'Research at edX')
        num_actions = len(expected_headers)

        module_selector = '.audience-message-module'
        header_elements = self.page.q(css=module_selector + ' h1')
        self.assertTrue(header_elements.present)
        self.assertEqual(len(header_elements), num_actions)

        action_link_elements = self.page.q(css=module_selector + ' a')
        self.assertTrue(action_link_elements.present)
        self.assertEqual(len(action_link_elements), num_actions)

        expected_links = [OPEN_SOURCE_URL, RESEARCH_URL, SUPPORT_URL]
        for i in range(num_actions):
            self.assertEqual(header_elements[i].text, expected_headers[i])
            self.assertEqual(
                action_link_elements.attrs('href')[i], expected_links[i])
Exemplo n.º 20
0
def setup(driver):
    global landing_page
    landing_page = LandingPage(driver)
    landing_page.open()
    print("Navigated to Little Caesars Homepage")
class LandingTests(PageTestMixin, LoginMixin, LogoutMixin, FooterLegalMixin, WebAppTest):
    def setUp(self):
        super(LandingTests, self).setUp()
        self.page = LandingPage(self.browser)

    def test_page(self):
        super(LandingTests, self).test_page()
        # landing page will not be viewable by logged in users
        self.page.browser.get(self.page.path)
        self.assertFalse(self.page.is_browser_on_page())

        # landing page only accessible to logged out users
        self.logout()
        # logout page will redirect to the landing page
        self._test_lenses()
        self._test_audience_messages()

    def _test_lenses(self):
        question_elements = self.page.q(css='.lens-question')
        self.assertTrue(question_elements.present)

        expected_questions = ['Who are my students?', 'What are students engaging with in my course?',
                              'How well is my content supporting student learning?']
        num_lenses = len(expected_questions)
        self.assertEqual(len(question_elements), num_lenses)

        for i in range(num_lenses):
            self.assertEqual(question_elements[i].text, expected_questions[i])

        summary_elements = self.page.q(css='.lens-summary')
        self.assertTrue(summary_elements.present)
        self.assertTrue(len(summary_elements), num_lenses)

        lens_icon_elements = self.page.q(css='.lens-summary h1 i')
        self.assertTrue(lens_icon_elements.present)
        self.assertTrue(len(lens_icon_elements), num_lenses)

        # make sure that the icons are hidden from screen readers
        for i in range(num_lenses):
            self.assertEqual(lens_icon_elements.attrs('aria-hidden')[i], 'true')

    def _test_audience_messages(self):
        element = self.page.q(css='.audience-message')
        self.assertTrue(element.present)

        expected_headers = ['Join the Open Source Community', 'Need Help?']
        if SHOW_LANDING_RESEARCH:
            expected_headers.insert(1, 'Research at edX')
        num_actions = len(expected_headers)

        module_selector = '.audience-message-module'
        header_elements = self.page.q(css=module_selector + ' h1')
        self.assertTrue(header_elements.present)
        self.assertEqual(len(header_elements), num_actions)

        action_link_elements = self.page.q(css=module_selector + ' a')
        self.assertTrue(action_link_elements.present)
        self.assertEqual(len(action_link_elements), num_actions)

        expected_links = [OPEN_SOURCE_URL, RESEARCH_URL, SUPPORT_URL]
        for i in range(num_actions):
            self.assertEqual(header_elements[i].text, expected_headers[i])
            self.assertEqual(action_link_elements.attrs('href')[i], expected_links[i])
 def setUp(self):
     super(LandingTests, self).setUp()
     self.page = LandingPage(self.browser)