def test_delete_keyword_undo(self): new_kw_name = 'Jiihaa' self._exec(AddKeyword(new_kw_name)) self._exec(RemoveMacro(self._new_keyword)) self._new_keyword = None self._exec(Undo()) assert_equals(self._new_keyword.name, new_kw_name)
def create_keyword(self): if self._skip: self._rand() return keyword_name = 'kwFoobar' + str(self._rand()) print 'keyword = suite.execute(AddKeyword("%s"))' % keyword_name self._keyword = self._suite.execute(AddKeyword(keyword_name))
def test_create_and_remove_keyword(self): kw_name = 'Super Keyword' self.test.execute(ChangeCellValue(0, 0, kw_name)) self._verify_cell_info(0, 0, ContentType.STRING, CellType.KEYWORD) self.test.execute(AddKeyword(kw_name, '${argh}')) self._verify_cell_info(0, 0, ContentType.USER_KEYWORD, CellType.KEYWORD) self._verify_cell_info(0, 1, ContentType.EMPTY, CellType.MANDATORY) self.test.execute(Undo()) self._verify_cell_info(0, 0, ContentType.STRING, CellType.KEYWORD) self._verify_cell_info(0, 1, ContentType.EMPTY, CellType.UNKNOWN)
def test_add_keyword(self): new_kw_name = 'Floajask' self._exec(AddKeyword(new_kw_name)) assert_equals(self._new_keyword.name, new_kw_name) assert_equals(self._new_keyword.arguments.value, '')
def test_add_keyword_undo(self): new_kw_name = 'Jiihaa' self._exec(AddKeyword(new_kw_name)) assert_equals(self._new_keyword.name, new_kw_name) self._exec(Undo()) assert_equals(self._deleted_keyword.name, new_kw_name)
def test_delete_keyword_command(self): new_kw_name = 'Jiihaa' self._exec(AddKeyword(new_kw_name)) assert_equals(self._new_keyword.name, new_kw_name) self._exec(RemoveMacro(self._new_keyword)) assert_equals(self._deleted_keyword.name, new_kw_name)
def _bdd_test(self, prefix, new_kw_name): self._exec(AddKeyword(prefix + ' ' + new_kw_name)) assert_equals(self._new_keyword.name, self._bdd_name(prefix, new_kw_name)) assert_equals(self._new_keyword.arguments.value, '')
def _create_resource(self): self.new_resource = self.ctrl.execute( CreateNewResource(self.res_full_name)) self.new_resource.execute(AddKeyword(self.new_keyword_name, '${moi}')) self.new_resource.execute(SaveFile())
def OnNewUserKeyword(self, event): dlg = UserKeywordNameDialog(self.controller) if dlg.ShowModal() == wx.ID_OK: self.controller.execute(AddKeyword(dlg.get_name(), dlg.get_args())) dlg.Destroy()