Commit Graph

61 Commits

Author SHA1 Message Date
Jan Cholasta
0d370a959b pylint: enable the import-error check
Check for import errors with pylint to make sure new python package
dependencies are not overlooked.

https://fedorahosted.org/freeipa/ticket/6418

Reviewed-By: Petr Spacek <pspacek@redhat.com>
Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-10-24 14:11:08 +02:00
Martin Basti
9d83be3647 Remove unused variables in tests
This commit removes or marks unused variables as "expected to be unused"
by using '_' prefix.

Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
2016-09-27 13:35:58 +02:00
Jan Barta
275e85d076 pylint: fix unneeded-not
Reviewed-By: Tomas Krizek <tkrizek@redhat.com>
Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
2016-09-22 16:52:57 +02:00
Pavel Vomacka
45825b84b0 Add function which check whether the field is empty
Part of: https://fedorahosted.org/freeipa/ticket/6064

Reviewed-By: Lenka Doudova <ldoudova@redhat.com>
2016-08-01 17:07:49 +02:00
tester
26803a0d17 Add possibility to choose parent element by css
Part of: https://fedorahosted.org/freeipa/ticket/6064

Reviewed-By: Lenka Doudova <ldoudova@redhat.com>
2016-08-01 17:07:49 +02:00
Pavel Vomacka
41ace68e04 Set default delete action name to 'delete'
Only specific delete actions will be explicitely set.

Part of: https://fedorahosted.org/freeipa/ticket/6052

Reviewed-By: Lenka Doudova <ldoudova@redhat.com>
2016-07-27 19:23:28 +02:00
Lenka Doudova
6468a39850 WebUI: Test creating user without private group
Test for option to create a user without private group in web UI.

Covers ticket https://fedorahosted.org/freeipa/ticket/5804

Reviewed-By: Pavel Vomacka <pvomacka@redhat.com>
2016-04-15 10:17:20 +02:00
Lenka Doudova
904db149e9 WebUI test: ID views
Provides missing test coverage for ID views web UI.

Reviewed-By: Pavel Vomacka <pvomacka@redhat.com>
2016-03-11 11:52:25 +01:00
Lenka Doudova
a3f8e8e71f WebUI tests: fix failing of tests due to unclicable label
Checkbox label is no longer clickable, most tests fail with error like this:

AssertionError: Can't click on checkbox label: table.table
Message: Element is not clickable at point (37, 340.3999938964844). Other element would receive the click:
<input class="standalone" id="cn18" value="itest-group" name="cn" type="checkbox">

The checkbox is clickable directly without the label, this patch provides according fix.

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2016-02-23 10:11:22 +01:00
Petr Viktorin
70b37a956c Use six.moves.urllib instead of urllib/urllib2/urlparse
In Python 3, these modules are reorganized.

Reviewed-By: David Kupka <dkupka@redhat.com>
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Reviewed-By: Martin Basti <mbasti@redhat.com>
2015-10-07 10:27:20 +02:00
Petr Viktorin
8de13bd7dd Use the print function
In Python 3, `print` is no longer a statement. Call it as a function
everywhere, and include the future import to remove the statement
in Python 2 code as well.

Reviewed-By: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2015-09-01 11:42:01 +02:00
Petr Viktorin
3bf91eab25 Use Python3-compatible dict method names
Python 2 has keys()/values()/items(), which return lists,
iterkeys()/itervalues()/iteritems(), which return iterators,
and viewkeys()/viewvalues()/viewitems() which return views.

Python 3 has only keys()/values()/items(), which return views.
To get iterators, one can use iter() or a for loop/comprehension;
for lists there's the list() constructor.

When iterating through the entire dict, without modifying the dict,
 the difference between Python 2's items() and iteritems() is
negligible, especially on small dicts (the main overhead is
extra memory, not CPU time). In the interest of simpler code,
this patch changes many instances of iteritems() to items(),
iterkeys() to keys() etc.

In other cases, helpers like six.itervalues are used.

