-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding in tests and report creation button #1
base: plat-59
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,34 @@ | |||
<?php | |||
|
|||
class ExternalLinks extends FunctionalTest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be named "ExternalLinksTest"
A problem I've come across is that CheckExternalLinksJob will always run every link on every page when 'process' is called. This means that if the execution fails, each time this job restarts it will start execution from the beginning. If you look at the version I started working on, the job will process one Page object at a time, which means that any errors between pages are recoverable in case of error. https://github.com/tractorcow/externallinks/blob/pulls/damo/code/jobs/CheckExternalLinksJob.php#L92 |
|
||
|
||
public function createQueuedReport() { | ||
if (!Permission::check('ADMIN')) return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are users that aren't admins but are able to view reports.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this class is fine overall though. :) Maybe it just needs a new permission (can check links?) and only display that button in the CMS if the user has that permission.
Overall it's good work. :) Just needs a few tweaks IMO and it's there. Do you mind if we fork this to ss-labs once this is merged? |
Fix javascript errors starting the job
Make sure that process yields to queuedjobs after each page
…he latest report" This reverts commit f55a650.
API Add description for response code to report
No description provided.