-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/better 404 page handling (#189)
* chore: spa-config -> ilc-config * feat: support of the "'ilc:404'" event * doc: related doc update * doc: Updated E2E tests launch instruction * chore: updated default SSR timeout for news app, solves issue with 1st loading error * chore: check of the errors during npm install
- Loading branch information
Showing
26 changed files
with
595 additions
and
167 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,83 @@ | ||
Feature('404'); | ||
Feature('404 error handling'); | ||
|
||
Scenario('should show 404 error page', (I) => { | ||
//region 404 page for non-existing ILC route | ||
Scenario('Renders (SSR) global 404 page for non-existing ILC route', (I) => { | ||
I.amOnPage('/nonexistent-path'); | ||
I.waitForText('404 not found', 10, 'body > div#body'); | ||
}); | ||
Scenario('Renders (CSR) global 404 page for non-existing ILC route', (I, peoplePage) => { | ||
const notFoundPageLink = '#navbar a[href="/nosuchpath"]'; | ||
|
||
I.amOnPage(peoplePage.peopleUrl); | ||
I.waitForElement(notFoundPageLink, 30); | ||
I.click(notFoundPageLink); | ||
I.waitForText('404 not found', 10, 'body > div#body'); | ||
}); | ||
//endregion 404 page for non-existing ILC route | ||
|
||
//region 404 page for non-existing News app route | ||
Scenario('Renders (SSR) global 404 page for non-existing News app route', (I, newsPage: newsPage) => { | ||
I.amOnPage(newsPage.url.nonExistingRoute); | ||
I.waitForText('404 not found', 10, 'body > div#body'); | ||
}); | ||
|
||
Scenario('Renders (CSR) global 404 page for non-existing News app route', (I, newsPage: newsPage) => { | ||
I.amOnPage(newsPage.url.main); | ||
I.waitInUrl(newsPage.url.main, 10); | ||
I.waitForElement(newsPage.linkWithUrl(newsPage.url.nonExistingRoute), 10); | ||
I.click(newsPage.linkWithUrl(newsPage.url.nonExistingRoute)); | ||
I.waitForText('404 not found', 10, 'body > div#body'); | ||
|
||
//After 404 page ILC continues normal operation | ||
I.click(newsPage.linkWithUrl(newsPage.url.main)); | ||
I.waitForElement(newsPage.newsSources, 10); | ||
I.see('Pick a news source', newsPage.bannerHeadline); | ||
}); | ||
|
||
Scenario('Renders (SSR) overridden 404 page for non-existing News app route', (I, newsPage: newsPage) => { | ||
I.amOnPage(newsPage.url.nonExistingRouteWithOverride); | ||
I.waitForText('404 not found component', 10, 'body > div#body'); | ||
}); | ||
|
||
Scenario('Renders (CSR) overridden 404 page for non-existing News app route', (I, newsPage: newsPage) => { | ||
I.amOnPage(newsPage.url.main); | ||
I.waitInUrl(newsPage.url.main, 10); | ||
I.waitForElement(newsPage.linkWithUrl(newsPage.url.nonExistingRouteWithOverride), 10); | ||
I.click(newsPage.linkWithUrl(newsPage.url.nonExistingRouteWithOverride)); | ||
I.waitForText('404 not found component', 10, 'body > div#body'); | ||
}); | ||
//endregion 404 page for non-existing News app route | ||
|
||
//region 404 page for non-existing News resource | ||
Scenario('Renders (SSR) global 404 page for non-existing News resource', (I, newsPage: newsPage) => { | ||
I.amOnPage(newsPage.url.nonExistingResource); | ||
I.waitForText('404 not found', 10, 'body > div#body'); | ||
}); | ||
|
||
Scenario('Renders (CSR) global 404 page for non-existing News resource', (I, newsPage: newsPage) => { | ||
I.amOnPage(newsPage.url.main); | ||
I.waitInUrl(newsPage.url.main, 10); | ||
I.waitForElement(newsPage.linkWithUrl(newsPage.url.nonExistingResource), 10); | ||
I.click(newsPage.linkWithUrl(newsPage.url.nonExistingResource)); | ||
I.waitForText('404 not found', 10, 'body > div#body'); | ||
|
||
//After 404 page ILC continues normal operation | ||
I.wait(5); //Hack to fix issue with the Vue Router | ||
I.click(newsPage.linkWithUrl(newsPage.url.main)); | ||
I.waitForElement(newsPage.newsSources, 10); | ||
I.see('Pick a news source', newsPage.bannerHeadline); | ||
}); | ||
|
||
Scenario('Renders (SSR) overridden 404 page for non-existing News resource', (I, newsPage: newsPage) => { | ||
I.amOnPage(newsPage.url.nonExistingResourceWithOverride); | ||
I.waitForText('404 not found component', 10, 'body > div#body'); | ||
}); | ||
|
||
Scenario('Renders (CSR) overridden 404 page for non-existing News resource', (I, newsPage: newsPage) => { | ||
I.amOnPage(newsPage.url.main); | ||
I.waitInUrl(newsPage.url.main, 10); | ||
I.waitForElement(newsPage.linkWithUrl(newsPage.url.nonExistingResourceWithOverride), 10); | ||
I.click(newsPage.linkWithUrl(newsPage.url.nonExistingResourceWithOverride)); | ||
I.waitForText('404 not found component', 10, 'body > div#body'); | ||
}); | ||
//endregion 404 page for non-existing News resource |
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
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.