source: trunk/test/webtest/gscf/ImportWizardWebTests.groovy @ 1658

Last change on this file since 1658 was 1658, checked in by t.w.abma@…, 10 years ago
  • importer wizard webtest working
  • native file input HTML element didn't work inside AjaxFlow, so used hidden importfile variable
  • added check for development or test environment in configuration file
  • added webtestfiles folder to web-apps containing Excel files to test
  • Property svn:keywords set to Rev Author Date
File size: 1.5 KB
Line 
1package gscf
2
3import org.dbnp.gdt.*
4
5class ImportWizardWebTests extends grails.util.WebTest {
6
7        // Unlike unit tests, functional tests are sometimes sequence dependent.
8        // Methods starting with 'test' will be run automatically in alphabetical order.
9        // If you require a specific sequence, prefix the method name (following 'test') with a sequence
10        // e.g. test001XclassNameXListNewDelete
11
12        void testImportWizard() {
13                // reset Identity to be able to predict identifiers
14                Identity.resetIdentifier()
15
16                // make sure Canoo waits for AJAX calls
17                config(easyajax: true)
18
19                invoke "http://localhost:8080/gscf/?nostats=true"
20                clickLink(description: "Click link: Log In | Register", htmlId: "open")
21                setInputField(name: "j_username", value: "user")
22                setInputField(description: "Set password field j_password: useR123!", name: "j_password", value: "useR123!")
23                clickButton "Login"
24       
25        clickLink "Studies"
26        clickLink "Import study data"
27       
28        setSelectField(name: "entity", text: "Study")       
29        clickButton "next »"
30       
31        // Set column properties (TemplateFields)
32        setSelectField(name: "columnproperty.index.0", text: "startDate")
33        setSelectField(name: "columnproperty.index.1", text: "code (IDENTIFIER)")
34        setSelectField(name: "columnproperty.index.15", text: "title")
35        setSelectField(name: "columnproperty.index.16", text: "description")
36        clickButton "next »"
37       
38        // Validate and store
39        clickButton "next »"
40       
41       
42        }
43
44}
Note: See TracBrowser for help on using the repository browser.