Skip to content

Commit

Permalink
Testes funcionais - US02
Browse files Browse the repository at this point in the history
  • Loading branch information
oigrescampos committed Apr 26, 2012
1 parent 714791c commit 6d8a87f
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 8 deletions.
16 changes: 8 additions & 8 deletions application.properties
@@ -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
@@ -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

}

}

0 comments on commit 6d8a87f

Please sign in to comment.