Skip to content

Commit a9a60ff

Browse files
committed
chore: update e2e tests
1 parent 971ef47 commit a9a60ff

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

cypress/fixtures/blazor-starter/staticwebapp.config.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
"route": "/redirect/*",
1515
"redirect": "/index2.html"
1616
},
17+
{
18+
"route": "/redirect/*/invalid",
19+
"statusCode": 418
20+
},
1721
{
1822
"route": "/*.google",
1923
"redirect": "https://www.google.com/"

cypress/fixtures/static/staticwebapp.config.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
"route": "/redirect/*",
1515
"redirect": "/index2.html"
1616
},
17+
{
18+
"route": "/redirect/*/invalid",
19+
"statusCode": 418
20+
},
1721
{
1822
"route": "/*.google",
1923
"redirect": "https://www.google.com/"

cypress/integration/route-rules.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ context("route rules engine", { failOnStatusCode: false, defaultCommandTimeout:
9797
});
9898
});
9999

100+
it("/redirect/*/invalid should not matched (invalid wildcard position)", () => {
101+
cy.request("http://0.0.0.0:1234/redirect/foo/invalid").should((response) => {
102+
expect(response.status).to.eq(200);
103+
});
104+
});
105+
100106
it("/*.{jpg} matches extension", () => {
101107
cy.request({
102108
url: "http://0.0.0.0:1234/thing.jpg",

0 commit comments

Comments
 (0)