#{fixture delete:'all' /} #{selenium 'Test the transparent JPA Binding'} open('@{JPABinding.index()}') type('name', 'Play 1.1') clickAndWait('go') assertValue('name', 'Play 1.1') storeValue('id', 'objectId') echo('Project id is $[objectId]') assertTextPresent('No company') type('name', 'Hop') clickAndWait('go') assertValue('name', 'Hop') echo('Project id is $[objectId]') assertValue('id', '$[objectId]') assertTextPresent('No company') type('id', '89776') clickAndWait('go') assertTextPresent('detached entity passed to persist: models.Project') open('@{JPABinding.createCompany()}?company.name=zenexity') assertValue('name', 'zenexity') storeValue('id', 'companyId') echo('Company id is $[companyId]') open('@{JPABinding.show()}?id=$[objectId]') type('company', '$[companyId]') clickAndWait('go') assertValue('name', 'Hop') echo('Project id is $[objectId]') assertValue('id', '$[objectId]') assertTextNotPresent('No company') assertTextPresent('zenexity') open('@{JPABinding.show()}?id=$[objectId]') type('company', 'xxx') clickAndWait('go') assertValue('name', 'Hop') echo('Project id is $[objectId]') assertTextNotPresent('No company') assertValue('company', '$[companyId]') assertTextPresent('Object not found for id') open('@{JPABinding.index()}') type('name', 'Zapps') type('company', '$[companyId]') clickAndWait('go') assertValue('name', 'Zapps') assertNotValue('id', '$[objectId]') assertTextNotPresent('No company') assertTextPresent('zenexity') open('@{JPABinding.withMap()}?companyId=$[companyId]') storeValue('id', 'objectId') echo('Project id is $[objectId]') assertTextPresent('1 in map') open('@{JPABinding.show()}?id=$[objectId]') assertTextPresent('1 in map') open('@{JPABinding.editMap()}?id=$[objectId]') assertTextPresent('1 in map') assertTextPresent('{zenexity=zenexity}') open('@{JPABinding.editMapAndSave()}?id=$[objectId]') assertTextPresent('1 in map') assertTextPresent('{Coucou=Coucou}') open('@{JPABinding.create()}?project.name=Sematic&project.company.name=CG77') assertValue('name', 'Sematic') assertTextPresent('CG77') open('@{Errors.index()}') type('tf', 'Youpi') clickAndWait('go') assertTextPresent('it works now: Youpi') open('@{JPABinding.echoEntityBinding}?a.b.name=Morten&a.b.id=') assertTextPresent('a.id=null, a.b.id=null, a.b.name=Morten') #{/selenium}