def test_n_team_admin_add_sprint_1(self):
        driver = self.driver
        sprint = TeamAdminPage(driver)
        login = Loginpage(driver)
        time.sleep(2)
        login.enter_email(self.team_1_team_admin_email)
        login.enter_password(self.common_password)
        login.click_login()
        time.sleep(2)
        matchh = LeaguePage(driver)
        time.sleep(1)
        sprint.click_sprint_tab()
        time.sleep(1)
        matchh.click_add_new_button()
        time.sleep(1)
        sprint.enter_sprint_number(self.sprint_number)
        sprint.click_match_1_checkbox()
        sprint.click_match_2_checkbox()
        sprint.enter_sprint_start_date(self.match_1_date)
        sprint.enter_sprint_end_date(self.match_2_date)
        time.sleep(1)
        sprint.click_save_sprint()
# Logout
        time.sleep(5)
        login.click_profile_icon()
        login.click_profile_icon()
        time.sleep(2)
        login.click_logout()
        time.sleep(2)
        driver.delete_all_cookies()
        driver.refresh()
        time.sleep(2)
    def test_m_league_admin_add_match_2(self):
        driver = self.driver
        match = LeagueAdminPage(driver)
        matchh = LeaguePage(driver)
        login = Loginpage(driver)
        time.sleep(2)
        self.driver.get(self.GameURL)
        #match.click_game_tab()
        time.sleep(2)
        matchh.click_add_new_button()
        time.sleep(2)
        match.select_match_opponent(self.opponent2)
        match.enter_match_location(self.match_location)
        match.enter_date_location(self.match_2_date)
        match.enter_time_location(self.match_time)
        matchh.click_add_submit_button()
# Logout
        time.sleep(5)
        login.click_profile_icon()
        login.click_profile_icon()
        time.sleep(2)
        login.click_logout()
        time.sleep(2)
        driver.delete_all_cookies()
        driver.refresh()
        time.sleep(2)
    def test_i_add_player_1_2_3_and_select_team_1(self):
        driver = self.driver
        Player1 = LeaguePage(driver)
        login = Loginpage(self.driver)
        player = UserPage(driver)
        player.click_user_tab()
        time.sleep(2)
        Player1.click_add_new_button()
        time.sleep(2)
        player.enter_user_first_name(self.Team_1_player_1_first_name)
        player.enter_user_last_name(self.Team_1_player_1_last_name)
        player.enter_user_email_xpath(self.Team_1_player_1_email)
        player.enter_user_username(self.Team_1_player_1_user_name)
        player.select_user_type(self.user_types_player)
        time.sleep(4)
        player.select_team(self.Team_1_name)
        time.sleep(2)
        Player1.click_add_submit_button()
        time.sleep(2)

        Player1.click_add_new_button()
        time.sleep(2)
        player.enter_user_first_name(self.Team_1_player_2_first_name)
        player.enter_user_last_name(self.Team_1_player_2_last_name)
        player.enter_user_email_xpath(self.Team_1_player_2_email)
        player.enter_user_username(self.Team_1_player_2_user_name)
        player.select_user_type(self.user_types_player)
        time.sleep(4)
        player.select_team(self.Team_1_name)
        time.sleep(2)
        Player1.click_add_submit_button()
        time.sleep(2)

        Player1.click_add_new_button()
        time.sleep(2)
        player.enter_user_first_name(self.Team_1_player_3_first_name)
        player.enter_user_last_name(self.Team_1_player_3_last_name)
        player.enter_user_email_xpath(self.Team_1_player_3_email)
        player.enter_user_username(self.Team_1_player_3_user_name)
        player.select_user_type(self.user_types_player)
        time.sleep(4)
        player.select_team(self.Team_1_name)
        time.sleep(2)
        Player1.click_add_submit_button()
        time.sleep(2)


# Logout
        time.sleep(5)
        login.click_profile_icon()
        login.click_profile_icon()
        time.sleep(1)
        login.click_logout()
        time.sleep(2)
        driver.delete_all_cookies()
        driver.refresh()
        time.sleep(2)
