File tree Expand file tree Collapse file tree 4 files changed +33
-33
lines changed Expand file tree Collapse file tree 4 files changed +33
-33
lines changed Original file line number Diff line number Diff line change 66CONFIG_PATH = f'{ ROOT_DIR } /app_conf/testing.ini'
77AUDIO_FILE = f"{ ROOT_DIR } /simple_phrases_russian.wav"
88
9- @pytest .fixture (scope = "class " )
10- def selenium_session (request ):
9+ @pytest .fixture (scope = "module " )
10+ def selenium_session ():
1111 Config .init_config (CONFIG_PATH )
1212 session = SeleniumSession (Config .c , chrome_options (AUDIO_FILE ))
1313
14- request .cls .selenium_session = session
15-
1614 yield session
1715
1816 session .end_session ()
Original file line number Diff line number Diff line change 1+ from time import sleep
2+
3+ from selenium_session import ROOT_DIR
4+ from training_session import Training
5+
6+ PRESENTATION_FILE = f"{ ROOT_DIR } /test_data/test_presentation_file_0.pdf"
7+ ESTIMATED_PROCESSING_TIME_IN_SECONDS = 100
8+
9+ class SimpleTraining :
10+ def test_presentation_upload (self , selenium_session ):
11+ Training (selenium_session ).upload_presentation (PRESENTATION_FILE )
12+
13+ def test_record_preparation (self , selenium_session ):
14+ Training (selenium_session ).prepare_record ()
15+ sleep (5 )
16+
17+ def test_button_next (self , selenium_session ):
18+ Training (selenium_session ).next_slide ()
19+ sleep (5 )
20+
21+ def test_training_session_end (self , selenium_session ):
22+ Training (selenium_session ).end_training ()
23+ sleep (5 )
24+
25+ def test_training_feedback (self , selenium_session ):
26+ got_feedback = Training (selenium_session ).wait_for_feedback (ESTIMATED_PROCESSING_TIME_IN_SECONDS )
27+ assert got_feedback , f"Проверка тренировки заняла более { ESTIMATED_PROCESSING_TIME_IN_SECONDS } секунд"
Original file line number Diff line number Diff line change 1+ from simple_training import SimpleTraining
2+
3+ class TestMain (SimpleTraining ):
4+ pass
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments