Skip to content

Commit

Permalink
[qacode] fix for issue #256 (#257)
Browse files Browse the repository at this point in the history
* [qacode] fix for issue #256

+ delete control_group
+ delete tests for control_group
+ update CHANGELOG + USAGE
* [qacode] add tests to logger_manager
  • Loading branch information
netzulo authored Apr 7, 2019
1 parent df49658 commit 6e4cc7f
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 296 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Now get_tag update self property

### Removed

- Deleted ControlGroup + tests #256

## [v0.6.0] - 2019-03-18

Expand Down
6 changes: 0 additions & 6 deletions USAGE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,6 @@ ControlForm
+ method **dropdown_deselect** : The Select class only works with tags which have select tags
+ method **dropdown_deselect_all** : The Select class only works with tags which have select tags with multiple="multiple" attribute.

ControlGroup
~~~~~~~~~~~~

+ Param **on_instance_group** : by default it's disabled, at enable raises when strict_rules type warning logs message with 'hight severity' or when type error log messages with 'medium or more severity'
+ Param **group** : allow to track all ControlBase elements using `elements` (*instances of WebElement*) and `group` (*instances of ControlBase*) properties

Pages
-----

Expand Down
4 changes: 3 additions & 1 deletion qacode/configs/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@
{ "name": "lst_ordered", "selector": "ol:nth-child(1)"},
{ "name": "lst_ordered_child", "selector": "li"},
{ "name": "dd_menu_data", "selector": "#ddData"},
{ "name": "dd_menu_data_lists", "selector": "a[href='/qacode/data/lists']"}
{ "name": "dd_menu_data_lists", "selector": "a[href='/qacode/data/lists']"},
{ "name": "tbl_ok", "selector": "#tblOk"},
{ "name": "tbl_html5_ok", "selector": "#tblHtml5Ok"}
]
},
{ "name": "qacode_inputs",
Expand Down
3 changes: 1 addition & 2 deletions qacode/core/webs/controls/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

from qacode.core.webs.controls import control_base
from qacode.core.webs.controls import control_form
from qacode.core.webs.controls import control_group


__all__ = ['control_base', 'control_form', 'control_group']
__all__ = ['control_base', 'control_form']
107 changes: 0 additions & 107 deletions qacode/core/webs/controls/control_group.py

This file was deleted.

4 changes: 1 addition & 3 deletions qacode/core/webs/pages/page_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from qacode.core.exceptions.page_exception import PageException
from qacode.core.webs.controls.control_base import ControlBase
from qacode.core.webs.controls.control_form import ControlForm
from qacode.core.webs.controls.control_group import ControlGroup

from selenium.webdriver.common.by import By

Expand Down Expand Up @@ -97,7 +96,6 @@ def _load(self, settings=None):
control = {
'ControlBase': ControlBase,
'ControlForm': ControlForm,
'ControlGroup': ControlGroup,
}[instance](self.bot, **cfg_control)
except KeyError:
self.log.debug(("Bad instance name selected for "
Expand Down Expand Up @@ -152,7 +150,7 @@ def get_elements(self, config_controls):
instance = config_control.get("instance")
control = None
try:
control_types = (ControlBase, ControlForm, ControlGroup)
control_types = (ControlBase, ControlForm)
if isinstance(instance, control_types):
controls.append(control)
else:
Expand Down
9 changes: 0 additions & 9 deletions source-docs/source/controls.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,3 @@ Class: ControlForm
:show-inheritance:
.. autoclass:: qacode.core.webs.controls.control_form.ControlForm
:members:

Class: ControlGroup
-------------------
.. automodule:: qacode.core.webs.controls.control_group
:members:
:undoc-members:
:show-inheritance:
.. autoclass:: qacode.core.webs.controls.control_group.ControlGroup
:members:
2 changes: 0 additions & 2 deletions tests/000_unitaries/suite_001_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ def test_config_tests_keys(self, key_name):
key_value.get('web_controls').get('control_base'), bool)
self.assert_is_instance(
key_value.get('web_controls').get('control_form'), bool)
self.assert_is_instance(
key_value.get('web_controls').get('control_group'), bool)
self.assert_is_instance(
key_value.get('web_pages'), bool)
self.assert_is_instance(
Expand Down
16 changes: 16 additions & 0 deletions tests/000_unitaries/suite_002_testinfobase.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import logging
import pytest
from qacode.core.loggers.logger_manager import LoggerManager
from qacode.core.testing.test_info import TestInfoBase
from qatestlink.core.testlink_manager import TLManager
from qautils.files import settings
Expand Down Expand Up @@ -43,3 +44,18 @@ def test_002_log_levels(self, log_level):
self.log.error(msg)
if log_level == 'CRITICAL':
self.log.critical(msg)

def test_loggermanager_notlogpath(self):
"""Testcase: test_loggermanager_notlogpath"""
with pytest.raises(Exception):
LoggerManager(log_path=None)

def test_loggermanager_notlogname(self):
"""Testcase: test_loggermanager_notlogname"""
with pytest.raises(Exception):
LoggerManager(log_name=None)

def test_loggermanager_allflagsfalse(self):
"""Testcase: test_loggermanager_allflagsfalse"""
with pytest.raises(Exception):
LoggerManager(is_output_console=False, is_output_file=False)
162 changes: 0 additions & 162 deletions tests/001_functionals/suite_007_controlgroup.py

This file was deleted.

Loading

0 comments on commit 6e4cc7f

Please sign in to comment.