Beispiel #4
0
 def test_3_Login_correct(self):
     driver = self.driver
     login = Loginpage(driver)
     time.sleep(1)
     login.enter_email(self.correct_email)
     login.enter_password(self.correct_password)
     login.click_login()
     time.sleep(1)
     login.valid_Credential_text()
     login.click_profile_icon()
     login.click_profile_icon()
     login.click_logout()
     time.sleep(2)
    def test_1_player_2_assign_cards_plan(self):
        driver = self.driver
        card = AnalystPage(driver)
        login = Loginpage(self.driver)
        login.enter_email(self.player_2_email)
        login.enter_password(self.correct_password)
        login.click_login()
        time.sleep(2)
        # card.click_card_tab()
        self.driver.get(self.agilityURL)
        time.sleep(1)
        # Match 1
        card.click_game_1()
        time.sleep(1)
        card.click_plan_tab()
        time.sleep(1)
        card.click_matrics_1()
        card.click_matrics_2()
        card.click_matrics_3()
        card.click_matrics_4()
        card.click_matrics_5()
        time.sleep(1)
        card.click_assign_submit_button()
        time.sleep(2)
        # card.click_card_tab()
        self.driver.get(self.agilityURL)
        time.sleep(1)
        # Match 2
        card.click_game_2()
        time.sleep(1)
        card.click_plan_tab()
        time.sleep(1)
        card.click_matrics_1()
        card.click_matrics_2()
        card.click_matrics_3()
        card.click_matrics_4()
        card.click_matrics_5()
        time.sleep(1)
        card.click_assign_submit_button()
        time.sleep(2)

        # Logout
        time.sleep(5)
        login.click_profile_icon()
        login.click_profile_icon()
        time.sleep(2)
        login.click_logout()
        time.sleep(2)
        driver.delete_all_cookies()
        driver.refresh()
        time.sleep(2)
    def test_t_sprint_close_and_give_actual(self):
        driver = self.driver
        sprint = TeamAdminPage(driver)
        matchh = LeaguePage(driver)
        card = AnalystPage(driver)
        cardd = TeamAdminPage(driver)
        login = Loginpage(self.driver)
        login.enter_email(self.team_1_team_admin_email)
        login.enter_password(self.common_password)
        login.click_login()
        time.sleep(2)
#sprint
        sprint.click_sprint_tab()
        time.sleep(1)
        sprint.click_edit_sprint()
        time.sleep(1)
        sprint.select_sprint_status(self.status_closed)
        time.sleep(1)
        matchh.click_add_submit_button()
        time.sleep(2)
#card
        self.driver.get(self.agilityURL)
        #card.click_card_tab()
        time.sleep(1)

#match 1
        cardd.select_card_match(self.select_match_1)
        time.sleep(1)
        cardd.enter_coach_actual_input_1(self.actual_score)
        cardd.enter_coach_actual_input_2(self.actual_score)
        cardd.enter_coach_actual_input_3(self.actual_score)
        cardd.enter_coach_actual_input_4(self.actual_score)
        cardd.click_actual_edit_save_1()
        time.sleep(2)
        cardd.enter_player_1_actual_input_1(self.actual_score)
        cardd.enter_player_1_actual_input_2(self.actual_score)
        cardd.enter_player_1_actual_input_3(self.actual_score)
        cardd.enter_player_1_actual_input_4(self.actual_score)
        cardd.click_actual_edit_save_2()
        time.sleep(2)
        cardd.enter_player_2_actual_input_1(self.actual_score)
        cardd.enter_player_2_actual_input_2(self.actual_score)
        cardd.enter_player_2_actual_input_3(self.actual_score)
        cardd.enter_player_2_actual_input_4(self.actual_score)
        cardd.click_actual_edit_save_3()
        time.sleep(2)
        cardd.enter_player_3_actual_input_1(self.actual_score)
        cardd.enter_player_3_actual_input_2(self.actual_score)
        cardd.enter_player_3_actual_input_3(self.actual_score)
        cardd.enter_player_3_actual_input_4(self.actual_score)
        cardd.click_actual_edit_save_4()

