def soft_assert_cannot_view_proposals(info_page, soft_assert): """Performs soft assertion that user cannot view proposals for disabled object.""" info_page.click_change_proposals() soft_assert.expect( info_page.proposals_tab_or_link_name not in info_page.tabs.tab_names, "'Change Proposals' tab should not be displayed.") soft_assert.expect(are_tabs_urls_equal(), "Tabs urls should be equal.") for tab_num, tab in enumerate(browsers.get_browser().windows(), start=1): tab.use() soft_assert.expect( not related_proposals.RelatedProposals().are_proposals_displayed(), "Proposals should not be displayed in browser tab number {}.". format(tab_num))
def related_proposals(self): """Open related proposals tab.""" self.tabs.ensure_tab(self.proposals_tab) selenium_utils.wait_for_js_to_load(self._driver) return related_proposals.RelatedProposals()