def product_catalog_sort(self, var_test):
     new_product = False
     try:
         loginAdminPageScreen().connect(Context().environment.login,
                                        Context().environment.password)
         time.sleep(3)
         try:
             adminPageScreen().go_to_admin_menu('Catalog')
             Context().logger.info("Go on catalog - products menu")
         except:
             Context().logger.warning(
                 "Issue to go on catalog - products menu")
             raise
         time.sleep(3)
         try:
             new_product = catalogProductScreen().product_catalog_sort(
                 var_test)
             Context().logger.info("the catalog has been checked")
         except:
             Context().logger.warning("Issue to check the category")
             raise
         time.sleep(3)
         try:
             loginAdminPageScreen().disconnect(product_page=False)
         except:
             Context().logger.warning("Issue with log out")
             raise
         return new_product
     except:
         raise
 def add_product(self, var_test):
     new_product = False
     try:
         loginAdminPageScreen().connect(Context().environment.login,
                                        Context().environment.password)
         time.sleep(3)
         try:
             adminPageScreen().go_to_admin_menu('Catalog')
             Context().logger.info("Go on catalog - products menu")
         except:
             Context().logger.warning(
                 "Issue to go on catalog - products menu")
             raise
         time.sleep(3)
         new_product = catalogProductScreen().add_product(var_test)
         if new_product == True:
             Context().logger.info("the new product has been added")
         else:
             Context().logger.warning("Issue to add the new product")
         time.sleep(5)
         try:
             loginAdminPageScreen().disconnect(product_page=False)
         except:
             Context().logger.warning("Issue with log out")
             raise
         return new_product
     except:
         raise
 def modify_product(self, var_test):
     found_product = False
     try:
         loginAdminPageScreen().connect(Context().environment.login,
                                        Context().environment.password)
         time.sleep(3)
         try:
             adminPageScreen().go_to_admin_menu('Catalog',
                                                'Catalog_products')
             Context().logger.info("Go on catalog - products menu")
         except:
             Context().logger.warning(
                 "Issue to go on catalog - products menu")
             raise
         time.sleep(3)
         try:
             found_product = catalogProductScreen().modify_product(var_test)
             Context().logger.info("the product has been modified")
         except:
             Context().logger.warning("Issue to modify the product")
             raise
         time.sleep(3)
         try:
             loginAdminPageScreen().disconnect()
         except:
             Context().logger.warning("Issue with log out")
             raise
         return found_product
     except:
         raise
Esempio n. 4
0
 def add_employee(self,var_test):
     found_employee = False
     try:
         loginAdminPageScreen().connect(Context().environment.login, Context().environment.password)
         time.sleep(3)
         try:
             adminPageScreen().go_to_admin_menu('Preferences','Preferences_employees')
             Context().logger.info("Go on Back-office - employees menu")
         except:
             Context().logger.warning("Issue to go on Back-office - employees menu")
             raise
         time.sleep(3)
         try:
             new_employee = adminemployeeScreen().add_employees(var_test)
             Context().logger.info("the new employee has been added")
         except:
             Context().logger.warning("Issue to add the new employee")
             raise
         try:
             found_employee = adminemployeeScreen().check_employee(new_employee)
             Context().logger.info("Find informations about the employee")
         except:
             Context().logger.warning("Issue to find informations about the employee")
             raise
         time.sleep(3)
         try:
             loginAdminPageScreen().disconnect()
         except:
             Context().logger.warning("Issue with log out")
             raise
         return found_employee
     except:
         return False
         raise
    def sort_modules(self, var_test):
        module_check = False
        try:
            loginAdminPageScreen().connect(Context().environment.login,
                                           Context().environment.password)
            time.sleep(3)
            try:
                adminPageScreen().go_to_admin_menu_by_move(
                    'Modules', 'Modules_modules')
                Context().logger.info("Go on modules - modules menu")
            except:
                Context().logger.warning(
                    "Issue to go on modules - modules  menu")
                raise

            time.sleep(3)

            try:
                module_check = ModuleScreen().sort_modules(var_test)
                Context().logger.info("the module was found")
            except:
                Context().logger.warning("Issue with the module test")
                raise

            time.sleep(3)

            try:
                loginAdminPageScreen().disconnect(product_page=False)
            except:
                Context().logger.warning("Issue with log out")
                raise
            return module_check
        except:
            raise
Esempio n. 6
0
 def open_all_controller(self):
     open_controllers = True
     try:
         loginAdminPageScreen().connect(Context().environment.login, Context().environment.password)
         time.sleep(3)
         try:
             adminPageScreen().open_all_contoller()
             Context().logger.info("Open all controllers")
         except:
             Context().logger.warning("Issue to open all controllers")
             open_controllers = False
             raise
         return open_controllers
     except:
         return False