def is_listed_addon()

in pages/desktop/developers/devhub_home.py [0:0]


        def is_listed_addon(self):
            """Checks the add-on listing visibility in DevHub homepage
            by looking at its status in the Edit add-on page"""
            status = self.click_my_addon_edit_link()
            try:
                # DevHub homepage will display only the Approved or Awaiting Review statuses, so we check these first
                if (
                    "Approved" in status.listed_addon_status
                    or "Awaiting Review" in status.listed_addon_status
                ):
                    return True
                else:
                    # addon is either in Incomplete or Disabled status,
                    # so we won't see the status in DevHub homepage for such cases
                    return False
            except NoSuchElementException:
                # if the add-on is unlisted, there is no status displayed, so the 'listed_addon_status'
                # element is not present in the Edit Addon page, resulting in a 'NoSuchElementException'
                return False
            finally:
                # we execute this regardless of the status in order to go back and select
                # the next available addon in the Devhub Homepage, My Addons list
                self.driver.back()