Changeset 5025 for devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/pages/calendar/AgendaPermissionPage.java
- Timestamp:
- 09/02/11 14:27:19 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/testlink/automation2.0/src/test/java/org/expressolivre/cte/pages/calendar/AgendaPermissionPage.java
r4962 r5025 1 1 package org.expressolivre.cte.pages.calendar; 2 2 3 import java.util.List; 3 4 import java.util.Set; 4 5 … … 60 61 61 62 /** 63 * Verifica se o usuario ja esta na lista de permissoes. 64 * 65 * @param userName 66 * @return 67 */ 68 public Boolean isUserInList(String userName) { 69 return super.isValueInCombo(this.userList, userName, true); 70 } 71 72 /** 73 * Remove todos os usuarios do compartilhamento. 74 */ 75 public void removeAllUsers() { 76 List<WebElement> users = super.getComboElements(this.userList); 77 for (WebElement user : users) { 78 user.setSelected(); 79 this.removeButton.click(); 80 } 81 } 82 83 /** 62 84 * Adaptacao da solucao para lidar com janelas popups obtida em <a 63 85 * href="http://groups.google.com/group … … 92 114 } 93 115 94 public void setReadPermission() { 95 this.read.click(); 116 public void setReadPermission(boolean read) { 117 if (read && !this.read.isSelected()) { 118 this.read.click(); 119 } else if (!read && this.read.isSelected()) { 120 this.read.click(); 121 } 122 } 123 124 public void setEditPermission(boolean edit) { 125 if (edit && !this.edit.isSelected()) { 126 this.edit.click(); 127 } else if (!edit && this.edit.isSelected()) { 128 this.edit.click(); 129 } 130 } 131 132 public void setAddPermission(boolean add) { 133 if (add && !this.add.isSelected()) { 134 this.add.click(); 135 } else if (!add && this.add.isSelected()) { 136 this.add.click(); 137 } 138 } 139 140 public void setRemovePermission(boolean remove) { 141 if (remove && !this.remove.isSelected()) { 142 this.remove.click(); 143 } else if (!remove && this.remove.isSelected()) { 144 this.remove.click(); 145 } 146 } 147 148 public void setRestrictPermission(boolean restrict) { 149 if (restrict && !this.restrict.isSelected()) { 150 this.restrict.click(); 151 } else if (!restrict && this.restrict.isSelected()) { 152 this.restrict.click(); 153 } 154 } 155 156 public void clearPemissions() { 157 this.setReadPermission(false); 158 this.setEditPermission(false); 159 this.setRemovePermission(false); 160 this.setAddPermission(false); 161 this.setRestrictPermission(false); 96 162 } 97 163 … … 99 165 this.cancelButton.click(); 100 166 } 167 168 public void apply() { 169 this.okButton.click(); 170 } 101 171 }
Note: See TracChangeset
for help on using the changeset viewer.