Skip to content

Commit a0b8117

Browse files
author
Obada Haddad
committed
change test order
1 parent 2150fe7 commit a0b8117

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

playwrightPython/test_submission.py

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,20 @@ def wait_for_finished(page, time_out):
2121
return False
2222

2323

24-
def test_submission_basic(page: Page) -> None:
25-
page.set_default_timeout(300000)
24+
def test_submission_v2_multiTaskFactSheet(page: Page) -> None:
2625
page.goto("/")
2726
page.get_by_role("link", name=" Benchmarks/Competitions").click()
2827
page.get_by_role("link", name=" Upload").click()
2928
with page.expect_file_chooser() as fc_info:
3029
page.get_by_role("button", name="").click()
3130
file_chooser = fc_info.value
32-
file_chooser.set_files("test_files/competitions/competition.zip")
31+
file_chooser.set_files("test_files/competitions/competition_v2_multi_task_fact_sheet.zip")
3332
page.get_by_role("link", name="View").click()
3433
page.get_by_text("My Submissions").click()
34+
page.locator("input[name=\"text\"]").click()
35+
page.locator("input[name=\"text\"]").fill("test")
36+
page.locator("input[name=\"text_required\"]").click()
37+
page.locator("input[name=\"text_required\"]").fill("test")
3538
with page.expect_file_chooser() as fc_info:
3639
page.get_by_role("button", name="").click()
3740
file_chooser = fc_info.value
@@ -40,50 +43,51 @@ def test_submission_basic(page: Page) -> None:
4043
expect(page.locator('.ui.indicating')).not_to_be_visible()
4144
# Reload the page until the finished status is visible or the count is reached
4245
count = 0
43-
while not wait_for_finished(page, 5000) and count < 5:
46+
while not wait_for_finished(page, 10000) and count < 5:
4447
page.reload()
4548
count += 1
4649
expect(page.get_by_role("cell", name="Finished")).to_be_visible(timeout=1)
47-
4850

49-
def test_submission_irisV15_code(page: Page) -> None:
51+
52+
def test_submission_v2_multiTask(page: Page) -> None:
5053
page.goto("/")
5154
page.get_by_role("link", name=" Benchmarks/Competitions").click()
5255
page.get_by_role("link", name=" Upload").click()
5356
with page.expect_file_chooser() as fc_info:
5457
page.get_by_role("button", name="").click()
5558
file_chooser = fc_info.value
56-
file_chooser.set_files("test_files/competitions/competition_15_iris.zip")
59+
file_chooser.set_files("test_files/competitions/competition_v2_multi_task.zip")
5760
page.get_by_role("link", name="View").click()
5861
page.get_by_text("My Submissions").click()
5962
with page.expect_file_chooser() as fc_info:
6063
page.get_by_role("button", name="").click()
6164
file_chooser = fc_info.value
62-
file_chooser.set_files("test_files/submissions/submission_15_iris_code.zip")
65+
file_chooser.set_files("test_files/submissions/submission.zip")
6366
expect(page.locator('.ui.indicating')).to_be_visible()
6467
expect(page.locator('.ui.indicating')).not_to_be_visible()
6568
# Reload the page until the finished status is visible or the count is reached
6669
count = 0
67-
while not wait_for_finished(page, 5000) and count < 5:
70+
while not wait_for_finished(page, 10000) and count < 5:
6871
page.reload()
6972
count += 1
7073
expect(page.get_by_role("cell", name="Finished")).to_be_visible(timeout=1)
7174

7275

73-
def test_submission_irisV15_result(page: Page) -> None:
76+
def test_submission_basic(page: Page) -> None:
77+
page.set_default_timeout(300000)
7478
page.goto("/")
7579
page.get_by_role("link", name=" Benchmarks/Competitions").click()
7680
page.get_by_role("link", name=" Upload").click()
7781
with page.expect_file_chooser() as fc_info:
7882
page.get_by_role("button", name="").click()
7983
file_chooser = fc_info.value
80-
file_chooser.set_files("test_files/competitions/competition_15_iris.zip")
84+
file_chooser.set_files("test_files/competitions/competition.zip")
8185
page.get_by_role("link", name="View").click()
8286
page.get_by_text("My Submissions").click()
8387
with page.expect_file_chooser() as fc_info:
8488
page.get_by_role("button", name="").click()
8589
file_chooser = fc_info.value
86-
file_chooser.set_files("test_files/submissions/submission_15_iris_result.zip")
90+
file_chooser.set_files("test_files/submissions/submission.zip")
8791
expect(page.locator('.ui.indicating')).to_be_visible()
8892
expect(page.locator('.ui.indicating')).not_to_be_visible()
8993
# Reload the page until the finished status is visible or the count is reached
@@ -94,20 +98,20 @@ def test_submission_irisV15_result(page: Page) -> None:
9498
expect(page.get_by_role("cell", name="Finished")).to_be_visible(timeout=1)
9599

96100

