|
@@ -16,8 +16,10 @@ context('Access to search result page', () => {
|
|
|
cy.getByTestid('search-result-base').should('be.visible');
|
|
cy.getByTestid('search-result-base').should('be.visible');
|
|
|
cy.getByTestid('search-result-list').should('be.visible');
|
|
cy.getByTestid('search-result-list').should('be.visible');
|
|
|
cy.getByTestid('search-result-content').should('be.visible');
|
|
cy.getByTestid('search-result-content').should('be.visible');
|
|
|
-
|
|
|
|
|
- cy.screenshot(`${ssPrefix}-with-q`);
|
|
|
|
|
|
|
+ cy.get('#wiki').should('be.visible');
|
|
|
|
|
+ // for avoid mismatch by auto scrolling
|
|
|
|
|
+ cy.get('.search-result-content-body-container').scrollTo('top');
|
|
|
|
|
+ cy.screenshot(`${ssPrefix}with-q`);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
it('checkboxes behaviors', () => {
|
|
it('checkboxes behaviors', () => {
|
|
@@ -26,27 +28,31 @@ context('Access to search result page', () => {
|
|
|
cy.getByTestid('search-result-base').should('be.visible');
|
|
cy.getByTestid('search-result-base').should('be.visible');
|
|
|
cy.getByTestid('search-result-list').should('be.visible');
|
|
cy.getByTestid('search-result-list').should('be.visible');
|
|
|
cy.getByTestid('search-result-content').should('be.visible');
|
|
cy.getByTestid('search-result-content').should('be.visible');
|
|
|
|
|
+ cy.get('#wiki').should('be.visible');
|
|
|
|
|
+ // for avoid mismatch by auto scrolling
|
|
|
|
|
+ cy.get('.search-result-content-body-container').scrollTo('top');
|
|
|
|
|
+
|
|
|
|
|
+ // force to add 'active' to pass VRT: https://github.com/weseek/growi/pull/6603
|
|
|
|
|
+ cy.getByTestid('page-list-item-L').first().invoke('addClass', 'active');
|
|
|
|
|
|
|
|
cy.getByTestid('cb-select').first().click({force: true});
|
|
cy.getByTestid('cb-select').first().click({force: true});
|
|
|
- cy.screenshot(`${ssPrefix}-the-first-checkbox-on`);
|
|
|
|
|
|
|
+ cy.screenshot(`${ssPrefix}the-first-checkbox-on`);
|
|
|
cy.getByTestid('cb-select').first().click({force: true});
|
|
cy.getByTestid('cb-select').first().click({force: true});
|
|
|
- cy.screenshot(`${ssPrefix}-the-first-checkbox-off`);
|
|
|
|
|
|
|
+ cy.screenshot(`${ssPrefix}the-first-checkbox-off`);
|
|
|
|
|
|
|
|
// click select all checkbox
|
|
// click select all checkbox
|
|
|
cy.getByTestid('cb-select-all').click({force: true});
|
|
cy.getByTestid('cb-select-all').click({force: true});
|
|
|
- cy.screenshot(`${ssPrefix}-the-select-all-checkbox-1`);
|
|
|
|
|
|
|
+ cy.screenshot(`${ssPrefix}the-select-all-checkbox-1`);
|
|
|
cy.getByTestid('cb-select').first().click({force: true});
|
|
cy.getByTestid('cb-select').first().click({force: true});
|
|
|
- cy.screenshot(`${ssPrefix}-the-select-all-checkbox-2`);
|
|
|
|
|
|
|
+ cy.screenshot(`${ssPrefix}the-select-all-checkbox-2`);
|
|
|
cy.getByTestid('cb-select').first().click({force: true});
|
|
cy.getByTestid('cb-select').first().click({force: true});
|
|
|
- cy.screenshot(`${ssPrefix}-the-select-all-checkbox-3`);
|
|
|
|
|
|
|
+ cy.screenshot(`${ssPrefix}the-select-all-checkbox-3`);
|
|
|
cy.getByTestid('cb-select-all').click({force: true});
|
|
cy.getByTestid('cb-select-all').click({force: true});
|
|
|
- cy.screenshot(`${ssPrefix}-the-select-all-checkbox-4`);
|
|
|
|
|
|
|
+ cy.screenshot(`${ssPrefix}the-select-all-checkbox-4`);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
context('Access to legacy private pages', () => {
|
|
context('Access to legacy private pages', () => {
|
|
|
const ssPrefix = 'access-to-legacy-private-pages-directly-';
|
|
const ssPrefix = 'access-to-legacy-private-pages-directly-';
|
|
|
|
|
|
|
@@ -63,8 +69,9 @@ context('Access to legacy private pages', () => {
|
|
|
cy.visit('/_private-legacy-pages');
|
|
cy.visit('/_private-legacy-pages');
|
|
|
|
|
|
|
|
cy.getByTestid('search-result-base').should('be.visible');
|
|
cy.getByTestid('search-result-base').should('be.visible');
|
|
|
|
|
+ cy.getByTestid('search-result-private-legacy-pages').should('be.visible');
|
|
|
|
|
|
|
|
- cy.screenshot(`${ssPrefix}-shown`);
|
|
|
|
|
|
|
+ cy.screenshot(`${ssPrefix}shown`);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
});
|
|
});
|
|
@@ -98,9 +105,20 @@ context('Search all pages', () => {
|
|
|
cy.getByTestid('search-result-base').should('be.visible');
|
|
cy.getByTestid('search-result-base').should('be.visible');
|
|
|
cy.getByTestid('search-result-list').should('be.visible');
|
|
cy.getByTestid('search-result-list').should('be.visible');
|
|
|
cy.getByTestid('search-result-content').should('be.visible');
|
|
cy.getByTestid('search-result-content').should('be.visible');
|
|
|
|
|
+ cy.get('#wiki').should('be.visible');
|
|
|
|
|
+ // force to add 'active' to pass VRT: https://github.com/weseek/growi/pull/6603
|
|
|
|
|
+ cy.getByTestid('page-list-item-L').first().invoke('addClass', 'active');
|
|
|
|
|
+ // for avoid mismatch by auto scrolling
|
|
|
|
|
+ cy.get('.search-result-content-body-container').scrollTo('top');
|
|
|
|
|
+ // eslint-disable-next-line cypress/no-unnecessary-waiting
|
|
|
|
|
+ cy.wait(1500);
|
|
|
cy.screenshot(`${ssPrefix}3-search-page-results`, { capture: 'viewport'});
|
|
cy.screenshot(`${ssPrefix}3-search-page-results`, { capture: 'viewport'});
|
|
|
|
|
|
|
|
cy.getByTestid('open-page-item-control-btn').eq(1).click();
|
|
cy.getByTestid('open-page-item-control-btn').eq(1).click();
|
|
|
|
|
+ cy.getByTestid('search-result-content').should('be.visible');
|
|
|
|
|
+ cy.get('#wiki').should('be.visible');
|
|
|
|
|
+ // for avoid mismatch by auto scrolling
|
|
|
|
|
+ cy.get('.search-result-content-body-container').scrollTo('top');
|
|
|
cy.screenshot(`${ssPrefix}4-click-three-dots-menu`, {capture: 'viewport'});
|
|
cy.screenshot(`${ssPrefix}4-click-three-dots-menu`, {capture: 'viewport'});
|
|
|
|
|
|
|
|
//Add bookmark
|
|
//Add bookmark
|
|
@@ -158,12 +176,18 @@ context('Search all pages', () => {
|
|
|
cy.getByTestid('search-result-base').should('be.visible');
|
|
cy.getByTestid('search-result-base').should('be.visible');
|
|
|
cy.getByTestid('search-result-list').should('be.visible');
|
|
cy.getByTestid('search-result-list').should('be.visible');
|
|
|
cy.getByTestid('search-result-content').should('be.visible');
|
|
cy.getByTestid('search-result-content').should('be.visible');
|
|
|
-
|
|
|
|
|
|
|
+ cy.get('#wiki').should('be.visible');
|
|
|
|
|
+ // force to add 'active' to pass VRT: https://github.com/weseek/growi/pull/6603
|
|
|
|
|
+ cy.getByTestid('page-list-item-L').first().invoke('addClass', 'active');
|
|
|
cy.screenshot(`${ssPrefix}2-search-with-tag-result`, {capture: 'viewport'});
|
|
cy.screenshot(`${ssPrefix}2-search-with-tag-result`, {capture: 'viewport'});
|
|
|
|
|
+
|
|
|
cy.getByTestid('open-page-item-control-btn').first().click();
|
|
cy.getByTestid('open-page-item-control-btn').first().click();
|
|
|
|
|
+ cy.getByTestid('search-result-content').should('be.visible');
|
|
|
|
|
+ cy.get('#wiki').should('be.visible');
|
|
|
cy.screenshot(`${ssPrefix}3-click-three-dots-menu-search-with-tag`, {capture: 'viewport'});
|
|
cy.screenshot(`${ssPrefix}3-click-three-dots-menu-search-with-tag`, {capture: 'viewport'});
|
|
|
|
|
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
it('Successfully order page search results by tag', () => {
|
|
it('Successfully order page search results by tag', () => {
|
|
|
const tag = 'help';
|
|
const tag = 'help';
|
|
|
|
|
|
|
@@ -172,6 +196,9 @@ context('Search all pages', () => {
|
|
|
cy.getByTestid('search-result-base').should('be.visible');
|
|
cy.getByTestid('search-result-base').should('be.visible');
|
|
|
cy.getByTestid('search-result-list').should('be.visible');
|
|
cy.getByTestid('search-result-list').should('be.visible');
|
|
|
cy.getByTestid('search-result-content').should('be.visible');
|
|
cy.getByTestid('search-result-content').should('be.visible');
|
|
|
|
|
+ cy.get('#wiki').should('be.visible');
|
|
|
|
|
+ // force to add 'active' to pass VRT: https://github.com/weseek/growi/pull/6603
|
|
|
|
|
+ cy.getByTestid('page-list-item-L').first().invoke('addClass', 'active');
|
|
|
cy.screenshot(`${ssPrefix}1-tag-order-click-tag-name`, {capture: 'viewport'});
|
|
cy.screenshot(`${ssPrefix}1-tag-order-click-tag-name`, {capture: 'viewport'});
|
|
|
|
|
|
|
|
cy.get('.grw-search-page-nav').within(() => {
|
|
cy.get('.grw-search-page-nav').within(() => {
|
|
@@ -182,6 +209,7 @@ context('Search all pages', () => {
|
|
|
cy.getByTestid('search-result-base').should('be.visible');
|
|
cy.getByTestid('search-result-base').should('be.visible');
|
|
|
cy.getByTestid('search-result-list').should('be.visible');
|
|
cy.getByTestid('search-result-list').should('be.visible');
|
|
|
cy.getByTestid('search-result-content').should('be.visible');
|
|
cy.getByTestid('search-result-content').should('be.visible');
|
|
|
|
|
+ cy.get('#wiki').should('be.visible');
|
|
|
cy.screenshot(`${ssPrefix}2-tag-order-by-relevance`);
|
|
cy.screenshot(`${ssPrefix}2-tag-order-by-relevance`);
|
|
|
|
|
|
|
|
cy.get('.grw-search-page-nav').within(() => {
|
|
cy.get('.grw-search-page-nav').within(() => {
|
|
@@ -192,6 +220,7 @@ context('Search all pages', () => {
|
|
|
cy.getByTestid('search-result-base').should('be.visible');
|
|
cy.getByTestid('search-result-base').should('be.visible');
|
|
|
cy.getByTestid('search-result-list').should('be.visible');
|
|
cy.getByTestid('search-result-list').should('be.visible');
|
|
|
cy.getByTestid('search-result-content').should('be.visible');
|
|
cy.getByTestid('search-result-content').should('be.visible');
|
|
|
|
|
+ cy.get('#wiki').should('be.visible');
|
|
|
cy.screenshot(`${ssPrefix}3-tag-order-by-creation-date`);
|
|
cy.screenshot(`${ssPrefix}3-tag-order-by-creation-date`);
|
|
|
|
|
|
|
|
cy.get('.grw-search-page-nav').within(() => {
|
|
cy.get('.grw-search-page-nav').within(() => {
|
|
@@ -202,6 +231,7 @@ context('Search all pages', () => {
|
|
|
cy.getByTestid('search-result-base').should('be.visible');
|
|
cy.getByTestid('search-result-base').should('be.visible');
|
|
|
cy.getByTestid('search-result-list').should('be.visible');
|
|
cy.getByTestid('search-result-list').should('be.visible');
|
|
|
cy.getByTestid('search-result-content').should('be.visible');
|
|
cy.getByTestid('search-result-content').should('be.visible');
|
|
|
|
|
+ cy.get('#wiki').should('be.visible');
|
|
|
cy.screenshot(`${ssPrefix}4-tag-order-by-last-update-date`);
|
|
cy.screenshot(`${ssPrefix}4-tag-order-by-last-update-date`);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
@@ -235,9 +265,20 @@ context('Search current tree with "prefix":', () => {
|
|
|
cy.getByTestid('search-result-base').should('be.visible');
|
|
cy.getByTestid('search-result-base').should('be.visible');
|
|
|
cy.getByTestid('search-result-list').should('be.visible');
|
|
cy.getByTestid('search-result-list').should('be.visible');
|
|
|
cy.getByTestid('search-result-content').should('be.visible');
|
|
cy.getByTestid('search-result-content').should('be.visible');
|
|
|
|
|
+ cy.get('#wiki').should('be.visible');
|
|
|
|
|
+ // force to add 'active' to pass VRT: https://github.com/weseek/growi/pull/6603
|
|
|
|
|
+ cy.getByTestid('page-list-item-L').first().invoke('addClass', 'active');
|
|
|
|
|
+ // for avoid mismatch by auto scrolling
|
|
|
|
|
+ cy.get('.search-result-content-body-container').scrollTo('top');
|
|
|
|
|
+ // eslint-disable-next-line cypress/no-unnecessary-waiting
|
|
|
|
|
+ cy.wait(1500);
|
|
|
cy.screenshot(`${ssPrefix}3-search-page-results`, { capture: 'viewport'});
|
|
cy.screenshot(`${ssPrefix}3-search-page-results`, { capture: 'viewport'});
|
|
|
|
|
|
|
|
cy.getByTestid('open-page-item-control-btn').first().click();
|
|
cy.getByTestid('open-page-item-control-btn').first().click();
|
|
|
|
|
+ cy.getByTestid('search-result-content').should('be.visible');
|
|
|
|
|
+ cy.get('#wiki').should('be.visible');
|
|
|
|
|
+ // for avoid mismatch by auto scrolling
|
|
|
|
|
+ cy.get('.search-result-content-body-container').scrollTo('top');
|
|
|
cy.screenshot(`${ssPrefix}4-click-three-dots-menu`, {capture: 'viewport'});
|
|
cy.screenshot(`${ssPrefix}4-click-three-dots-menu`, {capture: 'viewport'});
|
|
|
});
|
|
});
|
|
|
|
|
|