Exemple #1
0
 def setUp(self):
     self.driver = browser.start(main.get_env(), main.get_browser())
     self.nicol = profiles.Profile(self.driver, 'nicol')
     self.patrick = profiles.Profile(self.driver, 'patrick')
     self.krabs = profiles.Profile(self.driver, 'krabs')
     self.squid = profiles.Profile(self.driver, 'squid')
     self.WDWait = WebDriverWait(self.driver, 10)
Exemple #2
0
 def setUp(self):
     self.driver = browser.start(main.get_env(), main.get_browser())
     self.nicol = profiles.Profile(self.driver, 'nicol')
     self.faker = profiles.Profile(self.driver, 'faker')
     self.tester = profiles.Profile(self.driver, 'tester')
     self.fire = profiles.Profile(self.driver, 'fire')
     self.WDWait = WebDriverWait(self.driver, 10)
Exemple #3
0
  def testSet(self):
    profile = profiles.Profile()
    profile.Set('TestKey', 'TestValue')
    profile.Set('OtherKey', 'OtherValue')

    self.assertEqual(profile._profile['TestKey'], 'TestValue')
    self.assertEqual(profile._profile['OtherKey'], 'OtherValue')
Exemple #4
0
    def load_profile(self):
        """
        prepare the data structures and actually load the sounds needed
        """
        # load the profile first
        self.profile = profiles.Profile(self.PROFILEDIR)
        self.lgr.info("profile loaded")

        # get a comprehensive list of button types
        cats = self.config["buttons"]
        cats.remove("sb")
        for i in range(6):
            cats.append("sb{}".format(i))

        # for each button type, link the physical buttons
        for cat in cats:
            if cat not in self.profile.sounds:
                self.lgr.info(
                    "couldn't load button type {} from config - profile doesn't support it"
                    .format(cat))
                continue

            if cat[:2] == "sb":
                i = int(cat[-1])
                buttons = [sorted(self.config["buttons"]["sb"])[i]]
                self.profile.assign_buttons(cat, buttons)
            else:
                self.profile.assign_buttons(cat, self.config["buttons"][cat])

        if self.cfg['SOUNDBOARD'] in self.profile.sounds["sb0"]:
            self.profile.cur_sb = self.cfg['SOUNDBOARD']
        else:
            self.profile.cur_sb = random.choice(
                list(self.profile.sounds["sb0"].keys()))
            self.update_cfg('SOUNDBOARD', self.profile.cur_sb)
Exemple #5
0
 def __init__(self):
         self.version = 6.0
         self.profile = profiles.Profile(self)
         try:
                 self.profile.set_asset()
         except Exception as e:
                 print(e)
                 messagebox.showerror("Error", "Internet Error, please verify your connection!")
                 shutil.rmtree("../.zombsAttack")
                 sys.exit()
         self.tk = Tk()
         self.tk.resizable(0, 0)
         self.tk.title("ZombsAttack Lobby - OrangoMangoGames")
         self.version_instance = version.Version(self)
         self.version_instance.get_data()
         self.check_update = self.version_instance.check()
         self.canvas = Canvas(self.tk, width=500, height=300, bg="yellow")
         self.canvas.pack()
         self.canvas.create_text(3, 285, font="Calibri 8 bold", anchor="nw", text="Game made by OrangoMango (Paul Kocian, SCRIPT) and Dado14 (Andrea Pintus, DESIGN) v{0} (C) 2020".format(self.version))
         self.playbutton = PlayButton(self)
         self.helpbutton = HelpButton(self)
         self.languagebutton = LanguageButton(self)
         self.settingsbutton = SettingsButton(self)
         self.statisticsbutton = StatisticsButton(self)
         self.shopbutton = ShopButton(self)
         
         self.canvas.tag_bind(self.playbutton.id, "<Button-1>", self.start)
         self.canvas.tag_bind(self.helpbutton.id, "<Button-1>", self.helpbutton.click)
         self.canvas.tag_bind(self.languagebutton.id, "<Button-1>", self.languagebutton.click)
         self.profile.show_gui()
         if self.check_update:
                 self.version_instance.show_gui()
         self.go = False