97-
def test_submission_v15(page: Page) -> None:
101+
def test_submission_irisV15_code(page: Page) -> None:
98102
page.goto("/")
99103
page.get_by_role("link", name=" Benchmarks/Competitions").click()
100104
page.get_by_role("link", name=" Upload").click()
101105
with page.expect_file_chooser() as fc_info:
102106
page.get_by_role("button", name="").click()
103107
file_chooser = fc_info.value
104-
file_chooser.set_files("test_files/competitions/competition_15.zip")
108+
file_chooser.set_files("test_files/competitions/competition_15_iris.zip")
105109
page.get_by_role("link", name="View").click()
106110
page.get_by_text("My Submissions").click()
107111
with page.expect_file_chooser() as fc_info:
108112
page.get_by_role("button", name="").click()
109113
file_chooser = fc_info.value
110-
file_chooser.set_files("test_files/submissions/submission_15.zip")
114+
file_chooser.set_files("test_files/submissions/submission_15_iris_code.zip")
111115
expect(page.locator('.ui.indicating')).to_be_visible()
112116
expect(page.locator('.ui.indicating')).not_to_be_visible()
113117
# Reload the page until the finished status is visible or the count is reached
@@ -118,20 +122,20 @@ def test_submission_v15(page: Page) -> None:
118122
expect(page.get_by_role("cell", name="Finished")).to_be_visible(timeout=1)
119123

120124

121-
def test_submission_v18(page: Page) -> None:
125+
def test_submission_irisV15_result(page: Page) -> None:
122126
page.goto("/")
123127
page.get_by_role("link", name=" Benchmarks/Competitions").click()
124128
page.get_by_role("link", name=" Upload").click()
125129
with page.expect_file_chooser() as fc_info:
126130
page.get_by_role("button", name="").click()
127131
file_chooser = fc_info.value
128-
file_chooser.set_files("test_files/competitions/competition_18.zip")
132+
file_chooser.set_files("test_files/competitions/competition_15_iris.zip")
129133
page.get_by_role("link", name="View").click()
130134
page.get_by_text("My Submissions").click()
131135
with page.expect_file_chooser() as fc_info:
132136
page.get_by_role("button", name="").click()
133137
file_chooser = fc_info.value
134-
file_chooser.set_files("test_files/submissions/submission_18.zip")
138+
file_chooser.set_files("test_files/submissions/submission_15_iris_result.zip")
135139
expect(page.locator('.ui.indicating')).to_be_visible()
136140
expect(page.locator('.ui.indicating')).not_to_be_visible()
137141
# Reload the page until the finished status is visible or the count is reached
@@ -142,53 +146,49 @@ def test_submission_v18(page: Page) -> None:
142146
expect(page.get_by_role("cell", name="Finished")).to_be_visible(timeout=1)
143147

144148

145-
def test_submission_v2_multiTaskFactSheet(page: Page) -> None:
149+
def test_submission_v15(page: Page) -> None:
146150
page.goto("/")
147151
page.get_by_role("link", name=" Benchmarks/Competitions").click()
148152
page.get_by_role("link", name=" Upload").click()
149153
with page.expect_file_chooser() as fc_info:
150154
page.get_by_role("button", name="").click()
151155
file_chooser = fc_info.value
152-
file_chooser.set_files("test_files/competitions/competition_v2_multi_task_fact_sheet.zip")
156+
file_chooser.set_files("test_files/competitions/competition_15.zip")
153157
page.get_by_role("link", name="View").click()
154158
page.get_by_text("My Submissions").click()
155-
page.locator("input[name=\"text\"]").click()
156-
page.locator("input[name=\"text\"]").fill("test")
157-
page.locator("input[name=\"text_required\"]").click()
158-
page.locator("input[name=\"text_required\"]").fill("test")
159159
with page.expect_file_chooser() as fc_info:
160160
page.get_by_role("button", name="").click()
161161
file_chooser = fc_info.value
162-
file_chooser.set_files("test_files/submissions/submission.zip")
162+
file_chooser.set_files("test_files/submissions/submission_15.zip")
163163
expect(page.locator('.ui.indicating')).to_be_visible()
164164
expect(page.locator('.ui.indicating')).not_to_be_visible()
165165
# Reload the page until the finished status is visible or the count is reached
166166
count = 0
167-
while not wait_for_finished(page, 10000) and count < 5:
167+
while not wait_for_finished(page, 5000) and count < 5:
168168
page.reload()
169169
count += 1
170170
expect(page.get_by_role("cell", name="Finished")).to_be_visible(timeout=1)
171171

172172

173-
def test_submission_v2_multiTask(page: Page) -> None:
173+
def test_submission_v18(page: Page) -> None:
174174
page.goto("/")
175175
page.get_by_role("link", name=" Benchmarks/Competitions").click()
176176
page.get_by_role("link", name=" Upload").click()
177177
with page.expect_file_chooser() as fc_info:
178178
page.get_by_role("button", name="").click()
179179
file_chooser = fc_info.value
180-
file_chooser.set_files("test_files/competitions/competition_v2_multi_task.zip")
180+
file_chooser.set_files("test_files/competitions/competition_18.zip")
181181
page.get_by_role("link", name="View").click()
182182
page.get_by_text("My Submissions").click()
183183
with page.expect_file_chooser() as fc_info:
184184
page.get_by_role("button", name="").click()
185185
file_chooser = fc_info.value
186-
file_chooser.set_files("test_files/submissions/submission.zip")
186+
file_chooser.set_files("test_files/submissions/submission_18.zip")
187187
expect(page.locator('.ui.indicating')).to_be_visible()
188188
expect(page.locator('.ui.indicating')).not_to_be_visible()
189189
# Reload the page until the finished status is visible or the count is reached
190190
count = 0
191-
while not wait_for_finished(page, 10000) and count < 5:
191+
while not wait_for_finished(page, 5000) and count < 5:
192192
page.reload()
193193
count += 1
194194
expect(page.get_by_role("cell", name="Finished")).to_be_visible(timeout=1)

0 commit comments

Comments
 (0)