Преглед изворни кода

feat: VRT tag

https://youtrack.weseek.co.jp/issue/GW-7740
- Get input selector in modal body
- Insert tag name to tag edit input
I Komang Mudana пре 4 година
родитељ
комит
fe7bf0aa07

+ 0 - 1
packages/app/src/components/Page/RenderTagLabels.tsx

@@ -37,7 +37,6 @@ const RenderTagLabels = React.memo((props: RenderTagLabelsProps) => {
         <a
           className={`btn btn-link btn-edit-tags p-0 text-muted ${isTagsEmpty ? 'no-tags' : ''} ${isGuestUser ? 'disabled' : ''}`}
           onClick={openEditorHandler}
-          data-tesid="open-tag-editor"
         >
           { isTagsEmpty && <>{ t('Add tags for this page') }</>}
           <i className="ml-1 icon-plus"></i>

+ 7 - 3
packages/app/test/cypress/integration/7-tag/add-tag.spec.ts

@@ -23,12 +23,16 @@ context('Tag', () => {
   it('Add Tag', () => {
     const tag = 'we';
     cy.visit('/');
-    cy.getByTestid('open-tag-editor').click();
+    cy.get('#edit-tags-btn-wrapper-for-tooltip > a').click({force: true});
     cy.wait(1000);
+
     cy.screenshot(`${ssPrefix}click-add-tag`, {capture: 'viewport'});
 
-    // cy.get('#edit-tag-modal > div.rbt-input > input').type(tag);
-    // cy.screenshot('tag input ', {capture: 'viewport'});
+    cy.get('#edit-tag-modal').within(() => {
+      cy.get('.rbt-input-hint-container > input').click({force: true});
+      cy.screenshot('tag input ', {capture: 'viewport'});
+    });
+
 
   });