Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
714791c
commit 6d8a87f
Showing
2 changed files
with
68 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
#Grails Metadata file | ||
#Tue Apr 24 19:52:15 BRT 2012 | ||
app.grails.version=2.0.3 | ||
app.name=AlocadorHorarios | ||
app.servlet.version=2.5 | ||
app.version=0.1 | ||
plugins.functional-test=2.0.M2 | ||
plugins.jquery-ui=1.8.15 | ||
#Grails Metadata file | ||
#Wed Apr 25 11:00:06 GMT-03:00 2012 | ||
app.grails.version=2.0.1 | ||
app.name=AlocadorHorarios | ||
app.servlet.version=2.5 | ||
app.version=0.1 | ||
plugins.functional-test=2.0.M2 | ||
plugins.jquery-ui=1.8.15 |
60 changes: 60 additions & 0 deletions
60
test/functional/alocadorhorarios/DepartamentoFunctionalTests.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
package alocadorhorarios | ||
|
||
import java.awt.Desktop.Action; | ||
|
||
import alocadorhorarios.Departamento; | ||
|
||
import com.grailsrocks.functionaltest.* | ||
|
||
class DepartamentoFunctionalTests extends BrowserTestCase { | ||
void testSomeWebsiteFeature() { | ||
// Here call get(uri) or post(uri) to start the session | ||
// and then use the custom assertXXXX calls etc to check the response | ||
// | ||
// get('/something') | ||
// assertStatus 200 | ||
// assertContentContains 'the expected text' | ||
} | ||
void testList(){ | ||
get('/departamento/list') | ||
assertContentContains "List" | ||
assertStatus 200 | ||
|
||
get('/departamento/create') | ||
assertContentContains "Create" | ||
assertStatus 200 | ||
|
||
form { | ||
nome "dce" | ||
cor "amarelo" | ||
click "create" | ||
} | ||
assertContentContains "dce" | ||
assertContentContains "amarelo" | ||
assertContentContains "created" | ||
assertStatus 200 | ||
|
||
click "Edit" | ||
assertContentContains "Edit" | ||
assertStatus 200 | ||
|
||
form { | ||
nome "dcn" | ||
cor "verde" | ||
click "_action_update" | ||
} | ||
|
||
assertContentContains "dcn" | ||
assertContentContains "verde" | ||
assertContentContains "updated" | ||
assertStatus 200 | ||
|
||
click "Departamento List" | ||
assertContentContains "dcn" | ||
assertContentContains "verde" | ||
assertContentContains "List" | ||
assertStatus 200 | ||
|
||
} | ||
|
||
} |