mangroveorg/datawinners

View on GitHub
func_tests/pages/alldatasenderspage/all_data_senders_page.py

Summary

Maintainability
F
4 days
Test Coverage

AllDataSendersPage has 70 functions (exceeds 20 allowed). Consider refactoring.
Open

class AllDataSendersPage(Page):
    def __init__(self, driver):
        Page.__init__(self, driver)

    def navigate_to_add_a_data_sender_page(self):
Severity: Major
Found in func_tests/pages/alldatasenderspage/all_data_senders_page.py - About 1 day to fix

    File all_data_senders_page.py has 252 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    # vim: ai ts=4 sts=4 et sw=4 encoding=utf-8
    import time
    from pages.adddatasenderspage.add_data_senders_locator import ADD_GROUP_DIALOG, CANCEL_POP, RENAME_GROUP_DIALOG, \
        RENAME_GROUP_BUTTON, DELETE_GROUP_BUTTON
    from pages.adddatasenderspage.add_data_senders_page import AddDataSenderPage
    Severity: Minor
    Found in func_tests/pages/alldatasenderspage/all_data_senders_page.py - About 2 hrs to fix

      Similar blocks of code found in 4 locations. Consider refactoring.
      Open

          def select_a_data_sender_by_id(self, data_sender_id):
              self.driver.wait_for_element(UI_TEST_TIMEOUT, by_xpath(DATA_SENDER_CHECK_BOX_BY_UID_XPATH % data_sender_id),
                                           True)
      
              self.driver.find(by_xpath(DATA_SENDER_CHECK_BOX_BY_UID_XPATH % data_sender_id)).click()
      func_tests/pages/addgrouppage/add_group_page.py on lines 25..27
      func_tests/pages/addgrouppage/add_group_page.py on lines 29..31
      func_tests/pages/projectdatasenderspage/project_data_senders_page.py on lines 122..126

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 55.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 4 locations. Consider refactoring.
      Open

          def is_edit_disabled(self):
              class_name = self.driver.find(by_xpath(ACTION_LI_LOCATOR % EDIT)).get_attribute("class")
              return class_name.find('disabled') > 0
      func_tests/pages/alldatasenderspage/all_data_senders_page.py on lines 197..199
      func_tests/pages/alldatasenderspage/all_data_senders_page.py on lines 201..203
      func_tests/pages/alldatasenderspage/all_data_senders_page.py on lines 205..207

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 50.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 4 locations. Consider refactoring.
      Open

          def is_associate_disabled(self):
              class_name = self.driver.find(by_xpath(ACTION_LI_LOCATOR % ASSOCIATE)).get_attribute("class")
              return class_name.find('disabled') > 0
      func_tests/pages/alldatasenderspage/all_data_senders_page.py on lines 193..195
      func_tests/pages/alldatasenderspage/all_data_senders_page.py on lines 197..199
      func_tests/pages/alldatasenderspage/all_data_senders_page.py on lines 205..207

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 50.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 4 locations. Consider refactoring.
      Open

          def is_delete_disabled(self):
              class_name = self.driver.find(by_xpath(ACTION_LI_LOCATOR % DELETE)).get_attribute("class")
              return class_name.find('disabled') > 0
      func_tests/pages/alldatasenderspage/all_data_senders_page.py on lines 193..195
      func_tests/pages/alldatasenderspage/all_data_senders_page.py on lines 201..203
      func_tests/pages/alldatasenderspage/all_data_senders_page.py on lines 205..207

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 50.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 4 locations. Consider refactoring.
      Open

          def is_dissociate_disabled(self):
              class_name = self.driver.find(by_xpath(ACTION_LI_LOCATOR % DISSOCIATE)).get_attribute("class")
              return class_name.find('disabled') > 0
      func_tests/pages/alldatasenderspage/all_data_senders_page.py on lines 193..195
      func_tests/pages/alldatasenderspage/all_data_senders_page.py on lines 197..199
      func_tests/pages/alldatasenderspage/all_data_senders_page.py on lines 201..203

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 50.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 5 locations. Consider refactoring.
      Open

          def is_make_web_user_disabled(self):
              class_name = self.driver.find(by_id("add-email")).get_attribute("class")
              return class_name.find('disabled') > 0
      func_tests/pages/projectdatasenderspage/project_data_senders_page.py on lines 131..133
      func_tests/pages/projectsubjectspage/project_subjects_page.py on lines 40..42
      func_tests/pages/projectsubjectspage/project_subjects_page.py on lines 44..46
      func_tests/pages/projectsubjectspage/project_subjects_page.py on lines 48..50

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 44.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 4 locations. Consider refactoring.
      Open

          def get_cell_value(self, row, column):
              # first row is used to show all rows select message
              return self.driver.find(by_xpath(".//*[@id='datasender_table']/tbody/tr[%s]/td[%s]" % ((row + 1), column))).text
      func_tests/pages/allsubjectspage/all_subject_type_page.py on lines 138..140
      func_tests/pages/submissionlogpage/submission_log_page.py on lines 95..96
      func_tests/pages/submissionlogpage/submission_log_page.py on lines 169..171

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 40.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

          def click_confirm(self, wait=False):
              """
              Function to confirm the association/dissociation with projects on all data sender page
               """
              self.driver.find(CONFIRM_BUTTON).click()
      func_tests/pages/alldatasenderspage/all_data_senders_page.py on lines 55..61

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 40.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

          def is_datasender_with_ID_checked(self, datasender_ID):
              return self.driver.find(by_xpath(DATA_SENDER_CHECK_BOX_BY_UID_XPATH % datasender_ID)).get_attribute(
      func_tests/pages/allsubjectspage/all_subject_type_page.py on lines 114..115

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 40.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

          def click_remove(self, wait=False):
              """
              Function to confirm the association/dissociation with projects on all data sender page
               """
              self.driver.find(REMOVE_BUTTON).click()
      func_tests/pages/alldatasenderspage/all_data_senders_page.py on lines 47..53

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 40.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

          def select_group_rename_icon(self, group_name):
              self.driver.find(by_xpath(".//*[@id='group_panel']/div/ol/li[contains(.,'"+group_name +"')]/div[2]/span[1]/img")).click()
      func_tests/pages/alldatasenderspage/all_data_senders_page.py on lines 294..295

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 38.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

          def click_delete_group_icon(self, group_name):
               self.driver.find(by_xpath(".//*[@id='group_panel']/div/ol/li[contains(.,'"+group_name +"')]/div[2]/span[2]/img")).click()
      func_tests/pages/alldatasenderspage/all_data_senders_page.py on lines 291..292

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 38.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

          def open_import_lightbox(self):
              from pages.adddatasenderspage.add_data_senders_locator import OPEN_IMPORT_DIALOG_LINK
              from pages.lightbox.import_datasender_light_box_page import ImportDatasenderLightBox
      
              self.driver.find(OPEN_IMPORT_DIALOG_LINK).click()
      Severity: Minor
      Found in func_tests/pages/alldatasenderspage/all_data_senders_page.py and 1 other location - About 50 mins to fix
      func_tests/pages/projectdatasenderspage/project_data_senders_page.py on lines 109..114

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 36.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 5 locations. Consider refactoring.
      Open

          def go_to_add_group_page(self):
              self.driver.find(by_css('.add_link')).click()
              return AddGroupPage(self.driver)
      Severity: Major
      Found in func_tests/pages/alldatasenderspage/all_data_senders_page.py and 4 other locations - About 40 mins to fix
      func_tests/pages/allsubjectspage/all_subjects_list_page.py on lines 39..41
      func_tests/pages/dataanalysispage/data_analysis_page.py on lines 22..24
      func_tests/pages/languagespage/customized_languages_page.py on lines 103..105
      func_tests/pages/projectoverviewpage/project_overview_page.py on lines 56..58

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 34.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 8 locations. Consider refactoring.
      Open

          def navigate_to_add_a_data_sender_page(self):
              """
              Function to navigate to add a data sender page of the website
      
              Return create project page
      Severity: Major
      Found in func_tests/pages/alldatasenderspage/all_data_senders_page.py and 7 other locations - About 35 mins to fix
      func_tests/pages/activateaccountpage/activate_account_page.py on lines 33..41
      func_tests/pages/allsubjectspage/all_subject_type_page.py on lines 18..25
      func_tests/pages/globalnavigationpage/global_navigation_page.py on lines 39..46
      func_tests/pages/globalnavigationpage/global_navigation_page.py on lines 57..64
      func_tests/pages/loginpage/login_page.py on lines 82..89
      func_tests/pages/projectdatasenderspage/project_data_senders_page.py on lines 28..33
      func_tests/pages/reviewpage/review_page.py on lines 116..123

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 33.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

          def get_project_names(self, data_sender_id):
              """
              Function to fetch the associated project names from the all data senders page
               """
              return self.driver.find(by_xpath(PROJECT_NAME_LABEL_XPATH % data_sender_id)).text
      Severity: Minor
      Found in func_tests/pages/alldatasenderspage/all_data_senders_page.py and 1 other location - About 35 mins to fix
      func_tests/pages/alldatasenderspage/all_data_senders_page.py on lines 114..118

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 33.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

          def get_uid(self, data_sender_mobile):
              """
              Function to fetch the mobile number from the all data senders page
               """
              return self.driver.find(by_xpath(UID_LABEL_BY_MOBILE_XPATH % data_sender_mobile)).text
      Severity: Minor
      Found in func_tests/pages/alldatasenderspage/all_data_senders_page.py and 1 other location - About 35 mins to fix
      func_tests/pages/alldatasenderspage/all_data_senders_page.py on lines 108..112

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 33.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

          def is_add_ds_lightbox_open_after_a_click_in_the_instructions(self):
              link_locator = ".dataTables_empty ul li:nth-child(2) a:nth-child(1)"
              dialog_title_locator = "#ui-dialog-title-datasender-popup"
              close_dialog_locator = "a#cancel"
              return self.check_links_should_open_dialog(link_locator, dialog_title_locator, close_dialog_locator)
      Severity: Minor
      Found in func_tests/pages/alldatasenderspage/all_data_senders_page.py and 1 other location - About 30 mins to fix
      func_tests/pages/alldatasenderspage/all_data_senders_page.py on lines 323..327

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 32.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

          def is_import_lightbox_open_after_a_click_in_the_instructions(self):
              link_locator = ".dataTables_empty ul li:nth-child(2) a:nth-child(2)"
              dialog_title_locator = "#ui-dialog-title-popup-import"
              close_dialog_locator = "a.close_import_dialog"
              return self.check_links_should_open_dialog(link_locator, dialog_title_locator, close_dialog_locator)
      Severity: Minor
      Found in func_tests/pages/alldatasenderspage/all_data_senders_page.py and 1 other location - About 30 mins to fix
      func_tests/pages/alldatasenderspage/all_data_senders_page.py on lines 329..333

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 32.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      There are no issues that match your filters.

      Category
      Status