From b0b2b995c5e5a3e6aa6a512f8adf3fc7c8c70bc5 Mon Sep 17 00:00:00 2001 From: Suzanne Aitchison Date: Fri, 1 Oct 2021 21:16:00 +0100 Subject: [PATCH] dont show rules for top tags (#14878) --- app/javascript/shared/components/tags.jsx | 16 +++++++++------- .../publishingFlows/addTagsToArticle.spec.js | 8 ++++---- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/app/javascript/shared/components/tags.jsx b/app/javascript/shared/components/tags.jsx index d5dfe2948..614c48fb5 100644 --- a/app/javascript/shared/components/tags.jsx +++ b/app/javascript/shared/components/tags.jsx @@ -419,13 +419,15 @@ export class Tags extends Component { ) : ( '' )} -
+ {!showingTopTags && ( +
+ )}
)); if ( diff --git a/cypress/integration/seededFlows/publishingFlows/addTagsToArticle.spec.js b/cypress/integration/seededFlows/publishingFlows/addTagsToArticle.spec.js index bab24636a..e92a1dbb3 100644 --- a/cypress/integration/seededFlows/publishingFlows/addTagsToArticle.spec.js +++ b/cypress/integration/seededFlows/publishingFlows/addTagsToArticle.spec.js @@ -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'); }); });