Exemple #6
0
def run():
    andrew = profiles.Profile(
        browser.start(main.get_env(), main.get_browser()), 'andrew')

    andrew.login()
    andrew.employee_page.on()

    filters = andrew.employee_page.get_filters()
	def setUp(self):
		self.driver = initDriver.start(main.browser)
		self.andrew = profiles.Profile(self.driver, 'andrew')

		self.defaultQuestions =  [
			{'name': 'Heart Conditions', 'value': 'dont know',
				'secondaryQuestions': [],
			},
			{'name': 'Lung Conditions', 'value': 'dont know',
				'secondaryQuestions': [],
			},
			{'name': 'Kidney Conditions', 'value': 'dont know',
				'secondaryQuestions': [],
			},
			{'name': 'Diabetes Conditions', 'value': 'dont know',
				'secondaryQuestions': [],
			},
			{'name': 'Blood Pressure Conditions', 'value': 'dont know',
				'secondaryQuestions': [],
			},
			{'name': 'Blood Clot (DVT) Conditions', 'value': 'dont know',
				'secondaryQuestions': [],
			},
			{'name': 'Neuropathy Conditions', 'value': 'dont know',
				'secondaryQuestions': [],
			},
			{'name': 'Other Health Conditions', 'value': 'dont know',
				'secondaryQuestions': [],
			},
		]

		self.freshFormInfo = {
			# 'newly_diagnosed': 'No',
			'diagnosis_date': '05/2018',
			'type': 'solitary plasmacytoma',
			'stable': 'no',
			'm_protein': 'no',
			'recent_pain': 'yes',
			'lesions': 'no lesions',
			'high_risk': 'no',
			'transplant_eligible': 'no',
			'diagnosis_location': {
				'facility': 'Huntsman Cancer',
				'city': 'Salt Lake City',
				'state': 'Utah',
			},
			'additional_diagnosis': False,
			'additional_diagnoses': [],
			'physicians': [
				{'name': 'David Avigan',
					'facility': 'Beth Israel Deaconess Medical Center',
					'city': 'Boston',
					'state': 'Massachusetts',
				},
			],
		}
Exemple #8
0
 def _GetValidProfile(self, include_payload=True):
   profile = profiles.Profile()
   profile.Set(profiles.PAYLOADKEYS_DISPLAYNAME, 'Acme Corp Config Profile')
   profile.Set(profiles.PAYLOADKEYS_IDENTIFIER, 'com.acme.configprofile')
   profile.Set(profiles.PAYLOADKEYS_ORG, 'Acme Corp')
   profile.Set(profiles.PAYLOADKEYS_SCOPE, ['System', 'User'])
   profile.Set(profiles.PAYLOADKEYS_TYPE, 'Configuration')
   if include_payload:
     profile.AddPayload(self._GetValidPayload())
   return profile
Exemple #9
0
    def test_change_password(self):
        """ test_profile.py:TestSendmiPS.test_change_password """
        # dependencies: Stand Alone4 w/ pw "asdfasdf"
        self.alone4 = profiles.Profile(self.driver, 'alone4')
        eHome = self.alone4.eHome_page
        ps_page = self.alone4.ps_page
        change_pw_page = self.alone4.ps_change_pw_page
        self.assertTrue(self.alone4.login(self.driver), messages.login)

        self.assertTrue(eHome.on())
        eHome.menu.click_option('settings')

        self.assertTrue(ps_page.on())
        # failing on next line is login failure (wrong pw)
        ps_page.change_password()

        self.assertTrue(change_pw_page.on())
        original_pass = "******"
        new_pass = "******"

        # Check Safari autofill issue
        self.assertEqual('', change_pw_page.get_current_pw())

        change_pw_page.click_continue()
        self.assertEquals(2,
                          change_pw_page.number_of_elements("p", "Required"))
        change_pw_page.enter_current_pw(original_pass)
        change_pw_page.click_continue()
        self.assertEquals(1,
                          change_pw_page.number_of_elements("p", "Required"))
        change_pw_page.enter_new_pw(new_pass)
        change_pw_page.click_continue()

        self.assertTrue(ps_page.on())
        ps_page.menu.sign_out()

        self.assertTrue(self.alone4.login(self.driver, new_pass),
                        messages.login)

        self.assertTrue(eHome.on())
        eHome.menu.click_option('settings')

        self.assertTrue(ps_page.on())
        ps_page.change_password()

        self.assertTrue(change_pw_page.on())
        change_pw_page.enter_current_pw(new_pass)
        change_pw_page.enter_new_pw(original_pass)
        change_pw_page.click_continue()
        self.assertTrue(ps_page.on())
