Idea: Aggregate actions by user role e.g. traveler, host, admin and name the Actions objects accordingly. Action methods should be named as verbs performed by 3rd person.
Pros: More readable test method.
Cons: Actions class gets messy as the most actions belong to the main user role
Conclusion: Search for a new principle of actions aggregation
public class BookingTest {
@Test
public void propertySearch() {
traveler.opens_home_page();
traveler.closeCookieWarning();
traveler.sets_currency("€");
traveler.sets_language("English (US)");
traveler.sets_destination("Málaga, Andalucía, Spain");
traveler.sets_check_in_month_and_day("current", "last");
traveler.sets_check_out_month_and_day("next", "first");
traveler.sets_adults(1);
traveler.sets_children_and_years(5);
traveler.sets_rooms(2);
traveler.checks_im_traveling_for_work(true);
traveler.clicks_search_button();
expect.search_result_should_contain_item_with("200", "8.0");
}
}