# match 2
        cardd.select_card_match(self.select_match_2)
        time.sleep(1)
        cardd.enter_coach_actual_input_1(self.actual_score)
        cardd.enter_coach_actual_input_2(self.actual_score)
        cardd.enter_coach_actual_input_3(self.actual_score)
        cardd.enter_coach_actual_input_4(self.actual_score)
        cardd.click_actual_edit_save_1()
        time.sleep(2)
        cardd.enter_player_1_actual_input_1(self.actual_score)
        cardd.enter_player_1_actual_input_2(self.actual_score)
        cardd.enter_player_1_actual_input_3(self.actual_score)
        cardd.enter_player_1_actual_input_4(self.actual_score)
        cardd.click_actual_edit_save_2()
        time.sleep(2)
        cardd.enter_player_2_actual_input_1(self.actual_score)
        cardd.enter_player_2_actual_input_2(self.actual_score)
        cardd.enter_player_2_actual_input_3(self.actual_score)
        cardd.enter_player_2_actual_input_4(self.actual_score)
        cardd.click_actual_edit_save_3()
        time.sleep(2)
        cardd.enter_player_3_actual_input_1(self.actual_score)
        cardd.enter_player_3_actual_input_2(self.actual_score)
        cardd.enter_player_3_actual_input_3(self.actual_score)
        cardd.enter_player_3_actual_input_4(self.actual_score)
        cardd.click_actual_edit_save_4()

# Logout
        time.sleep(5)
        login.click_profile_icon()
        login.click_profile_icon()
        time.sleep(2)
        login.click_logout()
        time.sleep(2)
        driver.delete_all_cookies()
        driver.refresh()
        time.sleep(2)
    def test_o_analyst_recommend_score_to_coach_and_players(self):
        driver = self.driver
        card = AnalystPage(driver)
        login = Loginpage(driver)
        time.sleep(2)
        login.enter_email(self.Team_1_analyst_email)
        login.enter_password(self.common_password)
        login.click_login()
        time.sleep(2)
        self.driver.get(self.agilityURL)
        time.sleep(2)
# Match 1
        card.click_game_1()
        time.sleep(1)
# coach
        card.click_coach_assign()
        time.sleep(2)
        card.click_matrics_1()
        card.click_matrics_2()
        card.click_matrics_3()
        card.click_matrics_4()
        card.click_matrics_5()
        time.sleep(1)
        card.click_assign_submit_button()
        time.sleep(2)
# player1
        card.click_player_1_assign()
        card.click_matrics_1()
        card.click_matrics_2()
        card.click_matrics_3()
        card.click_matrics_4()
        card.click_matrics_5()
        time.sleep(1)
        card.click_assign_submit_button()
        time.sleep(2)

#player2
        card.click_player_2_assign()
        card.click_matrics_1()
        card.click_matrics_2()
        card.click_matrics_3()
        card.click_matrics_4()
        card.click_matrics_5()
        time.sleep(1)
        card.click_assign_submit_button()
        time.sleep(2)
#player 3
        card.click_player_3_assign()
        card.click_matrics_1()
        card.click_matrics_2()
        card.click_matrics_3()
        card.click_matrics_4()
        card.click_matrics_5()
        time.sleep(1)
        card.click_assign_submit_button()
        time.sleep(2)
        self.driver.get(self.agilityURL)
        #card.click_card_tab()
        time.sleep(1)
#Match 2
        card.click_game_2()
        time.sleep(1)
# coach
        card.click_coach_assign()
        time.sleep(2)
        card.click_matrics_1()
        card.click_matrics_2()
        card.click_matrics_3()
        card.click_matrics_4()
        card.click_matrics_5()
        time.sleep(1)
        card.click_assign_submit_button()

        time.sleep(2)
# player1
        card.click_player_1_assign()
        card.click_matrics_1()
        card.click_matrics_2()
        card.click_matrics_3()
        card.click_matrics_4()
        card.click_matrics_5()
        time.sleep(1)
        card.click_assign_submit_button()
        time.sleep(2)
#player2
        card.click_player_2_assign()
        card.click_matrics_1()
        card.click_matrics_2()
        card.click_matrics_3()
        card.click_matrics_4()
        card.click_matrics_5()
        time.sleep(1)
        card.click_assign_submit_button()
        time.sleep(2)
#player3
        card.click_player_3_assign()
        card.click_matrics_1()
        card.click_matrics_2()
        card.click_matrics_3()
        card.click_matrics_4()
        card.click_matrics_5()
        time.sleep(1)
        card.click_assign_submit_button()
        time.sleep(2)

# Logout

        time.sleep(5)
        login.click_profile_icon()
        login.click_profile_icon()
        time.sleep(2)
        login.click_logout()
        time.sleep(2)
        driver.delete_all_cookies()
        driver.refresh()
        time.sleep(2)