-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9007 from weseek/master
Release v7.0.17
- Loading branch information
Showing
177 changed files
with
1,958 additions
and
1,530 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@growi/app", | ||
"version": "7.0.16", | ||
"version": "7.0.17-RC.0", | ||
"license": "MIT", | ||
"private": "true", | ||
"scripts": { | ||
|
@@ -44,7 +44,8 @@ | |
"vitest:run:components": "vitest run -c vitest.config.components.ts src --coverage", | ||
"previtest:run:integ": "vitest run -c test-with-vite/download-mongo-binary/vitest.config.ts test-with-vite/download-mongo-binary", | ||
"//// misc": "", | ||
"console": "yarn cross-env NODE_ENV=development yarn ts-node --experimental-repl-await src/server/console.js", | ||
"console": "yarn repl", | ||
"repl": "yarn cross-env NODE_ENV=development yarn ts-node src/server/repl.ts", | ||
"swagger-jsdoc": "swagger-jsdoc -o tmp/swagger.json -d config/swagger-definition.js", | ||
"openapi:v3": "yarn cross-env API_VERSION=3 yarn swagger-jsdoc -- \"src/server/routes/apiv3/**/*.js\" \"src/server/models/**/*.js\"", | ||
"openapi:v1": "yarn cross-env API_VERSION=1 yarn swagger-jsdoc -- \"src/server/*/*.js\" \"src/server/models/**/*.js\"", | ||
|
@@ -208,15 +209,16 @@ | |
"usehooks-ts": "^2.6.0", | ||
"validator": "^13.7.0", | ||
"ws": "^8.17.1", | ||
"xss": "^1.0.14", | ||
"xss": "^1.0.15", | ||
"y-mongodb-provider": "^0.2.0", | ||
"y-socket.io": "^1.1.3", | ||
"yjs": "^13.6.18" | ||
}, | ||
"// comments for defDependencies": { | ||
"bootstrap": "v5.3.3 has a bug. refs: https://github.com/twbs/bootstrap/issues/39798", | ||
"@handsontable/react": "v3 requires handsontable >= 7.0.0.", | ||
"handsontable": "v7.0.0 or above is no loger MIT lisence." | ||
"handsontable": "v7.0.0 or above is no loger MIT lisence.", | ||
"mongodb": "mongoose which is used requires [email protected]." | ||
}, | ||
"devDependencies": { | ||
"@growi/core-styles": "link:../../packages/core-styles", | ||
|
@@ -260,6 +262,7 @@ | |
"jest-localstorage-mock": "^2.4.14", | ||
"load-css-file": "^1.0.0", | ||
"material-icons": "^1.11.3", | ||
"mongodb": "4.16.0", | ||
"mongodb-memory-server-core": "^9.1.1", | ||
"morgan": "^1.10.0", | ||
"null-loader": "^4.0.1", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,227 @@ | ||
import { test, expect } from '@playwright/test'; | ||
|
||
test('Search page with "q" param is successfully loaded', async({ page }) => { | ||
// Navigate to the search page with query parameters | ||
await page.goto('/_search?q=alerts'); | ||
|
||
// Confirm search result elements are visible | ||
await expect(page.getByTestId('search-result-base')).toBeVisible(); | ||
await expect(page.getByTestId('search-result-list')).toBeVisible(); | ||
await expect(page.getByTestId('search-result-content')).toBeVisible(); | ||
await expect(page.locator('.wiki')).toBeVisible(); | ||
}); | ||
|
||
test('checkboxes behaviors', async({ page }) => { | ||
// Navigate to the search page with query parameters | ||
await page.goto('/_search?q=alerts'); | ||
|
||
// Confirm search result elements are visible | ||
await expect(page.getByTestId('search-result-base')).toBeVisible(); | ||
await expect(page.getByTestId('search-result-list')).toBeVisible(); | ||
await expect(page.getByTestId('search-result-content')).toBeVisible(); | ||
await expect(page.locator('.wiki')).toBeVisible(); | ||
|
||
// Click the first checkbox | ||
await page.getByTestId('cb-select').first().click({ force: true }); | ||
|
||
// Unclick the first checkbox | ||
await page.getByTestId('cb-select').first().click({ force: true }); | ||
|
||
// Click the select all checkbox | ||
await page.getByTestId('delete-control-button').first().click({ force: true }); | ||
await page.getByTestId('cb-select-all').click({ force: true }); | ||
|
||
// Unclick the first checkbox after selecting all | ||
await page.getByTestId('cb-select').first().click({ force: true }); | ||
|
||
// Click the first checkbox again | ||
await page.getByTestId('cb-select').first().click({ force: true }); | ||
|
||
// Unclick the select all checkbox | ||
await page.getByTestId('cb-select').first().click({ force: true }); | ||
}); | ||
|
||
|
||
test('successfully loads /_private-legacy-pages', async({ page }) => { | ||
await page.goto('/_private-legacy-pages'); | ||
|
||
// Confirm search result elements are visible | ||
await expect(page.locator('[data-testid="search-result-base"]')).toBeVisible(); | ||
await expect(page.locator('[data-testid="search-result-private-legacy-pages"]')).toBeVisible(); | ||
}); | ||
|
||
test('Search all pages by word', async({ page }) => { | ||
await page.goto('/'); | ||
await page.getByTestId('open-search-modal-button').click(); | ||
await expect(page.getByTestId('search-modal')).toBeVisible(); | ||
await page.locator('.form-control').fill('sand'); | ||
await expect(page.locator('.search-menu-item').first()).toBeVisible(); | ||
}); | ||
|
||
test.describe.serial('Search all pages', () => { | ||
const tag = 'help'; | ||
const searchText = `tag:${tag}`; | ||
|
||
test('Successfully created tags', async({ page }) => { | ||
await page.goto('/'); | ||
|
||
// open Edit Tags Modal to add tag | ||
await page.locator('.grw-side-contents-sticky-container').isVisible(); | ||
await page.locator('#edit-tags-btn-wrapper-for-tooltip').click(); | ||
await expect(page.locator('#edit-tag-modal')).toBeVisible(); | ||
await page.locator('.rbt-input-main').fill(tag); | ||
await page.locator('#tag-typeahead-asynctypeahead-item-0').click(); | ||
await page.getByTestId('tag-edit-done-btn').click(); | ||
|
||
}); | ||
|
||
test('Search all pages by tag is successfully loaded', async({ page }) => { | ||
await page.goto('/'); | ||
|
||
// Search | ||
await page.getByTestId('open-search-modal-button').click(); | ||
await expect(page.getByTestId('search-modal')).toBeVisible(); | ||
await page.locator('.form-control').fill(searchText); | ||
await page.getByTestId('search-all-menu-item').click(); | ||
|
||
// Confirm search result elements are visible | ||
const searchResultList = page.getByTestId('search-result-list'); | ||
await expect(searchResultList).toBeVisible(); | ||
await expect(searchResultList.locator('li')).toHaveCount(1); | ||
}); | ||
|
||
test('Successfully order page search results by tag', async({ page }) => { | ||
await page.goto('/'); | ||
|
||
await page.locator('.grw-tag-simple-bar').locator('a').click(); | ||
|
||
expect(page.getByTestId('search-result-base')).toBeVisible(); | ||
expect(page.getByTestId('search-result-list')).toBeVisible(); | ||
expect(page.getByTestId('search-result-content')).toBeVisible(); | ||
}); | ||
}); | ||
|
||
test.describe('Sort with dropdown', () => { | ||
test.beforeEach(async({ page }) => { | ||
await page.goto('/_search?q=sand'); | ||
|
||
await expect(page.getByTestId('search-result-base')).toBeVisible(); | ||
await expect(page.getByTestId('search-result-list')).toBeVisible(); | ||
await expect(page.getByTestId('search-result-content')).toBeVisible(); | ||
|
||
// open sort dropdown | ||
await page.locator('.search-control').locator('button').first().click(); | ||
}); | ||
|
||
test('Open sort dropdown', async({ page }) => { | ||
await expect(page.locator('.search-control .dropdown-menu.show')).toBeVisible(); | ||
}); | ||
|
||
test('Sort by relevance', async({ page }) => { | ||
const dropdownMenu = page.locator('.search-control .dropdown-menu.show'); | ||
|
||
await expect(dropdownMenu).toBeVisible(); | ||
await dropdownMenu.locator('.dropdown-item').nth(0).click(); | ||
|
||
|
||
await expect(page.getByTestId('search-result-base')).toBeVisible(); | ||
await expect(page.getByTestId('search-result-list')).toBeVisible(); | ||
await expect(page.getByTestId('search-result-content')).toBeVisible(); | ||
}); | ||
|
||
test('Sort by creation date', async({ page }) => { | ||
const dropdownMenu = page.locator('.search-control .dropdown-menu.show'); | ||
|
||
await expect(dropdownMenu).toBeVisible(); | ||
await dropdownMenu.locator('.dropdown-item').nth(1).click(); | ||
|
||
|
||
await expect(page.getByTestId('search-result-base')).toBeVisible(); | ||
await expect(page.getByTestId('search-result-list')).toBeVisible(); | ||
await expect(page.getByTestId('search-result-content')).toBeVisible(); | ||
}); | ||
|
||
test('Sort by last update date', async({ page }) => { | ||
const dropdownMenu = page.locator('.search-control .dropdown-menu.show'); | ||
|
||
await expect(dropdownMenu).toBeVisible(); | ||
await dropdownMenu.locator('.dropdown-item').nth(2).click(); | ||
|
||
|
||
await expect(page.getByTestId('search-result-base')).toBeVisible(); | ||
await expect(page.getByTestId('search-result-list')).toBeVisible(); | ||
await expect(page.getByTestId('search-result-content')).toBeVisible(); | ||
}); | ||
}); | ||
|
||
test.describe('Search and use', () => { | ||
test.beforeEach(async({ page }) => { | ||
await page.goto('/_search?q=alerts'); | ||
|
||
await expect(page.getByTestId('search-result-base')).toBeVisible(); | ||
await expect(page.getByTestId('search-result-list')).toBeVisible(); | ||
await expect(page.getByTestId('search-result-content')).toBeVisible(); | ||
|
||
await page.getByTestId('page-list-item-L').first().getByTestId('open-page-item-control-btn').click(); | ||
await expect(page.locator('.dropdown-menu.show')).toBeVisible(); | ||
}); | ||
|
||
test('Successfully the dropdown is opened', async({ page }) => { | ||
await expect(page.locator('.dropdown-menu.show')).toBeVisible(); | ||
}); | ||
|
||
test('Successfully add bookmark', async({ page }) => { | ||
const dropdonwMenu = page.locator('.dropdown-menu.show'); | ||
|
||
await expect(dropdonwMenu).toBeVisible(); | ||
|
||
// Add bookmark | ||
await dropdonwMenu.getByTestId('add-bookmark-btn').click(); | ||
|
||
await expect(page.getByTestId('search-result-content').locator('.btn-bookmark.active').first()).toBeVisible(); | ||
}); | ||
|
||
test('Successfully open duplicate modal', async({ page }) => { | ||
const dropdonwMenu = page.locator('.dropdown-menu.show'); | ||
|
||
await expect(dropdonwMenu).toBeVisible(); | ||
|
||
await dropdonwMenu.getByTestId('open-page-duplicate-modal-btn').click(); | ||
|
||
await expect(page.getByTestId('page-duplicate-modal')).toBeVisible(); | ||
}); | ||
|
||
test('Successfully open move/rename modal', async({ page }) => { | ||
const dropdonwMenu = page.locator('.dropdown-menu.show'); | ||
|
||
await expect(dropdonwMenu).toBeVisible(); | ||
|
||
await dropdonwMenu.getByTestId('rename-page-btn').click(); | ||
|
||
await expect(page.getByTestId('page-rename-modal')).toBeVisible(); | ||
}); | ||
|
||
test('Successfully open delete modal', async({ page }) => { | ||
const dropdonwMenu = page.locator('.dropdown-menu.show'); | ||
|
||
await expect(dropdonwMenu).toBeVisible(); | ||
|
||
await dropdonwMenu.getByTestId('open-page-delete-modal-btn').click(); | ||
|
||
await expect(page.getByTestId('page-delete-modal')).toBeVisible(); | ||
}); | ||
}); | ||
|
||
test('Search current tree by word is successfully loaded', async({ page }) => { | ||
await page.goto('/'); | ||
const searchText = 'GROWI'; | ||
|
||
await page.getByTestId('open-search-modal-button').click(); | ||
await expect(page.getByTestId('search-modal')).toBeVisible(); | ||
await page.locator('.form-control').fill(searchText); | ||
await page.getByTestId('search-prefix-menu-item').click(); | ||
|
||
await expect(page.getByTestId('search-result-base')).toBeVisible(); | ||
await expect(page.getByTestId('search-result-list')).toBeVisible(); | ||
await expect(page.getByTestId('search-result-content')).toBeVisible(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.