Skip to content

Commit 4babe26

Browse files
committed
Update unit test
1 parent 33b9dc2 commit 4babe26

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

tests/phpunit/modules/core/output_modules.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,8 @@ public function test_content_section_end() {
984984
public function test_modals() {
985985
$test = new Output_Test('modals', 'core');
986986
$res = $test->run();
987-
$this->assertEquals(array('<div class="modal fade" id="shareFolderModal" tabindex="-1" aria-labelledby="shareFolderModalLabel" aria-hidden="true"><div class="modal-dialog modal-lg"><div class="modal-content"><div class="modal-header"><h5 class="modal-title" id="shareFolderModalLabel">Edit Permissions</h5><button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button></div><div class="modal-body"><div class="row"><div class="col-lg-8 col-md-12"><div id="loadingSpinner" class="text-center"><div class="spinner-border text-primary" role="status"><span class="visually-hidden">Loading...</span></div></div><table class="table table-striped" id="permissionTable" style="display:none;"><thead><tr><th>User</th><th>Permissions</th><th>Actions</th></tr></thead><tbody></tbody></table></div><div class="col-lg-4 col-md-12"><form id="shareForm" action="" method="POST"><input type="hidden" name="server_id" id="server_id" value=""><input type="hidden" name="folder_uid" id="folder_uid" value=""><input type="hidden" name="folder" id="folder" value=""><div class="mb-3 row"><div class="col-12"><label class="form-label">Identifier</label><div><input type="radio" name="identifier" value="user" id="identifierUser" checked><label for="identifierUser">User:</label><input type="text" class="form-control d-inline-block" id="email" name="email" required placeholder="Enter email"></div><div><input type="radio" name="identifier" value="all" id="identifierAll"><label for="identifierAll">All users (anyone)</label></div><div><input type="radio" name="identifier" value="guests" id="identifierGuests"><label for="identifierGuests">Guests (anonymous)</label></div></div></div><div class="mb-3 row"><div class="col-12"><label class="form-label">Access Rights</label><div><input type="checkbox" name="access_read" id="accessRead" checked><label for="accessRead">Read</label></div><div><input type="checkbox" name="access_write" id="accessWrite"><label for="accessWrite">Write</label></div><div><input type="checkbox" name="access_delete" id="accessDelete"><label for="accessDelete">Delete</label></div><div><input type="checkbox" name="access_other" id="accessOther"><label for="accessOther">Other</label></div></div></div><div class="modal-footer"><button type="submit" class="btn btn-primary">Save</button><button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button></div></form></div></div></div></div></div></div>'), $res->output_response);
987+
$expected = '<div class="modal fade" id="shareFolderModal" tabindex="-1" aria-labelledby="shareFolderModalLabel" aria-hidden="true"><div class="modal-dialog modal-lg"><div class="modal-content"><div class="modal-header"><h5 class="modal-title" id="shareFolderModalLabel">Edit Permissions</h5><button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button></div><div class="modal-body"><div class="row"><div class="col-lg-8 col-md-12"><div id="loadingSpinner" class="text-center"><div class="spinner-border text-primary" role="status"><span class="visually-hidden">Loading...</span></div></div><table class="table table-striped" id="permissionTable" style="display:none;"><thead><tr><th>User</th><th>Permissions</th><th>Actions</th></tr></thead><tbody></tbody></table></div><div class="col-lg-4 col-md-12"><form id="shareForm" action="" method="POST"><input type="hidden" name="server_id" id="server_id" value=""><input type="hidden" name="folder_uid" id="folder_uid" value=""><input type="hidden" name="folder" id="folder" value=""><div class="mb-3 row"><div class="col-12"><label class="form-label">Identifier</label><div><input type="radio" name="identifier" value="user" id="identifierUser" checked><label for="identifierUser">User:</label><input type="text" class="form-control d-inline-block" id="email" name="email" required placeholder="Enter email"></div><div><input type="radio" name="identifier" value="all" id="identifierAll"><label for="identifierAll">All users (anyone)</label></div><div><input type="radio" name="identifier" value="guests" id="identifierGuests"><label for="identifierGuests">Guests (anonymous)</label></div></div></div><div class="mb-3 row"><div class="col-12"><label class="form-label">Access Rights</label><div><input type="checkbox" name="access_read" id="accessRead" checked><label for="accessRead">Read</label></div><div><input type="checkbox" name="access_write" id="accessWrite"><label for="accessWrite">Write</label></div><div><input type="checkbox" name="access_delete" id="accessDelete"><label for="accessDelete">Delete</label></div><div><input type="checkbox" name="access_other" id="accessOther"><label for="accessOther">Other</label></div></div></div><div class="modal-footer"><button type="submit" class="btn btn-primary">Save</button><button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button></div></form></div></div></div></div></div></div><div class="modal fade" id="reportSpamModal" tabindex="-1" aria-labelledby="reportSpamModalLabel" aria-hidden="true"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><h5 class="modal-title" id="reportSpamModalLabel">Report Spam</h5><button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button></div><div class="modal-body"><p>Please tell us why you\'re reporting this email:</p><form id="reportSpamForm"><div class="mb-3"><label for="spam_reason_select" class="form-label">Select one or more reasons:</label><select class="form-select" id="spam_reason_select" name="spam_reason[]" multiple size="7"><option value="unsolicited">Unsolicited / Spam</option><option value="phishing">Phishing or scam attempt</option><option value="malicious">Malicious or harmful content</option><option value="advertising">Advertising / Promotional</option><option value="offensive">Offensive or inappropriate</option><option value="wrong_recipient">Sent to the wrong recipient</option><option value="other">Other – please specify</option></select><small class="form-text text-muted">Hold Ctrl (or Cmd on Mac) to select multiple options.</small></div><div class="mb-3" id="spam_reason_other_input" style="display: none;"><label for="spam_reason_other_text" class="form-label">Please specify:</label><input type="text" class="form-control" id="spam_reason_other_text" placeholder="Please specify"></div></form></div><div class="modal-footer"><button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button><button type="button" class="btn btn-warning" id="confirm_report_spam">Report as Spam</button></div></div></div></div>';
988+
$this->assertEquals(array($expected), $res->output_response);
988989
}
989990
/**
990991
* @preserveGlobalState disabled

tests/selenium/profiles.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ def load_profile_page(self):
2121
self.click_when_clickable(list_item.find_element(By.TAG_NAME, 'a'))
2222
self.wait_with_folder_list()
2323
self.wait_for_navigation_to_complete()
24-
assert self.by_class('profile_content_title').text == 'Profiles'
24+
profile_title = self.wait_for_element_by_class('profile_content_title')
25+
assert profile_title.text == 'Profiles'
2526

2627
def add_profile(self):
2728
self.by_class('add_profile').click()

0 commit comments

Comments
 (0)