-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tests: Fix urls and tab names (#2293)
* Fix urls and tab names * Fix more tabs in tests * Fix more selenium tests * use API 2 to edit email and tilde groups (#2308) * use API 2 to edit email and tilde groups * use API 2 client * use API 2 client * add mandatory values for API 2 --------- Co-authored-by: Melisa Bok <[email protected]>
- Loading branch information
Showing
13 changed files
with
58 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -182,18 +182,18 @@ def conference(self, client, helpers): | |
conference.set_program_chairs(['[email protected]']) | ||
return conference | ||
|
||
def test_create_conference(self, client, conference, helpers): | ||
def test_create_conference(self, client, conference, helpers, openreview_client): | ||
|
||
helpers.create_user('[email protected]', 'Program', 'ICLRChair') | ||
helpers.create_user('[email protected]', 'ReviewerOne', 'ICLR', ['[email protected]']) | ||
## confirm alternate email | ||
client.add_members_to_group('~ReviewerOne_ICLR1', '[email protected]') | ||
client.add_members_to_group('[email protected]', '~ReviewerOne_ICLR1') | ||
openreview_client.add_members_to_group('~ReviewerOne_ICLR1', '[email protected]') | ||
openreview_client.add_members_to_group('[email protected]', '~ReviewerOne_ICLR1') | ||
helpers.create_user('[email protected]', 'ReviewerFive', 'ICLR') | ||
helpers.create_user('[email protected]', 'ReviewerSix', 'ICLR', ['[email protected]']) | ||
## confirm alternate email | ||
client.add_members_to_group('~ReviewerSix_ICLR1', '[email protected]') | ||
client.add_members_to_group('[email protected]', '~ReviewerSix_ICLR1') | ||
openreview_client.add_members_to_group('~ReviewerSix_ICLR1', '[email protected]') | ||
openreview_client.add_members_to_group('[email protected]', '~ReviewerSix_ICLR1') | ||
|
||
pc_client = openreview.Client(username='[email protected]', password=helpers.strong_password) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -652,8 +652,8 @@ def test_registrations(self, client, openreview_client, helpers, test_client, re | |
tabs = selenium.find_element(By.CLASS_NAME, 'tabs-container') | ||
assert tabs | ||
assert tabs.find_element(By.LINK_TEXT, "Submission Status") | ||
assert tabs.find_element(By.LINK_TEXT, "Area Chairs Status") | ||
assert tabs.find_element(By.LINK_TEXT, "Senior Area Chairs Tasks") | ||
assert tabs.find_element(By.LINK_TEXT, "Area Chair Status") | ||
assert tabs.find_element(By.LINK_TEXT, "Senior Area Chair Tasks") | ||
|
||
registration_forum = sac_client.get_notes(invitation='ICML.cc/2023/Conference/Senior_Area_Chairs/-/Registration_Form') | ||
assert len(registration_forum) == 1 | ||
|
@@ -2322,7 +2322,7 @@ def test_reviewer_reassignment(self, client, openreview_client, helpers, seleniu | |
|
||
# Test referrer in SAC edge browser URL | ||
sac_client = openreview.api.OpenReviewClient(username = '[email protected]', password=helpers.strong_password) | ||
request_page(selenium, "http://localhost:3030/group?id=ICML.cc/2023/Conference/Senior_Area_Chairs#Area_Chairs-status", sac_client.token, wait_for_element='tabs-container') | ||
request_page(selenium, "http://localhost:3030/group?id=ICML.cc/2023/Conference/Senior_Area_Chairs#area-chair-status", sac_client.token, wait_for_element='tabs-container') | ||
link = selenium.find_element(By.CLASS_NAME, 'note').find_element(By.LINK_TEXT, 'Modify Reviewers Assignments') | ||
assert link | ||
assert link.get_attribute("href") == 'http://localhost:3030/edges/browse?start=ICML.cc/2023/Conference/Area_Chairs/-/Assignment,tail:~AC_ICMLOne1&traverse=ICML.cc/2023/Conference/Reviewers/-/Assignment&edit=ICML.cc/2023/Conference/Reviewers/-/Invite_Assignment&browse=ICML.cc/2023/Conference/Reviewers/-/Affinity_Score;ICML.cc/2023/Conference/Reviewers/-/Bid;ICML.cc/2023/Conference/Reviewers/-/Custom_Max_Papers,head:ignore&hide=ICML.cc/2023/Conference/Reviewers/-/Conflict&maxColumns=2&preferredEmailInvitationId=ICML.cc/2023/Conference/-/Preferred_Emails&version=2&referrer=[Senior%20Area%20Chairs%20Console](/group?id=ICML.cc/2023/Conference/Senior_Area_Chairs)' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1587,7 +1587,7 @@ def test_remove_name_and_update_relations(self, openreview_client, helpers): | |
assert 'username' in profile.content['names'][0] | ||
assert profile.content['names'][0]['username'] == '~Juan_Alternate_Last1' | ||
|
||
john_client = openreview.Client(username='[email protected]', password=helpers.strong_password) | ||
john_client = openreview.api.OpenReviewClient(username='[email protected]', password=helpers.strong_password) | ||
profile = john_client.get_profile() | ||
assert len(profile.content['relations']) == 2 | ||
assert profile.content['relations'][1]['username'] == '~Juan_Alternate_Last1' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -234,12 +234,12 @@ def test_post_submissions(self, client, test_client, peter_client, selenium, req | |
assert allsubmissions_tab | ||
assert len(allsubmissions_tab.find_element(By.CLASS_NAME, 'submissions-list').find_elements(By.TAG_NAME, 'li')) == 2 | ||
|
||
request_page(selenium, "http://localhost:3030/group?id=NIPS.cc/2018/Workshop/MLITS/Authors", test_client.token, wait_for_element='your-submissions') | ||
request_page(selenium, "http://localhost:3030/group?id=NIPS.cc/2018/Workshop/MLITS/Authors", test_client.token, wait_for_element='your-papers') | ||
tabs = selenium.find_element(By.CLASS_NAME, 'tabs-container') | ||
assert tabs | ||
assert tabs.find_element(By.ID, 'author-tasks') | ||
assert tabs.find_element(By.ID, 'your-submissions') | ||
papers = tabs.find_element(By.ID, 'your-submissions').find_element(By.CLASS_NAME, 'console-table') | ||
assert tabs.find_element(By.ID, 'your-papers') | ||
papers = tabs.find_element(By.ID, 'your-papers').find_element(By.CLASS_NAME, 'console-table') | ||
assert len(papers.find_elements(By.TAG_NAME, 'tr')) == 2 | ||
|
||
# Guest user | ||
|
@@ -280,12 +280,12 @@ def test_post_submissions(self, client, test_client, peter_client, selenium, req | |
assert allsubmissions_tab | ||
assert len(allsubmissions_tab.find_element(By.CLASS_NAME, 'submissions-list').find_elements(By.TAG_NAME, 'li')) == 2 | ||
|
||
request_page(selenium, "http://localhost:3030/group?id=NIPS.cc/2018/Workshop/MLITS/Authors", peter_client.token, wait_for_element='your-submissions') | ||
request_page(selenium, "http://localhost:3030/group?id=NIPS.cc/2018/Workshop/MLITS/Authors", peter_client.token, wait_for_element='your-papers') | ||
tabs = selenium.find_element(By.CLASS_NAME, 'tabs-container') | ||
assert tabs | ||
assert tabs.find_element(By.ID, 'author-tasks') | ||
assert tabs.find_element(By.ID, 'your-submissions') | ||
papers = tabs.find_element(By.ID, 'your-submissions').find_element(By.CLASS_NAME, 'console-table') | ||
assert tabs.find_element(By.ID, 'your-papers') | ||
papers = tabs.find_element(By.ID, 'your-papers').find_element(By.CLASS_NAME, 'console-table') | ||
assert len(papers.find_elements(By.TAG_NAME, 'tr')) == 2 | ||
|
||
def test_close_submission(self, client, test_client, selenium, request_page): | ||
|
@@ -615,12 +615,12 @@ def test_consoles(self, client, test_client, selenium, request_page, helpers): | |
console = tabs.find_element(By.ID, 'your-consoles').find_elements(By.TAG_NAME, 'ul')[0] | ||
assert 'Author Console' == console.find_element(By.TAG_NAME, 'a').text | ||
|
||
request_page(selenium, "http://localhost:3030/group?id=NIPS.cc/2018/Workshop/MLITS/Authors", test_client.token, wait_for_element='your-submissions') | ||
request_page(selenium, "http://localhost:3030/group?id=NIPS.cc/2018/Workshop/MLITS/Authors", test_client.token, wait_for_element='your-papers') | ||
tabs = selenium.find_element(By.CLASS_NAME, 'tabs-container') | ||
assert tabs | ||
assert tabs.find_element(By.ID, 'author-tasks') | ||
assert tabs.find_element(By.ID, 'your-submissions') | ||
papers = tabs.find_element(By.ID, 'your-submissions').find_element(By.CLASS_NAME, 'console-table') | ||
assert tabs.find_element(By.ID, 'your-papers') | ||
papers = tabs.find_element(By.ID, 'your-papers').find_element(By.CLASS_NAME, 'console-table') | ||
assert len(papers.find_elements(By.TAG_NAME, 'tr')) == 2 | ||
|
||
conference.set_authorpage_header({ | ||
|
@@ -629,7 +629,7 @@ def test_consoles(self, client, test_client, selenium, request_page, helpers): | |
'schedule': 'This is a schedule' | ||
}) | ||
|
||
request_page(selenium, "http://localhost:3030/group?id=NIPS.cc/2018/Workshop/MLITS/Authors", test_client.token, wait_for_element='your-submissions') | ||
request_page(selenium, "http://localhost:3030/group?id=NIPS.cc/2018/Workshop/MLITS/Authors", test_client.token, wait_for_element='your-papers') | ||
|
||
header = selenium.find_element(By.ID, 'header') | ||
assert header | ||
|
@@ -640,13 +640,13 @@ def test_consoles(self, client, test_client, selenium, request_page, helpers): | |
tabs = selenium.find_element(By.CLASS_NAME, 'tabs-container') | ||
assert tabs | ||
assert tabs.find_element(By.ID, 'author-tasks') | ||
assert tabs.find_element(By.ID, 'your-submissions') | ||
papers = tabs.find_element(By.ID, 'your-submissions').find_element(By.CLASS_NAME, 'console-table') | ||
assert tabs.find_element(By.ID, 'your-papers') | ||
papers = tabs.find_element(By.ID, 'your-papers').find_element(By.CLASS_NAME, 'console-table') | ||
assert len(papers.find_elements(By.TAG_NAME, 'tr')) == 2 | ||
|
||
# Reviewer user | ||
reviewer_client = openreview.Client(baseurl = 'http://localhost:3000', username='[email protected]', password=helpers.strong_password) | ||
request_page(selenium, "http://localhost:3030/group?id=NIPS.cc/2018/Workshop/MLITS", reviewer_client.token, wait_for_element='your-submissions') | ||
request_page(selenium, "http://localhost:3030/group?id=NIPS.cc/2018/Workshop/MLITS", reviewer_client.token, wait_for_element='your-papers') | ||
notes_panel = selenium.find_element(By.ID, 'notes') | ||
assert notes_panel | ||
tabs = notes_panel.find_element(By.CLASS_NAME, 'tabs-container') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.