Exemple #10
0
  def testValidateProfile(self):
    profile = profiles.Profile()

    with self.assertRaises(profiles.ProfileValidationError):
      profile._ValidateProfile()

    profile = self._GetValidProfile(include_payload=False)

    with self.assertRaises(profiles.ProfileValidationError):
      profile._ValidateProfile()

    profile.AddPayload(self._GetValidPayload())
    profile._ValidateProfile()

    self.assertIsNotNone(profile.Get(profiles.PAYLOADKEYS_UUID))
    self.assertIsNotNone(profile.Get(profiles.PAYLOADKEYS_VERSION))
Exemple #11
0
    def test_update_email(self):
        """ test_profile.py:TestPS.test_update_email """
        # dependencies: expecting default email ([email protected])
        self.alone5 = profiles.Profile(self.driver, 'alone5')
        eHome = self.alone5.eHome_page
        ps_page = self.alone5.ps_page
        edit_email_page = self.alone5.ps_edit_email_page
        confirm_page = self.alone5.ps_confirmation_page
        self.assertTrue(self.alone5.login(self.driver), messages.login)

        # Sandy should not have permissions to any businesses
        self.assertTrue(eHome.on())
        eHome.menu.click_option('settings')

        self.assertTrue(ps_page.on())
        self.assertTrue(1 == len(ps_page.edit_email_buttons))
        ps_page.edit_email(0)

        self.assertTrue(edit_email_page.on())
        self.assertFalse(
            edit_email_page.is_enabled(edit_email_page.continue_button))
        original_email = "*****@*****.**"
        updated_email = "*****@*****.**"
        edit_email_page.set_email(updated_email)
        edit_email_page.click_continue()

        self.assertTrue(confirm_page.on())
        confirm_page.enter_code()

        self.assertTrue(ps_page.on())
        self.assertEqual(ps_page.edit_email_buttons[0].text, updated_email)
        ps_page.edit_email(0)

        self.assertTrue(edit_email_page.on())
        self.assertFalse(edit_email_page.remove_email())
        edit_email_page.set_email(original_email)
        edit_email_page.click_continue()

        self.assertTrue(confirm_page.on())
        confirm_page.enter_code()

        self.assertTrue(ps_page.on())
        num_emails = len(ps_page.edit_email_buttons)
        self.assertEqual(1, num_emails)
        self.assertEqual(ps_page.edit_email_buttons[0].text, original_email)
Exemple #12
0
 def setUp(self):
     self.driver = initDriver.start(main.browser)
     self.elliot = profiles.Profile(self.driver, 'elliot')
