-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lomiri.lomiri-schemas: 0.1.5 -> 0.1.6 (#370966)
- Loading branch information
Showing
7 changed files
with
335 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
196 changes: 196 additions & 0 deletions
196
...-browser/1001-morph-browser-tst_AddressBar-Replace-wait-and-compare-with-tryCompare.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,196 @@ | ||
From 9c4cd4fa938244cc2e319555d372e4e32029964a Mon Sep 17 00:00:00 2001 | ||
From: OPNA2608 <[email protected]> | ||
Date: Tue, 14 Jan 2025 23:06:20 +0100 | ||
Subject: [PATCH] tests/unittests/qml/tst_AddressBar.qml: Replace wait + | ||
compare with tryCompare | ||
|
||
--- | ||
tests/unittests/qml/tst_AddressBar.qml | 75 +++++++++++--------------- | ||
1 file changed, 30 insertions(+), 45 deletions(-) | ||
|
||
diff --git a/tests/unittests/qml/tst_AddressBar.qml b/tests/unittests/qml/tst_AddressBar.qml | ||
index 5c27acff..dc0ec4c6 100644 | ||
--- a/tests/unittests/qml/tst_AddressBar.qml | ||
+++ b/tests/unittests/qml/tst_AddressBar.qml | ||
@@ -73,6 +73,15 @@ Item { | ||
name: "AddressBar" | ||
when: windowShown | ||
|
||
+ function verifyAddressBarText(text) { | ||
+ tryCompare(addressBar, "text", text) | ||
+ } | ||
+ | ||
+ function typeStringAndVerify(text) { | ||
+ typeString(text) | ||
+ verifyAddressBarText(text) | ||
+ } | ||
+ | ||
function init() { | ||
addressBar.actualUrl = "" | ||
validatedSpy.clear() | ||
@@ -101,9 +110,7 @@ Item { | ||
} | ||
|
||
function test_validUrlShouldNotBeRewritten(data) { | ||
- typeString(data.url) | ||
- wait(500) | ||
- compare(addressBar.text, data.url) | ||
+ typeStringAndVerify(data.url) | ||
keyClick(Qt.Key_Return) | ||
validatedSpy.wait() | ||
compare(addressBar.requestedUrl, data.url) | ||
@@ -120,9 +127,7 @@ Item { | ||
} | ||
|
||
function test_urlWithoutSchemeShouldBeRewritten(data) { | ||
- typeString(data.text) | ||
- wait(500) | ||
- compare(addressBar.text, data.text) | ||
+ typeStringAndVerify(data.text) | ||
keyClick(Qt.Key_Return) | ||
validatedSpy.wait() | ||
compare(addressBar.requestedUrl, data.requestedUrl) | ||
@@ -137,9 +142,7 @@ Item { | ||
} | ||
|
||
function test_leadingAndTrailingWhitespacesShouldBeTrimmed(data) { | ||
- typeString(data.text) | ||
- wait(500) | ||
- compare(addressBar.text, data.text) | ||
+ typeStringAndVerify(data.text) | ||
keyClick(Qt.Key_Return) | ||
validatedSpy.wait() | ||
compare(addressBar.requestedUrl, data.requestedUrl) | ||
@@ -153,9 +156,7 @@ Item { | ||
} | ||
|
||
function test_searchQueryShouldBeRewritten(data) { | ||
- typeString(data.text) | ||
- wait(500) | ||
- compare(addressBar.text, data.text) | ||
+ typeStringAndVerify(data.text) | ||
keyClick(Qt.Key_Return) | ||
validatedSpy.wait() | ||
compare(addressBar.requestedUrl.toString().indexOf(data.start), 0) | ||
@@ -174,9 +175,7 @@ Item { | ||
} | ||
|
||
function test_htmlEntitiesShouldBeEscapedInSearchQueries(data) { | ||
- typeString(data.text) | ||
- wait(500) | ||
- compare(addressBar.text, data.text) | ||
+ typeStringAndVerify(data.text) | ||
keyClick(Qt.Key_Return) | ||
validatedSpy.wait() | ||
verify(addressBar.requestedUrl.toString().indexOf("q=" + data.escaped) > 0) | ||
@@ -191,9 +190,7 @@ Item { | ||
} | ||
|
||
function test_uppercaseDomainsShouldBeRewritten(data) { | ||
- typeString(data.text) | ||
- wait(500) | ||
- compare(addressBar.text, data.text) | ||
+ typeStringAndVerify(data.text) | ||
keyClick(Qt.Key_Return) | ||
validatedSpy.wait() | ||
compare(addressBar.requestedUrl, data.requestedUrl) | ||
@@ -213,9 +210,7 @@ Item { | ||
} | ||
|
||
function test_uppercaseSchemeShouldBeRewritten(data) { | ||
- typeString(data.text) | ||
- wait(500) | ||
- compare(addressBar.text, data.text) | ||
+ typeStringAndVerify(data.text) | ||
keyClick(Qt.Key_Return) | ||
validatedSpy.wait() | ||
compare(addressBar.requestedUrl, data.requestedUrl) | ||
@@ -266,9 +261,7 @@ Item { | ||
} | ||
|
||
function test_urlShouldBeSimplifiedWhenUnfocused(data) { | ||
- typeString(data.input) | ||
- wait(500) | ||
- compare(addressBar.text, data.input) | ||
+ typeStringAndVerify(data.input) | ||
keyClick(Qt.Key_Return) | ||
validatedSpy.wait() | ||
addressBar.actualUrl = addressBar.requestedUrl | ||
@@ -289,9 +282,7 @@ Item { | ||
|
||
function test_clickingWhenUnfocusedShouldSelectAll() { | ||
var url = "http://example.org/" | ||
- typeString(url) | ||
- wait(500) | ||
- compare(addressBar.text, url) | ||
+ typeStringAndVerify(url) | ||
addressBar.actualUrl = url | ||
clickItem(textInput) | ||
verify(!addressBar.activeFocus) | ||
@@ -301,9 +292,7 @@ Item { | ||
|
||
function test_clickingWhenFocusedShouldDeselectText() { | ||
var url = "http://example.org/" | ||
- typeString(url) | ||
- wait(500) | ||
- compare(addressBar.text, url) | ||
+ typeStringAndVerify(url) | ||
addressBar.actualUrl = url | ||
clickItem(textInput) | ||
verify(!addressBar.activeFocus) | ||
@@ -316,9 +305,7 @@ Item { | ||
|
||
function test_clickingActionButtonWhenUnfocusedShouldNotSelectAll() { | ||
var url = "http://example.org/" | ||
- typeString(url) | ||
- wait(500) | ||
- compare(addressBar.text, url) | ||
+ typeStringAndVerify(url) | ||
clickItem(textInput) | ||
verify(!addressBar.activeFocus) | ||
clickItem(addressBar.__actionButton) | ||
@@ -355,31 +342,29 @@ Item { | ||
} | ||
|
||
function test_unfocusingWhileEditingShouldResetUrl() { | ||
- var url = "http://example.org/" | ||
- typeString(url) | ||
- wait(500) | ||
- compare(addressBar.text, url) | ||
+ var host = "example.org" | ||
+ var url = "http://" + host + "/" | ||
+ typeStringAndVerify(url) | ||
addressBar.actualUrl = url | ||
var clearButton = findChild(addressBar, "clear_button") | ||
verify(clearButton != null) | ||
clickItem(clearButton) | ||
- compare(addressBar.text, "") | ||
+ verifyAddressBarText("") | ||
clickItem(textInput) | ||
- compare(addressBar.text, "example.org") | ||
+ verifyAddressBarText(host) | ||
clickItem(addressBar) | ||
- compare(addressBar.text, url) | ||
+ verifyAddressBarText(url) | ||
} | ||
|
||
function test_exitingFindInPageRestoresUrl() { | ||
- addressBar.actualUrl = "http://example.org/" | ||
+ var host = "example.org" | ||
+ addressBar.actualUrl = "http://" + host + "/" | ||
addressBar.findInPageMode = true | ||
verify(addressBar.activeFocus) | ||
compare(addressBar.text, "") | ||
- typeString("hello") | ||
- wait(500) | ||
+ typeStringAndVerify("hello") | ||
addressBar.findInPageMode = false | ||
- wait(500) | ||
- compare(addressBar.text, "example.org") | ||
+ verifyAddressBarText(host) | ||
} | ||
} | ||
} | ||
-- | ||
2.47.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.