PowerToys/.github/actions
Koh Jun Dong efa09182d3
[PTRun][URL]Fix web link with ports support (#19809)
* [PT Run] Fix web link with ports support (#14260)

* URL in the format of `domain:port` now directs to default browser

* Add tests to verify web link with ports scenario

* Fix test case and scenario where mismatching schema and port for IPv6 does not result in correct output

* [PT Run][Tests] Change and add more UriParser Tests

* Specifically of note is line 56, where [IPv6]:80 diverts to https instead of http.

* [PT Run][Tests] Add UriParser tests

* Add more tests targeting port handling

* [PT Run] Fix http handling

* This also fixes oddity with IPv4 and IPv6 handling

* [PT Run] Add second results depending on condition

* Test: update all test to reflect updated functions & add a little more tests

* Update function to show two results when URI is in the format of `domain:port` (situation where it can also be `schema:path`)

* Update regex style to follow previous code

* [PT Run] Change tests and filter localhost from certain results

* Add tests for 127.0.0.1, localhost, and ::1

* Move test around into more logical arrangement

* Filter localhost out from showing double results

* [PT Run] Fix spelling on comments

* [PT Run] Add some words to expect.txt

* [PT Toys] Clarify comment regarding [::]

Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>

* [PT Run] Remove tests regarding tel protocol

* [PT Run] Clarify UriParser parameter

* [PT Run] Add UriParser tests for tel protocol

* Current code has a regression bug where tel:xxxx, if xxxx is more than 65536 it will break. Will fix in follow up commit.

* [PT Run] Refactor ExtendedUriParser and its tests

* Remove `isWebUri` from ExtendedUriParser, keeping only webUri and systemUri

* Tel protocol regression bug still exists

* [PT Run] Fix wrong icon when webUri result

* [PT Run] Fix regression bug for tel protocol

* Tel protocol will sometimes bug out when tel:xxxx if xxxxx is more than 65535, as UriBuilder will throw error thinking the port number has been exceeded

* [PT Toy] Fix tel test

* [PT Run] Changes to tests

* Add test for application uri to include ports, for all non-protocol, http and https variants

* Rearrange some more test to make more logical sense, and add comments

* [PT Run] Simplify code

* Move webUri and systemUri to be global, as per htcfreek's recommendation

* Add comment to empty catch

* Change null to default

* [PT Toy] Update test name

Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>

* [PT Toy] Change result prompt when empty string

* [PT Toy] Fix typo in comment

* [PT Toy] Simplify line

* [PT Toy] Change result prompt when empty string
2022-08-11 17:04:39 +01:00
..
spell-check [PTRun][URL]Fix web link with ports support (#19809) 2022-08-11 17:04:39 +01:00