@@ -63,13 +63,21 @@ def test_manual_competition_creation(page: Page):
6363 page .get_by_role ("link" , name = " Benchmarks/Competitions" ).click ()
6464 page .get_by_role ("link" , name = " Create" ).click ()
6565 page .get_by_role ("textbox" ).nth (1 ).click ()
66- page .get_by_role ("textbox" ).nth (1 ).fill ("Test" )
66+ page .get_by_role ("textbox" ).nth (1 ).fill ("Test Title " )
6767 with page .expect_file_chooser () as fc_info :
6868 page .get_by_role ("button" , name = "" ).click ()
6969 file_chooser = fc_info .value
7070 file_chooser .set_files ("test_files/competition/test_logo.png" )
7171 page .locator (".CodeMirror-scroll" ).first .click ()
72- page .get_by_role ("application" ).get_by_role ("textbox" ).fill ("on" )
72+ page .get_by_role ("application" ).get_by_role ("textbox" ).fill ("Test Description " )
73+ page .get_by_role ("textbox" , name = "Example: $1000 for the top" ).click ()
74+ page .get_by_role ("textbox" , name = "Example: $1000 for the top" ).fill ("1000€" )
75+ page .get_by_role ("textbox" , name = "Example: email@example.com" ).click ()
76+ page .get_by_role ("textbox" , name = "Example: email@example.com" ).fill ("organizer@email.com" )
77+ page .get_by_text ("Auto-run submissions" ).click ()
78+ page .get_by_text ("Enable Competition Forum" ).click ()
79+ page .get_by_text ("Make Programs Available" ).click ()
80+ page .get_by_text ("Make Input Data Available" ).click ()
7381 page .get_by_role ("textbox" , name = "Example: codalab/codalab-" ).click ()
7482 page .get_by_role ("textbox" , name = "Example: codalab/codalab-" ).fill ("codalab/codalab-legacy:py37" )
7583 page .get_by_text ("Participation" ).click ()
@@ -94,15 +102,22 @@ def test_manual_competition_creation(page: Page):
94102 page .locator ("input[name=\" end_date\" ]" ).click ()
95103 page .locator ("input[name=\" end_date\" ]" ).fill ("" )
96104 page .locator ("div:nth-child(7) > .EasyMDEContainer > .CodeMirror > .CodeMirror-scroll" ).click ()
97- page .locator (".CodeMirror.cm-s-easymde.CodeMirror-wrap.CodeMirror-focused > div > textarea" ).fill ("Phase " )
105+ page .locator (".CodeMirror.cm-s-easymde.CodeMirror-wrap.CodeMirror-focused > div > textarea" ).fill ("This is a phase Test " )
98106 page .locator (".ui.search.selection.dropdown.multiple" ).first .click ()
99107 page .locator (".ui.search.selection.dropdown.multiple > .search" ).first .fill (str (titleNum ) + "Playwright Task" )
100108 page .get_by_text (str (titleNum ) + "Playwright Task" ).nth (1 ).click ()
109+ page .locator (".title > .dropdown" ).click ()
110+ page .locator ("input[name=\" execution_time_limit\" ]" ).click ()
111+ page .locator ("input[name=\" execution_time_limit\" ]" ).fill ("100" )
112+ page .locator ("input[name=\" max_submissions_per_day\" ]" ).click ()
113+ page .locator ("input[name=\" max_submissions_per_day\" ]" ).fill ("2" )
114+ page .locator ("input[name=\" max_submissions_per_person\" ]" ).click ()
115+ page .locator ("input[name=\" max_submissions_per_person\" ]" ).fill ("3" )
101116 page .get_by_text ("Save" ).nth (3 ).click ()
102117 page .get_by_text ("Leaderboard" , exact = True ).click ()
103118 page .get_by_role ("button" , name = " Add leaderboard" ).click ()
104119 page .locator ("input[name=\" title\" ]" ).click ()
105- page .locator ("input[name=\" title\" ]" ).fill ("Test title LEaderboard " )
120+ page .locator ("input[name=\" title\" ]" ).fill ("Test title Leaderboard " )
106121 page .locator ("input[name=\" key\" ]" ).click ()
107122 page .locator ("input[name=\" key\" ]" ).fill ("Test Key" )
108123 page .locator (".ui.plus" ).click ()
@@ -114,7 +129,16 @@ def test_manual_competition_creation(page: Page):
114129 page .locator ("input[name=\" column_key_0\" ]" ).click ()
115130 page .get_by_text ("Save" ).nth (4 ).click ()
116131 page .get_by_role ("button" , name = "Save" ).click ()
117- expect (page .get_by_text ("Test" , exact = True )).to_be_visible ()
118132 expect (page .get_by_text ("Test Content" )).to_be_visible ()
119-
120- # TODO Verify a few more items from the created competition
133+ expect (page .locator (".reward-container" )).to_be_visible ()
134+ expect (page .get_by_text ("1000€" )).to_be_visible ()
135+ page .get_by_text ("Terms" , exact = True ).click ()
136+ expect (page .get_by_text ("Test Terms" )).to_be_visible ()
137+ page .get_by_text ("Phases" ).click ()
138+ expect (page .locator ("comp-tabs" )).to_contain_text (str (titleNum ) + "Playwright Task" )
139+ expect (page .get_by_text ("This is a phase Test" )).to_be_visible ()
140+ page .get_by_text ("My Submissions" ).click ()
141+ expect (page .get_by_text ("out of 2" )).to_be_visible ()
142+ expect (page .get_by_text ("out of 3" )).to_be_visible ()
143+ page .get_by_role ("link" , name = "Forum" ).click ()
144+ expect (page .get_by_role ("heading" , name = "Test Title Forum" )).to_be_visible ()
0 commit comments