def test_create_positive_2(self, name): """ @Test: Create new puppet-class with 255 chars @Feature: Puppet-Classes - Positive Create @Assert: Puppet-Classes is created with 255 chars """ with Session(self.browser) as session: make_puppetclasses(session, name=name) search = self.puppetclasses.search(name) self.assertIsNotNone(search)
def test_create_negative_1(self, name): """ @Test: Create new puppet-class with 256 chars @Feature: Puppet-Classes - Negative Create @Assert: Puppet-Classes is not created with 256 chars @BZ: 1126496 """ with Session(self.browser) as session: make_puppetclasses(session, name=name) search = self.puppetclasses.search(name) self.assertIsNone(search)
def test_create_negative_3(self): """ @Test: Create new puppet-class with blank name @Feature: Puppet-Classes - Negative Create @Assert: Puppet-Classes is not created with 256 chars """ name = " " with Session(self.browser) as session: make_puppetclasses(session, name=name) error = session.nav.wait_until_element( common_locators["name_haserror"]) self.assertIsNotNone(error)
def test_update_positive_1(self, testdata): """ @Test: Create new puppet-class @Feature: Puppet-Classes - Positive Update @Assert: Puppet-Classes is updated. """ name = testdata['name'] new_name = testdata['new_name'] with Session(self.browser) as session: make_puppetclasses(session, name=name) search = self.puppetclasses.search(name) self.assertIsNotNone(search) self.puppetclasses.update(name, new_name)
def test_update_positive_1(self, testdata): """@Test: Create new puppet-class @Feature: Puppet-Classes - Positive Update @Assert: Puppet-Classes is updated. """ name = testdata['name'] new_name = testdata['new_name'] with Session(self.browser) as session: make_puppetclasses(session, name=name) search = self.puppetclasses.search(name) self.assertIsNotNone(search) self.puppetclasses.update(name, new_name)
def test_delete_positive_1(self, name): """ @Test: Create new puppet-class @Feature: Puppet-Classes - Positive delete @Assert: Puppet-Class is deleted @BZ: 1126473 """ with Session(self.browser) as session: make_puppetclasses(session, name=name) search = self.puppetclasses.search(name) self.assertIsNotNone(search) self.puppetclasses.delete(name, True) self.assertIsNotNone(session.nav.wait_until_element (common_locators["notif.success"])) self.assertIsNone(self.puppetclasses.search(name))
def test_delete_positive_1(self, name): """@Test: Create new puppet-class @Feature: Puppet-Classes - Positive delete @Assert: Puppet-Class is deleted @BZ: 1126473 """ with Session(self.browser) as session: make_puppetclasses(session, name=name) search = self.puppetclasses.search(name) self.assertIsNotNone(search) self.puppetclasses.delete(name, True) self.assertIsNotNone( session.nav.wait_until_element( common_locators["notif.success"])) self.assertIsNone(self.puppetclasses.search(name))