From 1411c287c59f4618ce20883250d207d6555bb7ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Klinkovsk=C3=BD?= Date: Mon, 22 Aug 2016 21:09:57 +0200 Subject: [PATCH 1/4] qute://settings: set valid type of fields fixes #1883 --- qutebrowser/html/settings.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qutebrowser/html/settings.html b/qutebrowser/html/settings.html index 57a0502ba..0952fe5e8 100644 --- a/qutebrowser/html/settings.html +++ b/qutebrowser/html/settings.html @@ -28,7 +28,7 @@ th pre { color: grey; text-align: left; } {{ d }} (Current: {{ confget(section, d)|truncate(100) }}) - From 9ff945c56f6606b7dab1203a8d3ba05fd22d56b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Klinkovsk=C3=BD?= Date: Fri, 26 Aug 2016 13:45:21 +0200 Subject: [PATCH 2/4] add tests for qute://settings --- tests/end2end/features/set.feature | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tests/end2end/features/set.feature b/tests/end2end/features/set.feature index 6611b7ca0..bf352f178 100644 --- a/tests/end2end/features/set.feature +++ b/tests/end2end/features/set.feature @@ -63,6 +63,31 @@ Feature: Setting settings. Then the following tabs should be open: - qute:settings (active) + @qtwebengine_todo: qute:settings is not implemented yet + Scenario: Focusing input fields in qute://settings and entering valid value + When I open qute://settings + # scroll to the right - the table does not fit in the default screen + And I run :scroll-perc -x 100 + And I hint with args "inputs" and follow a + And I press the key "" + And I press the key "true" + And I press the key "" + # an explicit Tab to unfocus the input field seems to stabilize the tests + And I press the key "" + And I run :set general ignore-case? + Then "general ignore-case = true" should be logged + + @qtwebengine_todo: qute:settings is not implemented yet + Scenario: Focusing input fields in qute://settings and entering invalid value + When I open qute://settings + # scroll to the right - the table does not fit in the default screen + And I run :scroll-perc -x 100 + And I hint with args "inputs" and follow a + And I press the key "" + And I press the key "foo" + And I press the key "" + Then "invalid value 'foo' *" should be logged + Scenario: Empty option with ? (issue 1109) When I run :set general ? Then the error "set: The following arguments are required: value" should be shown From b272fce2cf5dee368ad92abed8a5b225debcc0f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Klinkovsk=C3=BD?= Date: Fri, 26 Aug 2016 15:33:21 +0200 Subject: [PATCH 3/4] fix test for setting an invalid value via qute://settings --- tests/end2end/features/set.feature | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/end2end/features/set.feature b/tests/end2end/features/set.feature index bf352f178..92150e079 100644 --- a/tests/end2end/features/set.feature +++ b/tests/end2end/features/set.feature @@ -86,7 +86,9 @@ Feature: Setting settings. And I press the key "" And I press the key "foo" And I press the key "" - Then "invalid value 'foo' *" should be logged + # an explicit Tab to unfocus the input field seems to stabilize the tests + And I press the key "" + Then "Invalid value 'foo' *" should be logged Scenario: Empty option with ? (issue 1109) When I run :set general ? From 1c0cbc326936478579eb23452efa8266e9e0c529 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 29 Aug 2016 07:08:57 +0200 Subject: [PATCH 4/4] Improve qute:settings tests --- tests/end2end/features/set.feature | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/end2end/features/set.feature b/tests/end2end/features/set.feature index 92150e079..94594639d 100644 --- a/tests/end2end/features/set.feature +++ b/tests/end2end/features/set.feature @@ -65,17 +65,18 @@ Feature: Setting settings. @qtwebengine_todo: qute:settings is not implemented yet Scenario: Focusing input fields in qute://settings and entering valid value - When I open qute://settings + When I set general -> ignore-case to false + And I open qute://settings # scroll to the right - the table does not fit in the default screen And I run :scroll-perc -x 100 And I hint with args "inputs" and follow a + And I wait for "Entering mode KeyMode.insert *" in the log And I press the key "" - And I press the key "true" + And I press the keys "true" And I press the key "" # an explicit Tab to unfocus the input field seems to stabilize the tests And I press the key "" - And I run :set general ignore-case? - Then "general ignore-case = true" should be logged + Then general -> ignore-case should be true @qtwebengine_todo: qute:settings is not implemented yet Scenario: Focusing input fields in qute://settings and entering invalid value @@ -83,8 +84,9 @@ Feature: Setting settings. # scroll to the right - the table does not fit in the default screen And I run :scroll-perc -x 100 And I hint with args "inputs" and follow a + And I wait for "Entering mode KeyMode.insert *" in the log And I press the key "" - And I press the key "foo" + And I press the keys "foo" And I press the key "" # an explicit Tab to unfocus the input field seems to stabilize the tests And I press the key ""