Skip to content

Commit

Permalink
Fix #481: Integration Test URLEncode UI resources
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Aug 16, 2023
1 parent 8d5bd50 commit 5dcb38d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ public class QuinoaUIAngularTest {
@TestHTTPResource("/bar/foo/api/quinoa")
URL api;

@TestHTTPResource("/image with spaces.svg")
URL imageWithSpaces;

@Test
public void testUIIndex() {
checkUrl(index);
Expand All @@ -64,6 +67,18 @@ private void checkUrl(URL url) {
Assertions.assertEquals("Hello Quinoa", greeting);
}

/**
* Test an image with spaces "a b.png" get encoded "a%20b.png".
*
* @see <a href="https://github.com/quarkiverse/quarkus-quinoa/issues/481">GitHub Issue 481</a>
*/
@Test
public void testUIEncodedPath() {
final Page page = context.newPage();
Response response = page.navigate(imageWithSpaces.toString());
Assertions.assertEquals("OK", response.statusText());
}

@Test
public void test404Endpoint() {
given()
Expand Down

0 comments on commit 5dcb38d

Please sign in to comment.