def reset_multiverse():
  self.nicol.login()

  self.assertTrue(emp_page.on())

  #Remove old Multiverse, add new Multiverse, populate with needed employees.
  emp_page.load()
  emp_page.menu.open()
  self.assertTrue(emp_page.menu.has_business('Multiverse'))
  settings_page.go()
  self.assertTrue(settings_page.remove_business(
    "REMOVE MULTIVERSE"))
  WebDriverWait(self.driver,20).until(acct_page.on())    #profiles.py code
  self.assertTrue(acct_page.on())
  acct_page.menu.open()
  self.assertFalse(acct_page.menu.has_business('Multiverse'))

  add_page.go()
  add_page.load()
  add_page.add("Nintendo of America")
  prefilled_page.load()
  self.assertTrue(prefilled_page.click_details())

  prefilled_page.type_business_name('Multiverse')
  prefilled_page.type_dba('')
  prefilled_page.type_ein('4896434')
  prefilled_page.type_hr_email('*****@*****.**')
  prefilled_page.type_line1('17 Whiteladies Road')
  prefilled_page.type_city('Avon')
  prefilled_page.select_state('New York')
  prefilled_page.type_postal_code('14414')
  prefilled_page.type_phone('(202) 548-4023')
  prefilled_page.type_website('http://multiverse-music.com')
  self.assertTrue(prefilled_page.click_submit())

  self.assertTrue(emp_page.on())

  emp_ids = ['13313113', '242464', '65410', 'SA-001', 'SA-002', 'SA-003',
    'SA-004', 'SA-005', 'SA-006']
  for emp in ['lili', 'cheeks', 'test', 'alone1', 'alone2', 'alone3', 'alone4',
    'alone5', 'alone6']:
    self.employee = profiles.Profile(self.driver,emp)
    credentials = self.employee.credentials
    first_name = credentials['first_name']
    last_name = credentials['last_name']
    email = credentials['email']
    phone = credentials['phone']
    emp_id = emp_ids[0]
    emp_ids.pop(0)

    onboard_existing_account(first_name, last_name, email, emp_id, phone)

  emps = [
    ['Zuriel', 'Conseco', '*****@*****.**'],
    ['Zuriel', 'Hernandez', '*****@*****.**'],
    ['Jane', 'Doe', '*****@*****.**']
    ]
  emp_ids = ['9876543210', '0123456789', '99887766']
  #Remove Conseco, Terminate Hernandez, Invite Jane.
  while emp_ids:
    employee_id = emp_ids.pop(0)
    emp_page.click_plus()
    emp_page.click_add_employee()
    self.assertTrue(add_page.on())
    add_page.set_first_name(first_name)
    add_page.set_last_name(last_name)
    add_page.set_email(email)
    add_page.set_phone(phone)
    add_page.set_id(employee_id)
    add_page.click_employee_add()
    time.sleep(1)
    self.assertTrue(emp_page.on())
    if len(emp_ids) is 2:
      emp_page.remove_employee('id',employee_id)
    elif len(emp_ids) is 1:
      emp_page.terminate_employee('id',employee_id)
Exemple #14
0
 def setUp(self):
     self.driver = initDriver.start(main.browser)
     self.andrew = profiles.Profile(self.driver, 'andrew')
Exemple #15
0
 def setUp(self):
     self.driver = browser.start(main.get_env(), main.get_browser())
     self.cheeks = profiles.Profile(self.driver, 'cheeks')
     self.alone6 = profiles.Profile(self.driver, 'alone6')
Exemple #16
0
  def testGet(self):
    profile = profiles.Profile()
    profile._profile['TestKey'] = 'TestValue'

    self.assertEqual(profile.Get(profiles.PAYLOADKEYS_CONTENT), [])
    self.assertEqual(profile.Get('TestKey'), 'TestValue')
Exemple #17
0
 def testInit(self):
   """Test the __init__ method."""
   profile = profiles.Profile()
   self.assertIsNotNone(profile._profile)
   self.assertEqual(profile._profile[profiles.PAYLOADKEYS_CONTENT], [])
 def setUp(self):
     self.driver = browser.start(main.get_env(), main.get_browser())
     self.nicol = profiles.Profile(self.driver, 'nicol')
     self.poli = profiles.Profile(self.driver)
     self.WDWait = WebDriverWait(self.driver, 10)
Exemple #19
0
 def setUp(self):
     self.driver = browser.start(main.get_env(), main.get_browser())
     self.cheeks = profiles.Profile(self.driver, 'cheeks')
     self.lili = profiles.Profile(self.driver, 'lili')
     self.nicol = profiles.Profile(self.driver, 'nicol')
def setUp(self):
    self.driver = browser.start(main.get_env(),main.get_browser())
    self.nicol = profiles.Profile(self.driver,'nicol')
    self.employee = profiles.Profile(self.driver, 'lili')
    self.assertTrue(self.nicol.env_loaded())
Exemple #21
0
 def setUp(self):
     self.driver = browser.start(main.get_env(), main.get_browser())
     self.nicol = profiles.Profile(self.driver, 'nicol')
Exemple #22
0
 def setUp(self):
     self.driver = browser.start(main.get_env(), main.get_browser())
     self.andrewS = profiles.Profile(self.driver, 'andrewSendmi')