from behave import given, when, then from helpers.test_data.catalog_data import song_names, product_names # --- Home Screen --- @given('I can see the catalog screen') @when('I can see the catalog screen') @then('I can see the catalog screen') def step_impl(context): context.home_screen.go_home() @then('The My Catalog screen should be displayed in the selected language') def step_impl(context): context.home_screen.verify_my_catalog_screen_is_localized(context) @then('The My Catalog screen should be displayed in the default language') def step_impl(context): context.current_language = 'English' context.home_screen.verify_my_catalog_screen_is_localized(context) @then('The songs tab displays with data') def step_impl(context): context.home_screen.assert_top_tracks() @then('Recent playlists are displayed') def step_impl(context): if "sme" not in context.app_name: context.home_screen.assert_playlists() @then('Recent products are displayed') def step_impl(context): context.home_screen.assert_products() @then('The songs labeled with {label} are displayed') def step_impl(context, label): context.home_screen.assert_multiple_track_labels_correctness(label) @then('The songs branded with {brand} are displayed') def step_impl(context, brand): context.home_screen.assert_multiple_track_brands_correctness(brand) @then('The products labeled with {label} are displayed') def step_impl(context, label): context.home_screen.assert_multiple_product_labels_correctness(label) @then('The products branded with {brand} are displayed') def step_impl(context, brand): context.home_screen.assert_multiple_product_brands_correctness(brand) @then('The playlisting labeled with {label} are displayed') def step_impl(context, label): if "sme" not in context.app_name: context.home_screen.assert_multiple_playlist_labels_correctness(label) @then('The songs popular in {country} are displayed') def step_impl(context, country): context.home_screen.assert_tracks_belong_to_country(country) @then('I should see songs with {artist} as the only artist') def step_impl(context, artist): context.home_screen.assert_songs_with_only_artist(artist) @then("The sorting option displayed should be '{sorting_option}'") def step_impl(context, sorting_option): if "sme" not in context.app_name: context.home_screen.assert_displayed_sorting_option(sorting_option) @then("All playlists are displayed sorted by the '1D STREAMS' filter") def step_impl(context): if "sme" not in context.app_name: context.home_screen.assert_playlists_sorted_by_streams("1d") @then("All playlists are displayed sorted by the '7D STREAMS' filter") def step_impl(context): if "sme" not in context.app_name: context.home_screen.assert_playlists_sorted_by_streams("7d") @then("All playlists are displayed sorted by the 'Followers' filter") def step_impl(context): if "sme" not in context.app_name: context.home_screen.assert_playlists_sorted_by_followers() @then("All {items} sorted by the number of streams in descending order") def step_impl(context, items): context.home_screen.assert_values_sorted_by_custom_format() @then('Products sorted by the release date') def step_impl(context): context.home_screen.assert_products_sorted_by_release_date() @then("All songs sorted by the release date") def step_impl(context): if "sme" not in context.app_name: context.home_screen.assert_track_release_date_sorting() @then('I should see the "{items_type}" error message') def step_impl(context, items_type): context.home_screen.assert_no_items_error_msg(items_type) @then('Artists cards should display correct and complete information') def step_impl(context): context.home_screen.assert_artists_cards() @then('No artists should be displayed') def step_impl(context): context.home_screen.assert_no_artists_displayed() @then('The total number of displayed artists should exceed {number}') def step_impl(context, number): context.home_screen.assert_number_of_displayed_artists_exceeds(number) @then('Products cards should display correct and complete information') def step_impl(context): context.home_screen.assert_products_cards() @then('Songs cards should display correct and complete information') def step_impl(context): context.home_screen.assert_songs_cards() @then('The total number of displayed products should exceed {number}') def step_impl(context, number): context.home_screen.assert_number_of_displayed_products_exceeds(number) @then('I should be able to paginate through the songs list') def step_impl(context): context.home_screen.assert_songs_pagination() @then('I should be able to paginate through the products list') def step_impl(context): context.home_screen.assert_products_pagination() @then('I should be able to paginate through the artists list') def step_impl(context): context.home_screen.assert_artists_pagination() @then('I should be able to paginate through the playlists list') def step_impl(context): context.home_screen.assert_playlists_pagination() # --- Search Screen --- @then('The recent search on line {line_num} is {item}') def step_impl(context, line_num, item): context.search_screen.verify_recent_search_on_line_android(line_num, item) @then('The recent search entry on line ' '{entry_line} is {search_item} with ID {identifier}') def step_impl(context, entry_line, search_item, identifier): context.search_screen.verify_recent_search_on_line_ios( entry_line, search_item, identifier) @then('The search results should display a message ' 'indicating no matches were found') def step_impl(context): context.search_screen.assert_no_matches_error_msg() @then('The All {category} search results page for ' '"{name}" should be displayed') def step_impl(context, category, name): context.search_screen.verify_all_search_results_page(category, name) @then('Each artist result card should display all required elements') def step_impl(context): context.search_screen.verify_all_artists_search_results_card() @then('Each song result card should display all required elements') def step_impl(context): context.search_screen.verify_all_songs_search_results_card() @then('Each product result card should display all required elements') def step_impl(context): context.search_screen.verify_all_products_search_results_card() @then('I should be able to scroll through ' 'the complete list of {category} results') def step_impl(context, category): context.search_screen.scroll_through_all_results(category) # --- Sound Recording Screen --- @then('The sound recording screen displays {quantity} data') def step_impl(context, quantity): if quantity == 'all': context.sound_recording_screen.assert_all_sections(context) else: # TODO: Temporarily disabled behind flag GO-4730 # context.sound_recording_screen.assert_all_time_streams() context.sound_recording_screen.verify_streaming_trend_main_elements() @then('The track page for the selected track should be displayed') def step_impl(context): context.sound_recording_screen.assert_track_and_artist_names( context.track_name_of_song, context.track_artist_of_song) @then("All expected elements in the song header for " "artist {artist_name} should be present") def step_impl(context, artist_name): (context.sound_recording_screen. verify_header_elements_for_artist(artist_name)) @then('The song header should display correct information for {song_name}') def step_impl(context, song_name): context.sound_recording_screen.verify_header_info(song_names[song_name]) @then('The general info section should display ' 'correct and valid information for the track') def step_impl(context): # TODO: Temporarily disabled behind flag GO-4730 # context.sound_recording_screen.verify_general_info_section() pass @then('The "Recent" period should be selected by default') def step_impl(context): context.sound_recording_screen.verify_recent_period_selected_by_default() @then('The POT recent total value should be the same for all POT tabs') def step_impl(context): (context.sound_recording_screen. verify_pot_recent_total_value_consistent_across_tabs(context)) @then('The POT all time total value should be the same for all POT tabs') def step_impl(context): (context.sound_recording_screen. verify_pot_all_time_total_value_consistent_across_tabs(context)) @then('The POT list should display {amount:d} stores by default') @then('The POT list should display top {amount:d} stores') @then('The POT list should display top {amount:d} countries') def step_impl(context, amount): context.sound_recording_screen.verify_pot_rows_count(amount) @then('The POT graph should be updated to display data only ' 'for the selected store') @then('The POT graph should be updated to display data only ' 'for the selected country') def step_impl(context): (context.sound_recording_screen. verify_pot_graph_has_expected_number_of_lines()) @then('The last day value from the POT graph should match ' 'the "1D" value in the POT table') def step_impl(context): (context.sound_recording_screen. verify_pot_graph_last_day_matches_table_1d_value(context)) @then('The last day value from the POT graph should match the "1D" value ' 'in the "Total Streams" row') def step_impl(context): (context.sound_recording_screen. verify_pot_graph_last_day_matches_table_1d_value(context, value_index=0)) @then('The last day value from the DSoS "{tab_name}" graph should match ' 'the "1D" value in the DSoS table') def step_impl(context, tab_name): (context.sound_recording_screen. verify_graph_last_day_matches_table_1d_value(context, tab_name)) @then('I should see a message indicating that streaming data may be delayed') def step_impl(context): assert context.store_without_data_is_selected, ( "No POT store without data was selected" ) context.sound_recording_screen.verify_streaming_data_delayed_message() @then('The "Show All Items" button should be visible') def step_impl(context): context.sound_recording_screen.verify_show_more_button() @then('The "Show Less Items" button should be visible') def step_impl(context): context.sound_recording_screen.verify_show_less_button() @then('The Store Status screen should be displayed ' 'with all essential elements') def step_impl(context): context.sound_recording_screen.verify_store_status_screen() @then('The Top Playlists section should display ' 'correct and complete information') def step_impl(context): context.sound_recording_screen.verify_top_playlists_section_content() @then('The Top Markets section should display ' 'correct and complete information') def step_impl(context): context.sound_recording_screen.verify_top_markets_section_content(context) @then('Playlist cards should display correct and complete information') def step_impl(context): context.sound_recording_screen.verify_top_playlists_cards_content(context) @then('Top Markets cards should display correct and complete information') def step_impl(context): context.sound_recording_screen.verify_top_markets_cards_content(context) @then('Playlist cards should display the following attributes') def step_impl(context): if context.sound_recording_screen.assert_no_playlists_displayed(): return # Skip checking attributes if no playlists are displayed for row in context.table: property_name = row['Property'].strip() expected_values = row['Value'].strip().split(', ') match property_name: case 'Playlist Type': context.sound_recording_screen.assert_playlist_types( expected_values) case 'Country Label': context.sound_recording_screen.assert_country_labels( expected_values) case 'Store Icon': context.sound_recording_screen.assert_store_icon( expected_values) case 'Artist': context.sound_recording_screen.assert_artists_name( expected_values) case _: raise ValueError(f'Unknown action: {property_name}') @then('All essential elements of the Streaming Trend section ' 'should be visible') def step_impl(context): context.sound_recording_screen.verify_streaming_trend_main_elements() @then('All essential elements of the TikTok Creations section ' 'should be visible') def step_impl(context): context.sound_recording_screen.verify_tiktok_creations_main_elements() @then('The total value collected from the TikTok Creations chart ' 'on the song screen should match ' 'the "{days:d} DAYS" total in the table') def step_impl(context, days): value_index_map = { 7: 2, 28: 3, } screen = context.sound_recording_screen screen.verify_tiktok_creations_chart_matches_table( value_index=value_index_map[days], days=days ) @then('The total value collected from the TikTok Creations chart ' 'on the detailed screen should match ' 'the "{days:d} DAYS" total in the table') def step_impl(context, days): value_index_map = { 7: 2, 28: 3, } screen = context.sound_recording_screen screen.verify_detailed_tiktok_creations_chart_matches_table( value_index=value_index_map[days], days=days ) @then('The total value collected from the TikTok Views chart ' 'on the detailed screen should match ' 'the "{days:d} DAYS" total in the table') def step_impl(context, days): value_index_map = { 7: 2, 28: 3, } screen = context.sound_recording_screen screen.verify_detailed_tiktok_views_chart_matches_table( value_index=value_index_map[days], days=days ) @then('The UGC values collected from the TikTok Creations chart ' 'on the detailed screen should match ' 'the "{days:d} DAYS" total in the table') def step_impl(context, days): value_index_map = { 7: 1, 28: 2, } screen = context.sound_recording_screen screen.verify_detailed_ugc_tiktok_creations_chart_matches_table( value_index=value_index_map[days], days=days ) @then('The UGC values collected from the TikTok Views chart ' 'on the detailed screen should match ' 'the "{days:d} DAYS" total in the table') def step_impl(context, days): value_index_map = { 7: 1, 28: 2, } screen = context.sound_recording_screen screen.verify_detailed_ugc_tiktok_views_chart_matches_table( value_index=value_index_map[days], days=days ) @then('The PGC values collected from the TikTok Creations chart ' 'on the detailed screen should match ' 'the "{days:d} DAYS" total in the table') def step_impl(context, days): value_index_map = { 7: 1, 28: 2, } screen = context.sound_recording_screen screen.verify_detailed_pgc_tiktok_creations_chart_matches_table( value_index=value_index_map[days], days=days ) @then('The PGC values collected from the TikTok Views chart ' 'on the detailed screen should match ' 'the "{days:d} DAYS" total in the table') def step_impl(context, days): value_index_map = { 7: 1, 28: 2, } screen = context.sound_recording_screen screen.verify_detailed_pgc_tiktok_views_chart_matches_table( value_index=value_index_map[days], days=days ) @then('I should see the "SEE ALL TIKTOK DATA" button below the tiktok section') def step_impl(context): context.sound_recording_screen.verify_see_all_tiktok_data_button() @then('The TikTok Data page should be displayed') def step_impl(context): context.sound_recording_screen.verify_tiktok_data_page() @then('The UGC/PGC tab should be active, and its graphs should be visible') def step_impl(context): context.sound_recording_screen.verify_ugc_pgc_tab() @then('The Country tab should be active, and its graphs should be visible') def step_impl(context): context.sound_recording_screen.verify_country_tab() @then('I should see the "See All" button below the playlists section') def step_impl(context): context.sound_recording_screen.verify_see_all_playlists_button() @then('A popup with information about the Top Playlists section should appear') def step_impl(context): context.sound_recording_screen.verify_top_playlists_popup_content() @then('A popup with information about the Top Charts section should appear') def step_impl(context): context.sound_recording_screen.verify_top_charts_popup_content() @then('The following Top Charts cards for Spotify should display correct ' 'and complete information') def step_impl(context): expected_charts = [row["Spotify"] for row in context.table] (context.sound_recording_screen. assert_spotify_top_charts_cards(context, expected_charts)) @then('The following Top Charts cards for Apple should display correct ' 'and complete information') def step_impl(context): expected_charts = [row["Apple"] for row in context.table] (context.sound_recording_screen. assert_apple_top_charts_cards(context, expected_charts)) @then("All playlists are displayed sorted by the 'Most Recent' filter") def step_impl(context): context.sound_recording_screen.assert_playlists_sorted_by_most_recent() @then('The total number of displayed playlists should be {number}') def step_impl(context, number): (context.sound_recording_screen. assert_number_of_displayed_playlists(context, number)) @then('The total number of displayed playlists should exceed {number}') def step_impl(context, number): (context.sound_recording_screen. assert_number_of_displayed_playlists_exceeds(number)) @then('No playlists should be displayed') def step_impl(context): context.sound_recording_screen.assert_no_playlists_displayed() @then('The total number of displayed Top Market cards should be {number}') def step_impl(context, number): if "sme" not in context.app_name: (context.sound_recording_screen. assert_number_of_displayed_top_market_cards(number)) @then('A message indicating the track is not from the catalog ' 'should be displayed') def step_impl(context): context.sound_recording_screen.assert_non_catalog_track_message_displayed() @then('Only the sections relevant for a non-catalog track should be displayed') def step_impl(context): context.sound_recording_screen.assert_only_non_catalog_sections_visible() @then('I should be navigated to the {charts_name} Spotify Charts page') def step_impl(context, charts_name): (context.sound_recording_screen. assert_spotify_charts_page_displayed(context, charts_name)) @then('I should be navigated to the {charts_name} Apple Charts page') def step_impl(context, charts_name): (context.sound_recording_screen. assert_apple_charts_page_displayed(context, charts_name)) @then("The sorting option displayed for " "Top Charts should be {sorting_option}") def step_impl(context, sorting_option): context.sound_recording_screen.assert_selected_sorting(sorting_option) @then("All Top Charts cards should be sorted by MARKET NAME") def step_impl(context): (context.sound_recording_screen. assert_top_charts_cards_sorted_by_market_name()) @then("All charts sorted by their POSITION in descending order") def step_impl(context): (context.sound_recording_screen. assert_top_charts_cards_sorted_by_position()) @then('A popup with information about the ' '{charts_name} Spotify Charts should appear') def step_impl(context, charts_name): if context.visible_chart_bullets == 3: (context.sound_recording_screen. verify_spotify_charts_i_popup_content_for(charts_name)) elif (context.visible_chart_bullets == 2 and charts_name in ['Daily Top 200', 'Weekly Top 200']): (context.sound_recording_screen. verify_spotify_charts_i_popup_content_for(charts_name)) else: context.sound_recording_screen.close_i_popup() @then('A popup with information about the ' '{charts_name} Apple Charts should appear') def step_impl(context, charts_name): (context.sound_recording_screen. verify_apple_charts_i_popup_content_for(charts_name)) # --- Artist Screen --- @then('I should be navigated to the artist page for {artist}') def step_impl(context, artist): context.artist_screen.assert_header(artist) @then('I should be navigated to the selected artist page') def step_impl(context): context.artist_screen.assert_header(context.artist_name) @then('The artist screen for {artist} displays data') def step_impl(context, artist): context.artist_screen.assert_all_sections(artist) @then('All expected elements in the artist header for {artist} ' 'should be present') def step_impl(context, artist): context.artist_screen.assert_artist_header_elements_present(artist) @then("The share screen with 'Share Link' and 'Share as Image' options " "should be displayed") def step_impl(context): context.artist_screen.assert_share_screen_options_displayed() @then("I should see the 'MANAGE LINKED ACCOUNTS' button " "below the Social Followers section") def step_impl(context): context.artist_screen.assert_manage_linked_accounts_visible() @then('All available social networks should be displayed') def step_impl(context): context.artist_screen.assert_social_metrics() @then('Social networks should be sorted by ' 'number of followers in descending order') def step_impl(context): context.artist_screen.assert_social_networks_sorted_by_followers_desc() @then('All expected metrics should be visible') def step_impl(context): context.artist_screen.assert_expected_metrics() @then('A graph should be displayed for each connected social network') def step_impl(context): (context.artist_screen. assert_graph_displayed_for_each_connected_social_network()) @then('The Fan Conversion Ratio page should be displayed') def step_impl(context): context.artist_screen.assert_fan_conversion_ratio_displayed() @then('The Manage Linked Accounts page should be displayed') def step_impl(context): context.artist_screen.assert_manage_linked_accounts_page_displayed() @then('The Social Followers page should be displayed') def step_impl(context): context.artist_screen.assert_social_followers_page_displayed() @then('The following platforms should be listed') def step_impl(context): expected_platforms = [row["Name"] for row in context.table] (context.artist_screen. assert_listed_social_platforms(expected_platforms)) @then('I should see the "SEE ALL" button below the Top Songs section') def step_impl(context): context.artist_screen.assert_see_all_button_visible() @then('The total number of displayed songs should be {number}') def step_impl(context, number): context.artist_screen.assert_number_of_displayed_songs(number) @then('The total number of displayed songs should exceed {number}') def step_impl(context, number): context.artist_screen.assert_number_of_displayed_songs_exceed(number) @then("The country filter summary should display " "'{countries}' should be displayed") def step_impl(context, countries): context.artist_screen.assert_country_filter_summary(countries) @then("The country filter summary should be " "empty and not display '{excluded_countries}'") def step_impl(context, excluded_countries): (context.artist_screen. assert_country_filter_summary_is_empty(excluded_countries)) @then('I should be able to close the filter window') def step_impl(context): context.artist_screen.close_filter_window() @then('Songs for the selected countries should be displayed') def step_impl(context): context.artist_screen.assert_number_of_displayed_songs_exceed('5') @then("All songs are displayed sorted by the '{filter_option}' filter") def step_impl(context, filter_option): context.artist_screen.assert_songs_are_sorted_by(filter_option) @then("I should see the full list of available countries with " "'Global (Default)' selected by default") def step_impl(context): context.artist_screen.assert_country_list_with_global_selected_by_default() # --- Product Screen --- @then('The product header should display ' 'correct information for {product_name}') def step_impl(context, product_name): context.product_name = product_name context.product_screen.verify_header_info(product_names[product_name]) @then('The product page for the selected product should be displayed') def step_impl(context): context.product_screen.assert_product_page_is_displayed(context) @then('The Data sources page is opened') def step_impl(context): context.product_screen.verify_data_sources_opened(context) @then('The product tracklist should be displayed') def step_impl(context): context.product_screen.verify_product_tracklist_displayed() @then('Tracklist cards should display correct and complete information') def step_impl(context): context.product_screen.verify_tracklist_cards_content() # --- My Favorites --- @then('The Artist tab is displayed as the default tab') def step_impl(context): context.my_favorites_screen.assert_artists_tab_is_selected() @then('The Song tab is displayed as the default tab') @then('The screen should display Recommended Songs') def step_impl(context): context.my_favorites_screen.assert_recommended_songs_are_shown() @then('The My Favorites screen should be displayed in the selected language') def step_impl(context): (context.my_favorites_screen. verify_my_favorites_screen_is_localized(context)) @then('The screen should display Recommended Products') def step_impl(context): context.my_favorites_screen.assert_recommended_products_are_shown() @then('The screen should display Recommended Labels') def step_impl(context): if "sme" not in context.app_name: context.my_favorites_screen.assert_recommended_labels_are_shown() @given('The {category} tab in My Favorites has no existing favorites') def step_impl(context, category): if category == 'Labels' and 'sme' in context.app_name: return context.my_favorites_screen.clear_favorites(category) @then('All starred products should be displayed in My Favorites') def step_impl(context): context.my_favorites_screen.assert_starred_products_are_shown(context) @then('Only the product restored with Undo ' 'should be displayed in My Favorites') def step_impl(context): assert context.starred_product_names == [ context.recommended_starred_product_name ] context.my_favorites_screen.assert_starred_products_are_shown(context) @then('No favorite products should be displayed in My Favorites') def step_impl(context): context.my_favorites_screen.assert_no_favorite_products_are_shown() @then('All starred artists should be displayed in My Favorites') def step_impl(context): context.my_favorites_screen.assert_starred_artists_are_shown(context) @then('Only the artist restored with Undo should be displayed in My Favorites') def step_impl(context): assert context.starred_artist_names == [ context.first_starred_artist_name ] context.my_favorites_screen.assert_starred_artists_are_shown(context) @then('No favorite artists should be displayed in My Favorites') def step_impl(context): context.my_favorites_screen.assert_no_favorite_artists_are_shown() @then('The starred label should be displayed in My Favorites') def step_impl(context): context.my_favorites_screen.assert_starred_labels_are_shown(context) @then('No favorite labels should be displayed in My Favorites') def step_impl(context): context.my_favorites_screen.assert_no_favorite_labels_are_shown() # --- Charts Digest Screen --- @then('The Charts screen should be displayed') def step_impl(context): context.charts_digest_screen.assert_charts_digest_is_displayed() @then('The Charts screen should present the correct list of charts') def step_impl(context): context.charts_digest_screen.assert_charts_list_correct() @then("I should be navigated to the '{chart_name}' chart screen") def step_impl(context, chart_name): context.charts_digest_screen.verify_charts_screen_displayed() @then("The song list should be displayed for the '{country_option}' " "country filter by default") @then("The country filter should remain set to '{country_option}' " "after switching charts") def step_impl(context, country_option): context.charts_digest_screen.assert_country_filter_selected(country_option) @then('The songs filtered by brand are displayed in Charts') def step_impl(context): context.charts_digest_screen.assert_songs_filtered_by_brand() @then("The search results should contain '{search_term}' " "in either the song name or artist name") def step_impl(context, search_term): (context.charts_digest_screen. verify_search_results_contains_search_term(search_term)) @then('An empty state should be displayed') def step_impl(context): context.charts_digest_screen.assert_empty_state() @then('Songs should be sorted by position in ascending order') def step_impl(context): context.charts_digest_screen.assert_songs_sorted_by_position() @then('Songs with a blue dot should be displayed at the top') def step_impl(context): context.charts_digest_screen.assert_songs_sorted_by_blue_dot() @then('Songs with the highest positive trend ' 'should be displayed first in descending order') def step_impl(context): context.charts_digest_screen.assert_songs_sorted_by_positive_trend_desc() @then('Songs should be ordered by major moves: ' 'positive (high to low), zero, negative, then blue-dot songs') def step_impl(context): context.charts_digest_screen.assert_songs_sorted_by_major_moves() @then('All expected song attributes should be displayed for each track on ' 'non-Top 100 charts') def step_impl(context): (context.charts_digest_screen. assert_expected_song_attributes_for_non_top_100()) @then('All expected song attributes should be displayed for each track on ' 'Top 100 charts') def step_impl(context): context.charts_digest_screen.assert_expected_song_attributes_for_top_100() @then("A popup with information about the 'Daily Top 200' chart should appear") def step_impl(context): context.charts_digest_screen.verify_daily_top_200_popup_content() @then("A popup with information about the 'Weekly Top 200' " "chart should appear") def step_impl(context): context.charts_digest_screen.verify_weekly_top_200_popup_content() @then("A popup with information about the 'Daily Top 100' chart should appear") def step_impl(context): context.charts_digest_screen.verify_daily_top_100_popup_content() @then('The song list should retain its previous scroll position after ' 'returning from the track page') def step_impl(context): context.charts_digest_screen.verify_song_list_page_position(context) @then("I should see the 'No Results' message") @then("I should see the 'No Results' message while logged in as a client user") def step_impl(context): context.charts_digest_screen.verify_no_results_message() # --- Profile Screen --- @then('All expected labels and buttons should be present and correct') def step_impl(context): context.profile_screen.verify_expected_labels_and_buttons_present() @then('I should be navigated to the Privacy Policy website') def step_impl(context): context.profile_screen.verify_navigation_to_privacy_policy(context) @then('I should be navigated to the Terms and Conditions website') def step_impl(context): context.profile_screen.verify_navigation_to_terms_and_conditions(context) @then('I should return from the browser to the profile screen') def step_impl(context): context.profile_screen.verify_profile_screen_on_browser_exit(context)