Yuki Takei 4 лет назад
Родитель
Сommit
b17ec915fb

+ 1 - 0
packages/app/src/components/PageList/PageListItemL.tsx

@@ -100,6 +100,7 @@ const PageListItemLSubstance: ForwardRefRenderFunction<ISelectable, Props> = (pr
               <CustomInput
                 type="checkbox"
                 id={`cbDelete-${pageData._id}`}
+                data-testid="cbDelete"
                 innerRef={inputRef}
                 onChange={(e) => { onCheckboxChanged(e.target.checked, pageData._id) }}
               />

+ 11 - 0
packages/app/test/cypress/integration/3-search/access-to-result-page-directly.spec.ts

@@ -21,7 +21,18 @@ context('Access to search result page directly', () => {
 
   it('/_search with "q" param is successfully loaded', () => {
     cy.visit('/_search', { qs: { q: 'sandbox headers blockquotes' } });
+    // eslint-disable-next-line cypress/no-unnecessary-waiting
+    cy.wait(1000);
     cy.screenshot(`${ssPrefix}-with-q`, { capture: 'viewport' });
   });
 
+  it('checkboxes behaviors', () => {
+    cy.visit('/_search', { qs: { q: 'sandbox headers blockquotes' } });
+
+    cy.get('[data-testid=cbDelete]').first().click({force: true});
+    cy.screenshot(`${ssPrefix}-the-first-checkbox-on`, { capture: 'viewport' });
+    cy.get('[data-testid=cbDelete]').first().click({force: true});
+    cy.screenshot(`${ssPrefix}-the-first-checkbox-off`, { capture: 'viewport' });
+  });
+
 });