#{fixture delete:'all' /} #{selenium 'Test the CRUD module'} open('@{CRUD.index()}') // Create a company clickAndWait('link=AdminCompany') assertTextPresent('0 AdminCompany') clickAndWait('link=Add Company') assertTextPresent('version') assertElementPresent('object_version') type('object_name', 'Zenexity') clickAndWait('css=input[name=_save]') assertTextPresent('has been created') assertTextPresent('Zenexity') clickAndWait('link=Zenexity') assertTextPresent('Edit Company') assertTextPresent('version') assertElementPresent('object_version') // Create a project clickAndWait('link=Home') clickAndWait('link=Projects') assertTextPresent('0 Projects') clickAndWait('link=Add Project') type('object_name', 'Play') select('object_company', 'Zenexity') clickAndWait('css=input[name=_save]') assertTextPresent('has been created') assertTextPresent('Play belongs to Zenexity') clickAndWait('link=Play belongs to Zenexity') assertTextPresent('Edit Project') // Create a factory clickAndWait('link=Home') clickAndWait('link=Factories') assertTextPresent('0 Factories') clickAndWait('link=Add Factory') type('object_name', 'Cars') clickAndWait('css=input[name=_save]') assertTextPresent('has been created') assertTextPresent('Cars') clickAndWait('link=Cars') assertTextPresent('Edit Factory') type('object_name', 'Cars !!!!') clickAndWait('css=input[name=_save]') assertTextPresent('Cars !!!!') // Update te project clickAndWait('link=Home') clickAndWait('link=Projects') clickAndWait('link=Play belongs to Zenexity') select('object_company', '(Please select a value)') clickAndWait('css=input[name=_save]') assertTextPresent('Please correct error') type('object_name', 'Poupou') clickAndWait('css=input[name=_save]') clickAndWait('link=Home') clickAndWait('link=Projects') assertTextPresent('Play belongs to Zenexity') assertTextNotPresent('Poupou') // Create an item clickAndWait('link=Home') clickAndWait('link=Items') clickAndWait('link=Add Item') assertTextNotPresent('PI') type('object_name', '607') type('object_sku', '607') clickAndWait('css=input[name=_save]') assertTextPresent('Item[607]') clickAndWait('link=Item[607]') assertSelected('object_factory', '(None)') select('object_factory', 'Cars !!!!') clickAndWait('css=input[name=_save]') clickAndWait('link=Item[607]') assertSelected('object_factory', 'Cars !!!!') // Create a company open('@{CRUD.index()}') clickAndWait('link=CustomAdminCompany') assertTextPresent('1 CustomAdminCompany') clickAndWait('link=Add Company') assertNotVisible('object_version') assertTextNotPresent('version') assertElementPresent('object_version') type('object_name', 'Zenexity 2') clickAndWait('css=input[name=_save]') assertTextPresent('has been created') assertTextPresent('Zenexity 2') clickAndWait('link=Zenexity 2') assertTextPresent('Edit Company') assertNotVisible('object_version') assertTextNotPresent('version') assertElementPresent('object_version') #{/selenium}