Skip to content
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

Add single error url page #1418

Merged
merged 93 commits into from Sep 21, 2018
Merged
Changes from 1 commit
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
e616a08
Begin prototype for single error URL post.php page
kienstra Sep 6, 2018
f809c3d
Output a search box, though it will need to move above the 'Status' box
kienstra Sep 6, 2018
469d3d2
Refactor simple anonymous function into method with PHPUnit test
kienstra Sep 7, 2018
93b4f26
Create method get_terms_per_page()
kienstra Sep 7, 2018
d91786d
Add a unit test for parse_post_php_term_query()
kienstra Sep 7, 2018
96141eb
Remove print_validation_errors_meta_box(), though might borrow some l…
kienstra Sep 7, 2018
7d501f0
Move template list table into method
kienstra Sep 7, 2018
500a6f5
Add unit test for render_single_url_list_table
kienstra Sep 8, 2018
9446f68
Merge branch 'develop' into add/1365-single-error-url
kienstra Sep 10, 2018
37e29f6
Reorder methods, add example URLs to DocBlock
kienstra Sep 10, 2018
9adc5d4
Output the error type in that column
kienstra Sep 10, 2018
67955cb
Allow filtering the single error page by type
kienstra Sep 10, 2018
b8d8459
Add the <tr> with 'Showing 4 of x validation errors' at the top of th…
kienstra Sep 10, 2018
e8e7906
Use dynamic values and translated text for the 'Showing errors' text
kienstra Sep 11, 2018
2473214
If there are no errors to show, do not display this message
kienstra Sep 11, 2018
838c393
Allow searching for errors
kienstra Sep 11, 2018
6324b34
Minor DocBlock improvements
kienstra Sep 11, 2018
aef6e05
Instead of adding the taxonomy as a query var, add it to $_REQUEST
kienstra Sep 11, 2018
9aaffdf
Correct failed unit test, updating with latest change
kienstra Sep 11, 2018
834b141
Remove PHP logic for displaying search term(s), change number of post…
kienstra Sep 11, 2018
c4ed164
Remove PHP logic to support filtering and searching
kienstra Sep 11, 2018
4a1e7f0
Filter the errors by type, using JavaScript
kienstra Sep 11, 2018
a552168
Address Travis error by removing empty line
kienstra Sep 11, 2018
3fe3ffa
Match text formatting of the desings for the 'Error' and 'Details' co…
kienstra Sep 12, 2018
d9c7113
Apply the design for the link at the top of the page
kienstra Sep 12, 2018
67530a4
Move 'Last checked' UI above 'Recheck' button
kienstra Sep 12, 2018
af06e79
Move 'Last checked' UI lower, to match designs
kienstra Sep 12, 2018
b5c1fb9
Add <select> element in the status column, reusing previous <select> …
kienstra Sep 13, 2018
0b02674
Merge branch 'develop' into add/1365-single-error-url
kienstra Sep 13, 2018
66e3a6f
Merge in develop, resolve conflicts
kienstra Sep 13, 2018
384be89
Change 'Identified' to 'New', update another unit test
kienstra Sep 13, 2018
fb57681
Remove the 'Apply Filter' button, and update the errors on simply cha…
kienstra Sep 13, 2018
4a1e21c
Add and support 'Accept' and 'Reject' buttons for bulk actions
kienstra Sep 14, 2018
9d301f2
Address the Travis error, by changing the class to Exception
kienstra Sep 14, 2018
ebddc40
Update styling for the 'Accept' and 'Reject' buttons
kienstra Sep 14, 2018
a364758
Use the 'Accepted' icon in the post meta box
kienstra Sep 14, 2018
1a282b7
Merge branch 'develop' into add/1365-single-error-url
kienstra Sep 14, 2018
bca2650
Apply John's work with sortable columns
kienstra Sep 14, 2018
589b92f
Add the callback that enables ordering to the single URL page
kienstra Sep 14, 2018
7936fab
Change the page header to match the design
kienstra Sep 16, 2018
2fa80f6
Merge branch 'develop' into add/1365-single-error-url
jacobschweitzer Sep 18, 2018
fbabf80
Single error URL page - add expanded details view
johnwatkins0 Sep 19, 2018
3ca22ee
Merge branch 'add/1365-single-error-url' of https://github.com/Automa…
johnwatkins0 Sep 19, 2018
6d9d60a
Fixes after merge and small style imnprovements
johnwatkins0 Sep 19, 2018
d4307a7
Reuse the existing logic to render the 'Sources' column
kienstra Sep 19, 2018
5d52bf0
Apply existing styling to the 'Sources' column
kienstra Sep 19, 2018
b4d4d60
Apply the existing icons to the 'Status' column
kienstra Sep 19, 2018
02bc366
Address failed Travis builds
kienstra Sep 19, 2018
8edf16e
Display the 'AMP Enabled' status in the post meta box
kienstra Sep 19, 2018
957bb3f
Improve styling of 'AMP enabled' icon
kienstra Sep 19, 2018
9878448
Change the status icon as the user chooses a status from the <select>
kienstra Sep 19, 2018
3d63291
Fix an issue in switching back to 'New' status
kienstra Sep 19, 2018
8b2c568
Restore logic to 'Preview Changes'
kienstra Sep 19, 2018
f80b5e2
Merge branch 'develop' into add/1365-single-error-url
kienstra Sep 19, 2018
1b4c43c
Remove a reference to the constant VALIDATION_DETAILS_NODE_NAME_QUERY…
kienstra Sep 19, 2018
19fc70d
Implement inline actions, like 'Accept' and 'Reject'.
kienstra Sep 19, 2018
e09db3d
Edit some DocBlocks, remove dom-ready from webpack.config.js
kienstra Sep 19, 2018
738f2ad
Implement a basic JS search for errrors, using the 'Details' column
kienstra Sep 19, 2018
bdf411e
Fix an issue in passing the wrong argument to handle_validation_error…
kienstra Sep 19, 2018
c8807bd
Use intval() in sanitization, check that ! empty()
kienstra Sep 19, 2018
2d3f30e
Fix more escaping, like using intval()
kienstra Sep 19, 2018
9cafbeb
Instead of a boolean flag, use an array of arguments
kienstra Sep 19, 2018
4829932
Remove default argument value, add a check for ! event.target.value
kienstra Sep 19, 2018
00c11dd
Move styling from JSS to CSS
kienstra Sep 19, 2018
2c1c140
If all of the rows are showing, hide the notice
kienstra Sep 19, 2018
4875775
Merge in develop, resolve merge conflict
kienstra Sep 20, 2018
029b986
Add a 'Show all' button to display all errors
kienstra Sep 20, 2018
0da5582
Output the sources is the expandable 'Error' section
kienstra Sep 20, 2018
e7b194f
Address Travis error by moving parameter name 2 spaces to the right
kienstra Sep 20, 2018
03cd2a8
On clicking 'Show all,' change the error type <select> to 'All Error …
kienstra Sep 20, 2018
756b884
Change 'Reject' icon to red
kienstra Sep 20, 2018
9074772
Only display the 'Accept' and 'Reject' bulk action buttons if a check…
kienstra Sep 20, 2018
5965fee
Fix styling issue in 'Accept' and 'Reject' buttons, remove dead code
kienstra Sep 20, 2018
731f313
Rename CSS file to reflect that it applies to the whole page
kienstra Sep 20, 2018
f2b62e8
Fix undefined index notices related to queried_object meta missing
westonruter Sep 20, 2018
8e427d7
On clicking 'Show all', still show the notice with the count
kienstra Sep 20, 2018
9db69ee
Prevent showing the 'Invalid URL' page header before it's overwritten…
kienstra Sep 20, 2018
b6695c3
Update Accept/Reject buttons to update select dropdown, not submit form.
westonruter Sep 20, 2018
75f128f
When all of the errors are displaying, hide the notice
kienstra Sep 20, 2018
505a42e
Because the show all button might be newly created, do a new query fo…
kienstra Sep 20, 2018
2ba31f9
Fix presentation of toggle button in narrower screen resolutions
westonruter Sep 20, 2018
818259e
Commit changes in order to merge remote
johnwatkins0 Sep 21, 2018
5f15604
Merge branch 'develop' of https://github.com/Automattic/amp-wp into a…
westonruter Sep 21, 2018
aa21e14
Single error view - add toggle all button for sources column
johnwatkins0 Sep 21, 2018
b28875c
Merge remote and resolve conflicts
johnwatkins0 Sep 21, 2018
5b7c2e0
Merge develop into add/1365-single-error-url
johnwatkins0 Sep 21, 2018
39cb830
Single error view - remove debug statement
johnwatkins0 Sep 21, 2018
f0668f7
Validation - tooltip fixes
johnwatkins0 Sep 21, 2018
da5169b
Validation - PHPCS fixes
johnwatkins0 Sep 21, 2018
3dce980
Validation - PHPCS fixes
johnwatkins0 Sep 21, 2018
8d603f4
Validation PHPUnit - restore removed line in test
johnwatkins0 Sep 21, 2018
d5b3a42
Don't show the 'Reject' and 'Accept' action links on the single URL p…
kienstra Sep 21, 2018
f0677bf
Set document title in addition to the heading
westonruter Sep 21, 2018
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.
+97 −69
Diff settings

