Added new test classes for handling test on file resources. Added ids to file context...
[pithos] / test / gr / ebs / gss / client / selenium / file / TestFileBasics.java
1 /*
2  * Copyright 2011 Electronic Business Systems Ltd.
3  *
4  * This file is part of GSS.
5  *
6  * GSS is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * GSS is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with GSS.  If not, see <http://www.gnu.org/licenses/>.
18  */
19 package gr.ebs.gss.client.selenium.file;
20
21
22 import gr.ebs.gss.client.selenium.folder.ActionUtils;
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
30
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 = "";
44         
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);
60                 
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(){
79                 
80         }
81         
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         
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 }