Reviewed-By: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2015-09-01 11:42:01 +02:00
Petr Viktorin
27dabb4528 Modernize 'except' clauses
The 'as' syntax works from Python 2 on, and Python 3 will
drop the "comma" syntax.

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2015-08-12 18:17:23 +02:00
Petr Vobornik
a1ccdc33df webui-ci: do not open 2 browser windows
Reviewed-By: Milan Kubik <mkubik@redhat.com>
2015-05-07 10:45:48 +02:00
Gabe
d1a0474d18 Unsaved changes dialog internally inconsistent
https://fedorahosted.org/freeipa/ticket/4926

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2015-05-07 10:38:26 +02:00
Petr Viktorin
82e41dc7a4 test_webui: Don't use __init__ for test classes
https://fedorahosted.org/freeipa/ticket/4610

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2014-11-21 12:14:44 +01:00
Petr Viktorin
375e9f7c4b tests: Use PEP8-compliant setup/teardown method names
The setUp/dearDown names are used in the unittest module, but there is no reason
to use them in non-`unittest` test cases.
Nose supports both styles (but mixing them can cause trouble when
calling super()'s methods).
Pytest only supports the new ones.

https://fedorahosted.org/freeipa/ticket/4610

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2014-11-21 12:14:44 +01:00
Petr Vobornik
dafdd68a6e webui-ci: case-insensitive record check
Indirect association are no longer lower cased, which caused a issue in CI.

Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
2014-09-25 10:27:31 +02:00
Petr Vobornik
a3c51e2383 webui-ci: fix table widget add
add_table_record call used old selector for add button which
caused 3 fails in CI:
- ERROR: Test automember rebuild membership feature for hosts
- ERROR: Test automember rebuild membership feature for users
- ERROR: Basic CRUD: dns

related to:
https://fedorahosted.org/freeipa/ticket/4258

Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
2014-08-20 10:42:57 +02:00
Petr Vobornik
80733bff15 webui-ci: fix reset password check
After login, CI checks if password needs a reset by checking if
reset password fields are displayed. This check failed since
login facet was removed from DOM after successful auth. Weakening
the selector fixes it.

Reviewed-By: Petr Viktorin <pviktori@redhat.com>
2014-07-31 12:02:58 +02:00
Petr Vobornik
3966417779 webui: replace action_buttons with action_widget
Simplify code base by reuse of 'disable' feature of button_widget. All
occurrences of action-button which were disabled/enabled were replaced
by button-widget.

https://fedorahosted.org/freeipa/ticket/4258

Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
2014-07-28 10:24:21 +02:00
Petr Vobornik
0b0e77cf99 webui: new navigation structure
https://fedorahosted.org/freeipa/ticket/4418

Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
Reviewed-By: Martin Kosek <mkosek@redhat.com>
Reviewed-By: Petr Spacek <pspacek@redhat.com>
2014-07-04 16:31:38 +02:00
Petr Vobornik
029649c05c webui-ci: fix action list action visibility and enablement assertion
The new html structure was not addressed properly.

Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
2014-06-30 13:00:13 +02:00
Tomas Babej
4d2ef43f28 ipaplatform: Move all filesystem paths to ipaplatform.paths module
https://fedorahosted.org/freeipa/ticket/4052

Reviewed-By: Petr Viktorin <pviktori@redhat.com>
2014-06-16 19:48:20 +02:00
Petr Vobornik
dd69557f4e webui: use normal buttons instead of link buttons in multivalued widget
Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
2014-06-10 10:23:30 +02:00
Petr Vobornik
841e0cd3ae webui-ci: assert_action_list_action
Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
2014-06-10 10:23:30 +02:00
Petr Vobornik
408457ce53 webui: change control buttons to normal buttons
Now buttons have normal button appearance instead of link button.

Partially fixes: https://fedorahosted.org/freeipa/ticket/4258 since the disabling is done through button's disabled attribute.

Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
2014-06-10 10:23:29 +02:00
Petr Vobornik
bf9eeb823b webui-ci: select search table item - chrome issue
Sometimes Chrome dirver has issues with clicking on items. This patch
is making it more solid. Better error reporting added for cases where
it doesn't help.

Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
2014-06-10 10:23:28 +02:00
Petr Vobornik
f631b07507 webui: activity indicators
https://fedorahosted.org/freeipa/ticket/4177
https://fedorahosted.org/freeipa/ticket/4255

Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
2014-06-10 10:23:27 +02:00
Petr Vobornik
faf4fea30f webui: patternFly dialog
Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
2014-06-10 10:23:26 +02:00
Petr Vobornik
c7af245809 webui: add action dropdown
Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
2014-06-10 10:23:25 +02:00
Petr Vobornik
ad338b9d74 webui: change breadcrumb to PatternFly
Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
2014-06-10 10:23:24 +02:00
Petr Vobornik
bcb2ce7f24 webui: display undo and multivalued delete buttons in input-group
Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
2014-06-10 10:23:24 +02:00
Petr Vobornik
2e9e5792bc webui: adjust styles to PatternFly
side effect partially fixes:
https://fedorahosted.org/freeipa/ticket/3435

Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
2014-06-10 10:23:24 +02:00
Petr Vobornik
0e15a282e8 webui: remove column sizing in tables, use PF styles
https://fedorahosted.org/freeipa/ticket/4136

usage of .table-striped class also fixes:
https://fedorahosted.org/freeipa/ticket/3050

Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
2014-06-10 10:23:23 +02:00
Petr Vobornik
6a61378586 webui-ci: save screenshot on test failure
New decorator: ui_driver.screenshot created. It should be applied on test methods.

Screenshot is saved on each exception except SkipTest.

Configuration:
- add: `save_screenshots: True` to ~/.ipa/ui_test.conf to enable saving screenshots
- optionally add `screenshot_dir: /path/to/dir` to specify target directory
  otherwise screenshots are saved to current directory

Reviewed-By: Adam Misnyovszki <amisnyov@redhat.com>
2014-05-12 18:52:57 +02:00
Adam Misnyovszki
5b12367ca8 webui tests: callback, assert_disabled feature added
Added a callback feature to webui tests,
to extend functionality. Also added
assert_disabled function to ui_driver, to
check if a field is disabled in the browser.

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2014-05-12 13:35:56 +02:00
Petr Vobornik
7eff8ad7dc webui-ci: adjust id range tests to new validator
Reviewed-By: Adam Misnyovszki <amisnyov@redhat.com>
2014-05-05 17:50:53 +02:00
Petr Vobornik
466e32f9ec webui-ci: adapt to new login screen
https://fedorahosted.org/freeipa/ticket/3903

Reviewed-By: Adam Misnyovszki <amisnyov@redhat.com>
2014-04-15 12:41:54 +02:00
Petr Vobornik
06a7a1b3cb webui: replace IPA.command usage with rpc.command
Replace all IPA.command, IPA.batch_command and IPA.concurrent_command usages
by equivalents from rpc module.

Reviewed-By: Adam Misnyovszki <amisnyov@redhat.com>
2014-03-27 14:54:08 +01:00
Petr Vobornik
fddb2212bc webui-css: improve radio,checkbox keyboard support and color
checkboxes and radio buttons:
- do not change color on hover when disabled
- are focusable and checkable be keyboard again. This uses a little
  trick where the real checkbox is hidden under the artificial
  checkbox. That way it has the same position and therefore it
  works even in containers with overflow set.

https://fedorahosted.org/freeipa/ticket/4217

Reviewed-By: Adam Misnyovszki <amisnyov@redhat.com>
2014-03-20 08:57:42 +01:00
Petr Vobornik
870a5daf24 webui: Datetime parsing and formatting
this patch implements:
- output_formatter in field. It should be used in par with formatter. Formatter serves for datasource->widget conversion, output_formatter for widget->datasource format conversion.
- datetime module which parses/format strings in subset of ISO 8601 and LDAP generalized time format to Date.
- utc formatter replaced with new datetime formatter
- datetime_validator introduced
- new datetime field, extension of text field, which by default uses datetime formatter and validator

Dojo was regenerated to include dojo/string module

https://fedorahosted.org/freeipa/ticket/4194

Reviewed-By: Adam Misnyovszki <amisnyov@redhat.com>
2014-03-13 15:59:44 +01:00
Petr Vobornik
6b71d1a167 Web UI integration tests: maximize browser window by default 2014-01-21 12:04:04 +01:00
Petr Vobornik
c4abe3a2d9 Replace icons with the ones from Font Awesome
https://fedorahosted.org/freeipa/ticket/3904
2014-01-21 12:04:03 +01:00
Petr Vobornik
23c042775c RCUE dialog implementation
https://fedorahosted.org/freeipa/ticket/3904
2014-01-21 12:04:02 +01:00
Petr Vobornik
9a7e65100c New checkboxes and radio styles
https://fedorahosted.org/freeipa/ticket/3904
2014-01-21 12:04:02 +01:00
Petr Vobornik
2d9bb22772 Change undo to regular button
https://fedorahosted.org/freeipa/ticket/3904
2014-01-21 12:04:02 +01:00
Petr Vobornik
7adb034e02 Remove jquery button usage and unify button code
https://fedorahosted.org/freeipa/ticket/3904
2014-01-21 12:04:02 +01:00
Petr Vobornik
3b9280c974 RCUE Header
https://fedorahosted.org/freeipa/ticket/3902
2014-01-21 12:04:02 +01:00
Petr Viktorin
f2ee8a7403 test_webui: Allow False values in configuration for no_ca, no_dns, has_trusts
The driver only checked if the corresponding value was in the config, so
    no_dns: False
had the same effect as
    no_dns: True

Change the check to take the value into consideration.

This makes false-y values like False (from YAML) and empty string
(from environment) work as if the value was not specified.
2013-12-10 15:42:33 +01:00