Always

Just for now

Update Accept/Reject buttons to update select dropdown, not submit form.

* Remove unnecessary nested posts-filter form.
* Use let/const instead of var.
  • Loading branch information...
westonruter committed Sep 20, 2018
commit b6695c36feeead5ffcd0a070358e417f392156e0
@@ -40,31 +40,42 @@ var ampInvalidUrlPostEditScreen = ( function() { // eslint-disable-line no-unuse
component.handleFiltering();
component.handleSearching();
component.handleStatusChange();
component.handleBulkActionCheckboxes();
component.handleBulkActions();
component.changeHeading();
component.watchForUnsavedChanges();
};

/**
* Add prompt when leaving page due to unsaved changes.
*/
component.addBeforeUnloadPrompt = function addBeforeUnloadPrompt() {
if ( component.beforeUnloadPromptAdded ) {
return;
}
window.addEventListener( 'beforeunload', component.onBeforeUnload );

// Remove prompt when clicking trash or update.
document.querySelector( '#major-publishing-actions' ).addEventListener( 'click', function() {
window.removeEventListener( 'beforeunload', component.onBeforeUnload );
} );

component.beforeUnloadPromptAdded = true;
};

/**
* Watch for unsaved changes.
*
* Add an beforeunload warning when attempting to leave the page when there are unsaved changes,
* unless the user is pressing the trash link or update button.
*/
component.watchForUnsavedChanges = function watchForUnsavedChanges() {
var onChange = function( event ) {
const onChange = function( event ) {
if ( event.target.matches( 'select' ) ) {
document.getElementById( 'amp_validation_errors' ).removeEventListener( 'change', onChange );

window.addEventListener( 'beforeunload', component.onBeforeUnload );

// Remove prompt when clicking trash or update.
document.querySelector( '#major-publishing-actions' ).addEventListener( 'click', function() {
window.removeEventListener( 'beforeunload', component.onBeforeUnload );
} );
document.getElementById( 'post' ).removeEventListener( 'change', onChange );
component.addBeforeUnloadPrompt();
}
};
document.getElementById( 'amp_validation_errors' ).addEventListener( 'change', onChange );
document.getElementById( 'post' ).addEventListener( 'change', onChange );
};

/**
@@ -87,9 +98,9 @@ var ampInvalidUrlPostEditScreen = ( function() { // eslint-disable-line no-unuse
* @param {number} totalErrors - The total number of errors, displaying or not.
*/
component.updateShowingErrorsRow = function updateShowingErrorsRow( numberErrorsDisplaying, totalErrors ) {
var thead, tr, th,
showAllButton = document.getElementById( component.showAllId ),
theadQuery = document.getElementsByTagName( 'thead' );
const showAllButton = document.getElementById( component.showAllId );
let thead, tr, th;
const theadQuery = document.getElementsByTagName( 'thead' );

// Only create the <tr> if it does not exist yet.
if ( theadQuery[ 0 ] && ! document.getElementById( component.idNumberErrors ) ) {
@@ -121,8 +132,8 @@ var ampInvalidUrlPostEditScreen = ( function() { // eslint-disable-line no-unuse
* Conditionally creates and appends a 'Show all' button.
*/
component.conditionallyCreateShowAllButton = function conditionallyCreateShowAllButton() {
var buttonContainer = document.getElementById( 'url-post-filter' ),
showAllButton = document.getElementById( component.showAllId );
const buttonContainer = document.getElementById( 'url-post-filter' );
let showAllButton = document.getElementById( component.showAllId );

// There is no 'Show all' <button> yet, but there is a container element for it, create the <button>
if ( ! showAllButton && buttonContainer ) {
@@ -139,9 +150,8 @@ var ampInvalidUrlPostEditScreen = ( function() { // eslint-disable-line no-unuse
* Then, it hides this 'Show all' <button> and the notice for the number of errors showing.
*/
component.handleShowAll = function handleShowAll() {
var onClick = function( event ) {
var validationErrors = document.querySelectorAll( '[data-error-type]' );

const onClick = function( event ) {
const validationErrors = document.querySelectorAll( '[data-error-type]' );
if ( ! event.target.matches( '#' + component.showAllId ) ) {
return;
}
@@ -176,18 +186,16 @@ var ampInvalidUrlPostEditScreen = ( function() { // eslint-disable-line no-unuse
* If 'All Error Types' is selected, this displays all errors.
*/
component.handleFiltering = function handleFiltering() {
var onChange = function( event ) {
var errorTypeQuery, isAllErrorTypesSelected,
showAllButton = document.getElementById( component.showAllId ),
numberErrorsDisplaying = 0;

const onChange = function( event ) {
const showAllButton = document.getElementById( component.showAllId );
if ( ! event.target.matches( 'select' ) ) {
return;
}

event.preventDefault();
isAllErrorTypesSelected = ( '-1' === event.target.value );
errorTypeQuery = document.querySelectorAll( '[data-error-type]' );

const isAllErrorTypesSelected = ( '-1' === event.target.value );
const errorTypeQuery = document.querySelectorAll( '[data-error-type]' );

// If the user has chosen 'All Error Types' from the <select>, hide the 'Show all' button.
if ( isAllErrorTypesSelected && showAllButton ) {
@@ -198,8 +206,9 @@ var ampInvalidUrlPostEditScreen = ( function() { // eslint-disable-line no-unuse
* Iterate through all of the <tr> elements in the list table.
* If the error type does not match the value (selected error type), hide them.
*/
let numberErrorsDisplaying = 0;
errorTypeQuery.forEach( function( element ) {
var errorType = element.getAttribute( 'data-error-type' );
const errorType = element.getAttribute( 'data-error-type' );

// If 'All Error Types' was selected, this should display all errors.
if ( isAllErrorTypesSelected || ! event.target.value || event.target.value === errorType ) {
@@ -220,24 +229,22 @@ var ampInvalidUrlPostEditScreen = ( function() { // eslint-disable-line no-unuse
* Handles searching for errors via the <input> and the 'Search Errors' <button>.
*/
component.handleSearching = function handleSearching() {

This comment has been minimized.

Copy link
@kienstra

kienstra Sep 19, 2018

Author Collaborator

This does is a very basic search of the 'Details' column when clicking 'Search Errors,' and it hides all of the rows that don't have the search text.

  • It only searches the 'Details' column
  • If you search something like JavaScript, it won't find javascript

Maybe I should improve this.

var onClick = function( event ) {
var searchQuery, detailsQuery,
numberErrorsDisplaying = 0;

const onClick = function( event ) {
event.preventDefault();
if ( ! event.target.matches( 'input' ) ) {
return;
}

searchQuery = document.getElementById( 'invalid-url-search-search-input' ).value;
detailsQuery = document.querySelectorAll( 'tbody .column-details' );
const searchQuery = document.getElementById( 'invalid-url-search-search-input' ).value;
const detailsQuery = document.querySelectorAll( 'tbody .column-details' );

/*
* Iterate through the 'Details' column of each row.
* If the search query is not present, hide the row.
*/
let numberErrorsDisplaying = 0;
detailsQuery.forEach( function( element ) {
var isSearchQueryPresent = false;
let isSearchQueryPresent = false;

element.querySelectorAll( '.detailed' ).forEach( function( detailed ) {
if ( -1 !== detailed.innerText.indexOf( searchQuery ) ) {
@@ -259,23 +266,29 @@ var ampInvalidUrlPostEditScreen = ( function() { // eslint-disable-line no-unuse
document.getElementById( 'search-submit' ).addEventListener( 'click', onClick );
};

/**
* Update icon for select element.
*
* @param {HTMLSelectElement} select Select element.
*/
component.updateSelectIcon = function updateSelectIcon( select ) {
const newOption = select.options[ select.selectedIndex ];
if ( newOption ) {
const iconSrc = newOption.getAttribute( 'data-status-icon' );
select.parentNode.querySelector( 'img' ).setAttribute( 'src', iconSrc );
}
};

/**
* Handles a change in the error status, like from 'New' to 'Accepted'.
*
* Gets the data-status-icon value from the newly-selected <option>.
* And sets this as the src of the status icon <img>.
*/
component.handleStatusChange = function handleStatusChange() {
var onChange = function( event ) {
var newOption, iconSrc;
if ( ! event.target.matches( 'select' ) ) {
return;
}

newOption = event.target.options[ event.target.selectedIndex ];
if ( newOption ) {
iconSrc = newOption.getAttribute( 'data-status-icon' );
event.target.parentNode.querySelector( 'img' ).setAttribute( 'src', iconSrc );
const onChange = function( event ) {
if ( event.target.matches( 'select' ) ) {
component.updateSelectIcon( event.target );
}
};

@@ -285,16 +298,17 @@ var ampInvalidUrlPostEditScreen = ( function() { // eslint-disable-line no-unuse
};

/**
* On checking a bulk action checkbox, this ensures that the 'Accept' and 'Reject' buttons are present.
* On checking a bulk action checkbox, this ensures that the 'Accept' and 'Reject' buttons are present. Handle clicking on buttons.
*
* They're hidden until one of these boxes is checked.
* Also, on unchecking the last checked box, this hides these buttons.
*/
component.handleBulkActionCheckboxes = function handleStatusChange() {
var onChange = function( event ) {
var areThereCheckedBoxes,
acceptButton = document.querySelector( '[value=amp_validation_error_accept' ),
rejectButton = document.querySelector( '[value=amp_validation_error_reject' );
component.handleBulkActions = function handleBulkActions() {
const acceptButton = document.querySelector( 'button.action.accept' );
const rejectButton = document.querySelector( 'button.action.reject' );

const onChange = function( event ) {
let areThereCheckedBoxes;

if ( ! event.target.matches( '[type=checkbox]' ) ) {
return;
@@ -326,13 +340,35 @@ var ampInvalidUrlPostEditScreen = ( function() { // eslint-disable-line no-unuse
document.querySelectorAll( '.check-column [type=checkbox]' ).forEach( function( element ) {
element.addEventListener( 'change', onChange );
} );

// Handle click on accept button.
acceptButton.addEventListener( 'click', function() {
Array.prototype.forEach.call( document.querySelectorAll( 'select.amp-validation-error-status' ), function( select ) {
if ( select.closest( 'tr' ).querySelector( '.check-column input[type=checkbox]' ).checked ) {
select.value = 1;
component.updateSelectIcon( select );
component.addBeforeUnloadPrompt();
}
} );
} );

// Handle click on reject button.
rejectButton.addEventListener( 'click', function() {
Array.prototype.forEach.call( document.querySelectorAll( 'select.amp-validation-error-status' ), function( select ) {
if ( select.closest( 'tr' ).querySelector( '.check-column input[type=checkbox]' ).checked ) {
select.value = 2; // @todo Update to 3 when merging with <https://github.com/Automattic/amp-wp/pull/1429>.
component.updateSelectIcon( select );
component.addBeforeUnloadPrompt();
}
} );
} );
};

/**
* Changes the page heading, as this doesn't look to be possible with a PHP filter.
*/
component.changeHeading = function changeHeading() {
var headingQuery = document.getElementsByClassName( 'wp-heading-inline' );
const headingQuery = document.getElementsByClassName( 'wp-heading-inline' );
if ( headingQuery[ 0 ] && component.data.l10n.page_heading ) {
headingQuery[ 0 ].innerText = component.data.l10n.page_heading;
}
@@ -1624,7 +1624,7 @@ public static function print_status_meta_box( $post ) {
</a>
</div>
<div id="publishing-action">
<button type="submit" form="posts-filter" name="action" class="button button-primary" value="<?php echo esc_attr( self::UPDATE_POST_TERM_STATUS_ACTION ); ?>"><?php esc_html_e( 'Update', 'default' ); ?></button>
<button type="submit" name="action" class="button button-primary" value="<?php echo esc_attr( self::UPDATE_POST_TERM_STATUS_ACTION ); ?>"><?php esc_html_e( 'Update', 'default' ); ?></button>
</div>
<div class="clear"></div>
</div>
@@ -1695,17 +1695,12 @@ public static function render_single_url_list_table( $post ) {
<?php $wp_list_table->search_box( esc_html__( 'Search Errors', 'amp' ), 'invalid-url-search' ); ?>
</form>

<form id="posts-filter" method="post">
<?php wp_nonce_field( self::UPDATE_POST_TERM_STATUS_ACTION, self::UPDATE_POST_TERM_STATUS_ACTION . '_nonce', false ); ?>
<button type="submit" name="action" value="<?php echo esc_attr( AMP_Validation_Error_Taxonomy::VALIDATION_ERROR_ACCEPT_ACTION ); ?>" class="hidden button action"><?php esc_html_e( 'Accept', 'amp' ); ?></button>
<button type="submit" name="action" value="<?php echo esc_attr( AMP_Validation_Error_Taxonomy::VALIDATION_ERROR_REJECT_ACTION ); ?>" class="hidden button action"><?php esc_html_e( 'Reject', 'amp' ); ?></button>
<input type="hidden" name="taxonomy" value="<?php echo esc_attr( $taxonomy ); ?>" />
<input type="hidden" name="post_type" value="<?php echo esc_attr( $post->post_type ); ?>" />
<div id="url-post-filter" class="alignleft actions">
<?php AMP_Validation_Error_Taxonomy::render_error_type_filter(); ?>
</div>
<?php $wp_list_table->display(); ?>
</form>
<button type="button" class="hidden button action accept"><?php esc_html_e( 'Accept', 'amp' ); ?></button>
<button type="button" class="hidden button action reject"><?php esc_html_e( 'Reject', 'amp' ); ?></button>
<div id="url-post-filter" class="alignleft actions">
<?php AMP_Validation_Error_Taxonomy::render_error_type_filter(); ?>
</div>
<?php $wp_list_table->display(); ?>

<?php
}
@@ -1452,7 +1452,7 @@ public static function filter_manage_custom_columns( $content, $column_name, $te
<option value="<?php echo esc_attr( self::VALIDATION_ERROR_ACCEPTED_STATUS ); ?>" <?php selected( self::VALIDATION_ERROR_ACCEPTED_STATUS, $term->term_group ); ?> data-status-icon="<?php echo esc_url( amp_get_asset_url( 'images/amp-logo-icon.svg' ) ); ?>">
<?php esc_html_e( 'Accepted', 'amp' ); ?>
</option>
<option style="text-decoration: line-through" value="<?php echo esc_attr( self::VALIDATION_ERROR_REJECTED_STATUS ); ?>" <?php selected( self::VALIDATION_ERROR_REJECTED_STATUS, $term->term_group ); ?> data-status-icon="<?php echo esc_url( amp_get_asset_url( 'images/baseline-error-blue.svg' ) ); ?>">
<option value="<?php echo esc_attr( self::VALIDATION_ERROR_REJECTED_STATUS ); ?>" <?php selected( self::VALIDATION_ERROR_REJECTED_STATUS, $term->term_group ); ?> data-status-icon="<?php echo esc_url( amp_get_asset_url( 'images/baseline-error-blue.svg' ) ); ?>">
<?php esc_html_e( 'Rejected', 'amp' ); ?>
</option>
</select>
@@ -1237,11 +1237,8 @@ public function test_render_single_url_list_table() {
AMP_Invalid_URL_Post_Type::render_single_url_list_table( $post_correct_post_type );
$output = ob_get_clean();
$this->assertContains( '<form class="search-form wp-clearfix" method="get">', $output );
$this->assertContains( '<form id="posts-filter" method="post">', $output );
$this->assertContains( AMP_Validation_Error_Taxonomy::TAXONOMY_SLUG, $output );
$this->assertContains( '<button type="submit" name="action" value="', $output );
$this->assertContains( AMP_Validation_Error_Taxonomy::VALIDATION_ERROR_ACCEPT_ACTION, $output );
$this->assertContains( AMP_Validation_Error_Taxonomy::VALIDATION_ERROR_REJECT_ACTION, $output );
$this->assertContains( '<button type="button" class="hidden button action accept">', $output );
$this->assertContains( '<button type="button" class="hidden button action reject">', $output );
}
/**
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.