dont show rules for top tags (#14878)
This commit is contained in:
parent
f91984d21b
commit
b0b2b995c5
2 changed files with 13 additions and 11 deletions
|
|
@ -419,13 +419,15 @@ export class Tags extends Component {
|
|||
) : (
|
||||
''
|
||||
)}
|
||||
<div
|
||||
className={`${classPrefix}__tagrules--${
|
||||
showingRulesForTag === tag.name ? 'active' : 'inactive'
|
||||
}`}
|
||||
// eslint-disable-next-line react/no-danger
|
||||
dangerouslySetInnerHTML={{ __html: tag.rules_html }}
|
||||
/>
|
||||
{!showingTopTags && (
|
||||
<div
|
||||
className={`${classPrefix}__tagrules--${
|
||||
showingRulesForTag === tag.name ? 'active' : 'inactive'
|
||||
}`}
|
||||
// eslint-disable-next-line react/no-danger
|
||||
dangerouslySetInnerHTML={{ __html: tag.rules_html }}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
));
|
||||
if (
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ describe('Add tags to article', () => {
|
|||
|
||||
cy.findByRole('button', { name: 'tagone' }).should('exist');
|
||||
cy.findByRole('button', {
|
||||
name: 'tagtwo Here are some rules link here',
|
||||
name: 'tagtwo',
|
||||
}).should('exist');
|
||||
});
|
||||
|
||||
|
|
@ -34,14 +34,14 @@ describe('Add tags to article', () => {
|
|||
// Search is in progress, top tags which don't match shouldn't be shown
|
||||
cy.findByRole('button', { name: 'tagone' }).should('not.exist');
|
||||
cy.findByRole('button', {
|
||||
name: 'tagtwo Here are some rules link here',
|
||||
name: 'tagtwo',
|
||||
}).should('not.exist');
|
||||
|
||||
// Users initiating fresh search after comma
|
||||
cy.findByRole('textbox', { name: 'Post Tags' }).focus();
|
||||
cy.findByRole('button', { name: 'tagone' }).should('exist');
|
||||
cy.findByRole('button', {
|
||||
name: 'tagtwo Here are some rules link here',
|
||||
name: 'tagtwo',
|
||||
}).should('exist');
|
||||
});
|
||||
|
||||
|
|
@ -52,7 +52,7 @@ describe('Add tags to article', () => {
|
|||
|
||||
cy.findByRole('button', { name: 'tagone' }).should('not.exist');
|
||||
cy.findByRole('button', {
|
||||
name: 'tagtwo Here are some rules link here',
|
||||
name: 'tagtwo',
|
||||
}).should('exist');
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue