feat(topics): restore topic taxonomy workflow
This commit is contained in:
1 parent
f3dd1ec3b1
commit
a254cbd3e9
59 files changed
+771
-192
No files matched your search
@@ -113,7 +113,10 @@ final class WidgetSystemTest {
|
||||
], 3);
|
||||
$this->same('1,-2,3', $reference['cat'], 'reference cat preserves cleaned signed IDs for WP_Query descendant semantics');
|
||||
$this->false(isset($reference['category__in']) || isset($reference['category__not_in']), 'reference cat does not narrow matches to direct categories');
|
||||
$this->false(isset($reference['tax_query']), 'topic filters are removed with the topics feature');
|
||||
$this->false(isset($reference['tax_query']), 'queries without a topic filter remain unrestricted');
|
||||
$topic_query = PostQuery::arguments(['count' => 6, 'topics' => '7,8'], 1);
|
||||
$this->same('topics', $topic_query['tax_query'][0]['taxonomy'], 'topic query uses the topics taxonomy');
|
||||
$this->same([7, 8], $topic_query['tax_query'][0]['terms'], 'topic IDs reach the taxonomy query');
|
||||
$this->same('jio_post_views', $reference['meta_key'], 'reference view ordering uses numeric view meta');
|
||||
$this->false(isset($reference['meta_query']), 'modern reference queries do not apply commerce filters by default');
|
||||
$this->same(1, $reference['paged'], 'no-pagination queries stay on first page');
|
||||
@@ -148,7 +151,9 @@ final class WidgetSystemTest {
|
||||
'order' => 'asc',
|
||||
]]]);
|
||||
$this->same('1,-2,3', $tab['tabs'][0]['cat'], 'tab cat keeps signed reference IDs');
|
||||
$this->false(isset($tab['tabs'][0]['topics']), 'topic filters are gone from tab configuration');
|
||||
$this->same('', $tab['tabs'][0]['topics'], 'tab exposes the topic filter');
|
||||
$topic_tab = FieldSchema::normalize($tab_fields, ['tabs' => [['title' => '专题', 'topics' => '7,8']]]);
|
||||
$this->same('7,8', $topic_tab['tabs'][0]['topics'], 'tab preserves selected topic IDs');
|
||||
$this->same(['1', '6'], $tab['tabs'][0]['pay_type'], 'tab commerce filters are preserved');
|
||||
$this->contains('<b>栏目</b>', $tab['tabs'][0]['title'], 'tab title keeps controlled HTML');
|
||||
$this->false(str_contains($tab['tabs'][0]['title'], '<script>'), 'tab title strips unsafe HTML');
|
||||
|
||||
Reference in new issue
Block a user