@@ -16,39 +16,39 @@ def test_search_flight_general(self):
16
16
search_flight .open_flights_tab ()
17
17
search_flight .set_trip_type ("One Way" )
18
18
search_flight .set_cabin_class ("First" ) # Cabin class: Economy, First, Business
19
- search_flight .set_loc_from ("LUZ " )
20
- search_flight .set_loc_to ("OSL " )
21
- search_flight .set_start_date ("2019" , "Dec" , "14 " )
19
+ search_flight .set_loc_from ("LIS " )
20
+ search_flight .set_loc_to ("JFK " )
21
+ search_flight .set_start_date ("2019" , "Dec" , "31 " )
22
22
search_flight .set_adults_number (2 )
23
23
search_flight .set_kids_number (4 )
24
24
search_flight .set_infants_number (1 )
25
25
search_flight .search_perform ()
26
26
27
- @allure .title ("Search flight test: from Warsaw to Aruba" )
28
- @allure .description ("This is test of searching flight from Warsaw to Aruba and return" )
29
- def test_search_flight_round_trip (self ):
27
+ @allure .title ("Search flight test: one way" )
28
+ @allure .description ("This is test of searching one way flight" )
29
+ @pytest .mark .parametrize ("data" , XlsxReader .get_xlsx_flights_data ())
30
+ def test_search_flight_one_way (self , data ):
30
31
search_flight = SearchFlightsForm (self .driver )
31
32
search_flight .open_page ()
32
33
search_flight .open_flights_tab ()
33
- search_flight .set_round_trip ()
34
- search_flight .set_cabin_class ("Economy" ) # Cabin class: Economy, First, Business
35
- search_flight .set_loc_from ("WAW" )
36
- search_flight .set_loc_to ("AUA" )
37
- search_flight .set_start_date ("2020" , "Nov" , "27" )
38
- search_flight .set_end_date ("2020" , "Dec" , "30" )
39
- search_flight .set_adults_number (1 )
40
- search_flight .set_kids_number (0 )
41
- search_flight .set_infants_number (0 )
34
+ search_flight .set_one_way ()
35
+ search_flight .set_cabin_class (data .cabin_class )
36
+ search_flight .set_loc_from (data .location_from )
37
+ search_flight .set_loc_to (data .location_to )
38
+ search_flight .set_start_date (data .start_year , data .start_month , data .start_day )
39
+ search_flight .set_adults_number (data .adults_num )
40
+ search_flight .set_kids_number (data .kids_num )
41
+ search_flight .set_infants_number (data .infants_num )
42
42
search_flight .search_perform ()
43
43
44
- @allure .title ("Search flight data-driven tests " )
45
- @allure .description ("This is data-driven tests of searching flight" )
44
+ @allure .title ("Search flight test: round trip " )
45
+ @allure .description ("This is test of searching round trip flight" )
46
46
@pytest .mark .parametrize ("data" , XlsxReader .get_xlsx_flights_data ())
47
- def test_search_flight_data_driven (self , data ):
47
+ def test_search_flight_round_trip (self , data ):
48
48
search_flight = SearchFlightsForm (self .driver )
49
49
search_flight .open_page ()
50
50
search_flight .open_flights_tab ()
51
- search_flight .set_trip_type ( data . trip_type )
51
+ search_flight .set_round_trip ( )
52
52
search_flight .set_cabin_class (data .cabin_class )
53
53
search_flight .set_loc_from (data .location_from )
54
54
search_flight .set_loc_to (data .location_to )
0 commit comments