Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
redirect
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
redirect
Merge requests
!4
Added tests for Clear all 404 log entries button.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Added tests for Clear all 404 log entries button.
issue/redirect-2922444:2922444-remove-all-404
into
8.x-1.x
Overview
4
Commits
4
Pipelines
0
Changes
2
1 unresolved thread
Hide all comments
Merged
Joshua Sedler
requested to merge
issue/redirect-2922444:2922444-remove-all-404
into
8.x-1.x
4 years ago
Overview
4
Commits
4
Pipelines
0
Changes
2
1 unresolved thread
Hide all comments
Expand
Closes
#2922444
2
0
Merge request reports
Compare
8.x-1.x
version 6
3f5c4ad2
3 years ago
version 5
3efccce0
3 years ago
version 4
11128d6e
3 years ago
version 3
193e4a25
4 years ago
version 2
cb8e776d
4 years ago
version 1
1915330c
4 years ago
8.x-1.x (base)
and
latest version
latest version
3f5c4ad2
4 commits,
3 years ago
version 6
3f5c4ad2
4 commits,
3 years ago
version 5
3efccce0
4 commits,
3 years ago
version 4
11128d6e
4 commits,
3 years ago
version 3
193e4a25
3 commits,
4 years ago
version 2
cb8e776d
2 commits,
4 years ago
version 1
1915330c
1 commit,
4 years ago
2 files
+
52
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
modules/redirect_404/tests/src/Functional/Fix404RedirectUITest.php
+
39
−
0
Options
@@ -193,4 +193,43 @@ class Fix404RedirectUITest extends Redirect404TestBase {
$this
->
assertSession
()
->
fieldValueEquals
(
'ignore_pages'
,
"/node/*
\r\n
/term/*
\n
/llama_page"
);
}
/**
* Tests the test_404_reset_submit button to remove all 404 entries.
*/
public
function
test404ResetSubmit
()
{
// Go to non-existing paths:
$this
->
drupalGet
(
'non-existing0'
);
$this
->
drupalGet
(
'non-existing0?test=1'
);
$this
->
drupalGet
(
'non-existing0?test=2'
);
$this
->
drupalGet
(
'non-existing1'
);
$this
->
drupalGet
(
'non-existing2'
);
// Go to the "Fix 404" page and check wheter these 404 entries exist:
$this
->
drupalGet
(
'admin/config/search/redirect/404'
);
$this
->
assertText
(
'non-existing0?test=1'
);
$this
->
assertText
(
'non-existing0?test=2'
);
$this
->
assertText
(
'non-existing0'
);
$this
->
assertText
(
'non-existing1'
);
$this
->
assertText
(
'non-existing2'
);
// Go to the "Settings" page, press the "Clear all 404 log entries" button:
$this
->
drupalGet
(
'admin/config/search/redirect/settings'
);
$this
->
assertElementPresent
(
'#edit-reset-404'
);
$this
->
getSession
()
->
getPage
()
->
pressButton
(
'Clear all 404 log entries'
);
// Go to the "Fix 404" page and check wheter these 404 entries DO NOT exist:
$this
->
drupalGet
(
'admin/config/search/redirect/404'
);
$this
->
assertNoText
(
'non-existing0?test=1'
);
$this
->
assertNoText
(
'non-existing0?test=2'
);
$this
->
assertNoText
(
'non-existing0'
);
$this
->
assertNoText
(
'non-existing1'
);
$this
->
assertNoText
(
'non-existing2'
);
// Ensure new 404 entries are created after clearing:
$this
->
drupalGet
(
'non-existing0'
);
$this
->
drupalGet
(
'non-existing0?test=1'
);
// Go to the "Fix 404" page and check wheter these 404 entries exist:
$this
->
drupalGet
(
'admin/config/search/redirect/404'
);
$this
->
assertText
(
'non-existing0'
);
$this
->
assertText
(
'non-existing0?test=1'
);
}
}
Loading