-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from richardsweeney/features/implement-ysacf_e…
…xclude_fields-filter Implement ysacf_exclude_fields filter for legacy support
- Loading branch information
Showing
7 changed files
with
264 additions
and
37 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
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
var assert = require('assert'); | ||
var logContains = require('../../helpers/logContains'); | ||
var dummyContent = require('../../helpers/dummyContent'); | ||
var simpleField = require('../../helpers/simpleField'); | ||
|
||
module.exports = { | ||
tags: ['acf4', 'acf5', 'filters'], | ||
|
||
before: function (browser) { | ||
var page = browser.page.WordPressHelper(); | ||
page.newPost(); | ||
}, | ||
|
||
beforeEach: function (browser) { | ||
}, | ||
|
||
'Text Field (blacklisted by name)' : function (browser) { | ||
|
||
browser.execute(function() { | ||
return jQuery('.acf-field-text').data('key') || jQuery('.field_type-text').data('field_key'); | ||
}, | ||
[], | ||
function(result){ | ||
|
||
browser.execute( | ||
function( key ) { | ||
//As defined in /tests/js/system/data/acf5.php | ||
YoastACFAnalysisConfig.blacklistName = [ 'yoast_acf_analysis_text' ]; | ||
}, | ||
[result.value] | ||
); | ||
|
||
} ); | ||
|
||
var hash = dummyContent.hash(); | ||
|
||
browser | ||
.clearValue( '.field_type-text input, .acf-field-text input' ) | ||
.setValue( '.field_type-text input, .acf-field-text input', [ hash , browser.Keys.TAB ] ); | ||
|
||
browser.pause( 3000 ); | ||
|
||
logContains( browser, 'h2>' + hash, function( hasText ){ | ||
return browser.assert.ok( !hasText ); | ||
} ); | ||
|
||
browser.clearValue( '.field_type-text input, .acf-field-text input' ); | ||
}, | ||
|
||
after : function(browser) { | ||
browser.end(); | ||
} | ||
}; |
Oops, something went wrong.