Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge pull request #39 from sergiocampos/master

Testes funcionais US02 - Cadastrar Departamento
  • Loading branch information...
commit eb6826fec73b5e7783e1bb26528701715aa5b357 2 parents 23a89f9 + 6d8a87f
rodrigovilar authored
16 application.properties
... ... @@ -1,8 +1,8 @@
1   -#Grails Metadata file
2   -#Tue Apr 24 19:52:15 BRT 2012
3   -app.grails.version=2.0.3
4   -app.name=AlocadorHorarios
5   -app.servlet.version=2.5
6   -app.version=0.1
7   -plugins.functional-test=2.0.M2
8   -plugins.jquery-ui=1.8.15
  1 +#Grails Metadata file
  2 +#Wed Apr 25 11:00:06 GMT-03:00 2012
  3 +app.grails.version=2.0.1
  4 +app.name=AlocadorHorarios
  5 +app.servlet.version=2.5
  6 +app.version=0.1
  7 +plugins.functional-test=2.0.M2
  8 +plugins.jquery-ui=1.8.15
60 test/functional/alocadorhorarios/DepartamentoFunctionalTests.groovy
... ... @@ -0,0 +1,60 @@
  1 +package alocadorhorarios
  2 +
  3 +import java.awt.Desktop.Action;
  4 +
  5 +import alocadorhorarios.Departamento;
  6 +
  7 +import com.grailsrocks.functionaltest.*
  8 +
  9 +class DepartamentoFunctionalTests extends BrowserTestCase {
  10 + void testSomeWebsiteFeature() {
  11 + // Here call get(uri) or post(uri) to start the session
  12 + // and then use the custom assertXXXX calls etc to check the response
  13 + //
  14 + // get('/something')
  15 + // assertStatus 200
  16 + // assertContentContains 'the expected text'
  17 + }
  18 + void testList(){
  19 + get('/departamento/list')
  20 + assertContentContains "List"
  21 + assertStatus 200
  22 +
  23 + get('/departamento/create')
  24 + assertContentContains "Create"
  25 + assertStatus 200
  26 +
  27 + form {
  28 + nome "dce"
  29 + cor "amarelo"
  30 + click "create"
  31 + }
  32 + assertContentContains "dce"
  33 + assertContentContains "amarelo"
  34 + assertContentContains "created"
  35 + assertStatus 200
  36 +
  37 + click "Edit"
  38 + assertContentContains "Edit"
  39 + assertStatus 200
  40 +
  41 + form {
  42 + nome "dcn"
  43 + cor "verde"
  44 + click "_action_update"
  45 + }
  46 +
  47 + assertContentContains "dcn"
  48 + assertContentContains "verde"
  49 + assertContentContains "updated"
  50 + assertStatus 200
  51 +
  52 + click "Departamento List"
  53 + assertContentContains "dcn"
  54 + assertContentContains "verde"
  55 + assertContentContains "List"
  56 + assertStatus 200
  57 +
  58 + }
  59 +
  60 +}

0 comments on commit eb6826f

Please sign in to comment.
Something went wrong with that request. Please try again.