Revision 67a0315c test/gr/ebs/gss/client/selenium/file/TestFileBasics.java
b/test/gr/ebs/gss/client/selenium/file/TestFileBasics.java | ||
---|---|---|
18 | 18 |
*/ |
19 | 19 |
package gr.ebs.gss.client.selenium.file; |
20 | 20 |
|
21 |
import org.junit.Test; |
|
21 | 22 |
|
22 |
import gr.ebs.gss.client.selenium.folder.ActionUtils; |
|
23 | 23 |
|
24 |
import org.junit.After; |
|
25 |
import org.junit.Before; |
|
26 |
import org.openqa.selenium.By; |
|
27 |
import org.openqa.selenium.WebDriver; |
|
28 |
import org.openqa.selenium.firefox.FirefoxDriver; |
|
29 | 24 |
|
30 | 25 |
|
31 |
/** |
|
32 |
* @author natasa |
|
33 |
* |
|
34 |
*/ |
|
35 |
public class TestFileBasics { |
|
36 |
|
|
37 |
ActionUtils action; |
|
38 |
|
|
39 |
WebDriver driver; |
|
40 |
|
|
41 |
String url = "http://127.0.0.1:8080/pithos/login?next=http://127.0.0.1:8080/pithos/"; |
|
42 |
|
|
43 |
String fileName = ""; |
|
26 |
public class TestFileBasics extends FileUtils{ |
|
44 | 27 |
|
45 |
String groupName = "Wookiees"; |
|
46 |
|
|
47 |
String userName = "past@ebs.gr"; |
|
48 |
|
|
49 |
String addUserName = "lakis@ebs.gr"; |
|
50 |
|
|
51 |
/** |
|
52 |
* @throws java.lang.Exception |
|
53 |
*/ |
|
54 |
@Before |
|
55 |
public void setUp() throws Exception { |
|
56 |
|
|
57 |
driver = new FirefoxDriver(); |
|
58 |
|
|
59 |
action = new ActionUtils(driver); |
|
28 |
@Test |
|
29 |
public void testClickAFile(){ |
|
30 |
selectFolderBelowHome(userName, folderName); |
|
31 |
clickAFile(fileName); |
|
60 | 32 |
|
61 |
action.getUrl(url); |
|
62 |
|
|
63 |
// Necessary delay in order all dom elements to be created |
|
64 |
Thread.sleep(3000); |
|
65 |
} |
|
66 |
|
|
67 |
/** |
|
68 |
* @throws java.lang.Exception |
|
69 |
*/ |
|
70 |
@After |
|
71 |
public void tearDown() throws Exception { |
|
72 |
action.quit(); |
|
73 |
} |
|
74 |
|
|
75 |
public void clickAFile(String aFileName){ |
|
76 |
action.click(By.id("")); |
|
77 |
} |
|
78 |
public void selectFileMenu(){ |
|
33 |
rightClickOnFile(fileName); |
|
79 | 34 |
|
35 |
selectFileContextMenuOption("refresh"); |
|
80 | 36 |
} |
81 | 37 |
|
82 |
/** |
|
83 |
* TODO: Download a file below in a folder |
|
84 |
* > select a file |
|
85 |
* > select File > 'Download' |
|
86 |
* > save file from the popup window to your hdd |
|
87 |
* |
|
88 |
*/ |
|
89 | 38 |
|
90 |
/** TODO: Save As |
|
91 |
* **** This action performs the same results to the above 'Download' option |
|
92 |
*/ |
|
93 |
|
|
94 |
/** TODO:Empty Trash |
|
95 |
* > select a file |
|
96 |
* > select File > 'Empty Trash' |
|
97 |
* *** Notice: There is no confirmation before performing this action |
|
98 |
*/ |
|
99 |
|
|
100 |
|
|
101 |
/** TODO:. Refresh |
|
102 |
* > select a file |
|
103 |
* > select File > 'Refresh' |
|
104 |
*/ |
|
105 |
|
|
106 |
/** |
|
107 |
* TODO: . Cut file |
|
108 |
* > select a file |
|
109 |
* > select Edit > 'Cut' |
|
110 |
* > select a destination folder |
|
111 |
* > click Edit > Paste on the destination folder |
|
112 |
*/ |
|
113 |
|
|
114 |
/** TODO: . Copy file |
|
115 |
* > select a file |
|
116 |
* > select Edit > 'Copy' |
|
117 |
* > select a destination folder |
|
118 |
* > click Edit > 'Paste' on the destination folder |
|
119 |
* |
|
120 |
*/ |
|
121 |
|
|
122 |
/** TODO: . Move to Trash |
|
123 |
* > select a file |
|
124 |
* > select Edit > 'Move to Trash' |
|
125 |
* > select Trash folder and your file is in the Trash |
|
126 |
*/ |
|
127 |
/**. Delete |
|
128 |
* > select a file |
|
129 |
* > select Edit > 'Move to Trash' |
|
130 |
* > click Delete to confirm |
|
131 |
* */ |
|
132 |
|
|
133 |
/** TODO:. Select All |
|
134 |
* > select a file |
|
135 |
* > select Edit > 'Select All' this action results to select all files that are inside home folder |
|
136 |
*/ |
|
137 |
|
|
138 |
/** TODO:. Unselect All |
|
139 |
* > select a file |
|
140 |
* > select Edit > 'Unselect All' this action results to unselect all files that are inside home folder |
|
141 |
*/ |
|
142 |
|
|
143 | 39 |
} |
Also available in: Unified diff