#{fixture delete:'all' /} #{selenium 'Test that JPA.abort() works'} // Insert (bug) open('@{Horses.index()}') clickAndWait('dontSave') assertTextPresent('Blups:0') open('@{Horses.index()}') clickAndWait('dontSave') assertTextPresent('Blups:0') open('@{Horses.index()}') clickAndWait('save') assertTextPresent('Blups:1') open('@{Horses.index()}') clickAndWait('dontSave') assertTextPresent('Blups:1') open('@{Horses.index()}') clickAndWait('save') assertTextPresent('Blups:2') // A simple test case open('@{JPABinding.aSaveForm()}') assertTextPresent('A: 0') assertTextPresent('B: 0') clickAndWait('saveAll') assertTextPresent('A: 0') assertTextPresent('B: 0') // Three levels open('@{JPAController.with3Levels()}') assertTextPresent('Guillaume 06 Paris') clickAndWait('dontSave') assertTextPresent('Guillaume 06 Paris') clickAndWait('save') assertTextPresent('Bob 07 Berlin') // Init open('@{JPAController.init()}') assertTextPresent('Post1') assertTextPresent('Blue') assertTextPresent('Red') // Don't edit name open('@{JPAController.dontEditName()}') assertTextPresent('Post1') assertTextPresent('Blue') assertTextPresent('Red') // Edit name open('@{JPAController.editName()}') assertTextPresent('Kiki') assertTextPresent('Blue') assertTextPresent('Red') // Don't edit tags open('@{JPAController.dontEditTags()}') assertTextPresent('Kiki') assertTextPresent('Blue') assertTextPresent('Red') // Edit tags open('@{JPAController.editTags()}') assertTextPresent('Kiki') assertTextNotPresent('Blue') assertTextPresent('Red') // Don't replace tags open('@{JPAController.dontReplaceTags()}') assertTextPresent('Kiki') assertTextNotPresent('Blue') assertTextPresent('Red') assertTextNotPresent('Green') // Replace tags open('@{JPAController.replaceTags()}') assertTextPresent('Kiki') assertTextNotPresent('Blue') assertTextNotPresent('Red') assertTextPresent('Green') // Don't delete tags open('@{JPAController.dontDeleteTags()}') assertTextPresent('Kiki') assertTextNotPresent('Blue') assertTextNotPresent('Red') assertTextPresent('Green') // Delete tags open('@{JPAController.deleteTags()}') assertTextPresent('Kiki') assertTextNotPresent('Blue') assertTextNotPresent('Red') assertTextNotPresent('Green') // Will save open('@{JPAController.index()}') getEval('window.document.getElementById("form").action="@{JPAController.willSave()}"') type('name', 'Toto1') clickAndWait('save') assertTextPresent('Toto1') // Will not save open('@{JPAController.index()}') getEval('window.document.getElementById("form").action="@{JPAController.willNotSave()}"') type('name', 'Toto2') clickAndWait('save') assertTextNotPresent('Toto2') // Will save open('@{JPAController.index()}') getEval('window.document.getElementById("form").action="@{JPAController.willSave()}"') type('name', 'Toto2') clickAndWait('save') assertTextPresent('Toto2') // Edit open('@{JPAController.edit('Toto2', 'New toto2')}') assertTextPresent('Toto2') assertTextNotPresent('New toto2') // Edit and save open('@{JPAController.editAndSave('Toto2', 'New toto2')}') assertTextNotPresent('Toto2') assertTextPresent('New toto2') // Create and edit open('@{JPAController.createAndEdit('Toto3', 'New toto3')}') assertTextPresent('Toto3') assertTextNotPresent('New toto3') // Create and edit and save open('@{JPAController.createAndEditAndSave('Toto4', 'New toto4')}') assertTextNotPresent('Toto4') assertTextPresent('New toto4') // Test hibernate bug with found two representation of the same collection open('@{JPAController.testFoundTwoRepresentationOfTheSameObject()}') assertTextPresent('OK') #{/selenium}