def step_impl(context: Context, acronym: str, year: str): luy = LearningUnitYear.objects.get(acronym=acronym, academic_year__year=int(year[:4])) url = reverse('learning_unit', args=[luy.pk]) context.current_page = LearningUnitPage( driver=context.browser, base_url=context.get_url(url)).open() context.test.assertEqual(context.browser.current_url, context.get_url(url))
def step_impl(context, acronym: str): context.current_page = LearningUnitPage(context.browser, context.browser.current_url) context.current_page.wait_for_page_to_load() for i in range(2019, 2025): string_to_check = "{} ({}-".format(acronym, i) context.test.assertIn(string_to_check, context.current_page.success_messages.text)
def step_impl(context: Context, acronym: str): context.current_page.go_to_full.click() context.current_page = LearningUnitPage(context.browser, context.browser.current_url) context.current_page.wait_for_page_to_load()