Squash all commit from feat/cloud-sync

This commit is contained in:
DarkSky
2022-12-31 01:59:07 +08:00
parent ddf3305bc1
commit 582aed8744
19 changed files with 37 additions and 39 deletions

View File

@@ -5,7 +5,7 @@
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "feat/filesystem_and_search",
"baseBranch": "feat/cloud-sync",
"updateInternalDependencies": "patch",
"ignore": []
}

View File

@@ -71,6 +71,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
path: ./packages/app/.next
lint:
name: Lint and E2E Test
runs-on: ubuntu-latest

View File

@@ -2,7 +2,7 @@ name: Pathfinder changelog
on:
push:
branches: [feat/filesystem_and_search, master]
branches: [feat/cloud-sync, master]
# Cancels all previous workflow runs for pull requests that have not completed.
# See https://docs.github.com/en/actions/using-jobs/using-concurrency

View File

@@ -2,9 +2,9 @@ name: Pathfinder Check
on:
push:
branches: [feat/filesystem_and_search, pathfinder1.1]
branches: [feat/cloud-sync]
pull_request:
branches: [feat/filesystem_and_search, pathfinder1.1]
branches: [feat/cloud-sync]
# Cancels all previous workflow runs for pull requests that have not completed.
# See https://docs.github.com/en/actions/using-jobs/using-concurrency
@@ -111,10 +111,13 @@ jobs:
with:
name: artifact
path: packages/app/.next/
# Temporary shutdown of E2E testing
- name: Lint & E2E Test
run: |
pnpm lint --max-warnings=0
PLAYWRIGHT_BROWSERS_PATH=0 npx playwright install chromium
PLAYWRIGHT_BROWSERS_PATH=0 pnpm test
PLAYWRIGHT_BROWSERS_PATH=0 pnpm test:dc
env:
NEXT_PUBLIC_FIREBASE_API_KEY: ${{ secrets.NEXT_PUBLIC_FIREBASE_API_KEY }}
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN: ${{ secrets.NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN }}
@@ -123,17 +126,3 @@ jobs:
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID }}
NEXT_PUBLIC_FIREBASE_APP_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_APP_ID }}
NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID }}
# - name: Lint & E2E Test
# run: |
# pnpm lint --max-warnings=0
# PLAYWRIGHT_BROWSERS_PATH=0 npx playwright install chromium
# PLAYWRIGHT_BROWSERS_PATH=0 pnpm test
# PLAYWRIGHT_BROWSERS_PATH=0 pnpm test:dc
# env:
# NEXT_PUBLIC_FIREBASE_API_KEY: ${{ secrets.NEXT_PUBLIC_FIREBASE_API_KEY }}
# NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN: ${{ secrets.NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN }}
# NEXT_PUBLIC_FIREBASE_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_PROJECT_ID }}
# NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET: ${{ secrets.NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET }}
# NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID }}
# NEXT_PUBLIC_FIREBASE_APP_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_APP_ID }}
# NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID }}

View File

@@ -16,7 +16,8 @@
"test:e2e:codegen": "npx playwright codegen http://localhost:8080",
"test:unit": "jest",
"postinstall": "husky install",
"notify": "node --experimental-modules scripts/notify.mjs"
"notify": "node --experimental-modules scripts/notify.mjs",
"check:ci": "pnpm lint & pnpm test"
},
"lint-staged": {
"*": "prettier --write --ignore-unknown",

View File

@@ -11,7 +11,7 @@ import { getWarningMessage, shouldShowWarning } from './utils';
import EditorOptionMenu from './header-right-items/editor-option-menu';
import TrashButtonGroup from './header-right-items/trash-button-group';
import ThemeModeSwitch from './header-right-items/theme-mode-switch';
// import SyncUser from './header-right-items/sync-user';
import SyncUser from './header-right-items/sync-user';
const BrowserWarning = ({
show,
@@ -40,7 +40,7 @@ const HeaderRightItems: Record<HeaderRightItemNames, ReactNode> = {
editorOptionMenu: <EditorOptionMenu key="editorOptionMenu" />,
trashButtonGroup: <TrashButtonGroup key="trashButtonGroup" />,
themeModeSwitch: <ThemeModeSwitch key="themeModeSwitch" />,
syncUser: null,
syncUser: <SyncUser key="syncUser" />,
};
export const Header = ({

View File

@@ -4,7 +4,7 @@ import {
StyledArrowButton,
StyledLink,
StyledListItem,
// StyledListItemForWorkspace,
StyledListItemForWorkspace,
StyledNewPageButton,
StyledQuickSearch,
StyledSliderBar,
@@ -12,6 +12,7 @@ import {
StyledSubListItem,
} from './style';
import { Arrow } from './icons';
import { WorkspaceSelector } from './WorkspaceSelector';
import Collapse from '@mui/material/Collapse';
import {
ArrowDownIcon,
@@ -28,7 +29,6 @@ import { useModal } from '@/providers/global-modal-provider';
import { useAppState } from '@/providers/app-state-provider/context';
import { IconButton } from '@/ui/button';
// import { WorkspaceSelector } from './WorkspaceSelector';
import useLocalStorage from '@/hooks/use-local-storage';
import usePageMetaList from '@/hooks/use-page-meta-list';
import { usePageHelper } from '@/hooks/use-page-helper';
@@ -114,9 +114,9 @@ export const WorkSpaceSliderBar = () => {
</Tooltip>
<StyledSliderBarWrapper data-testid="sliderBar">
{/* <StyledListItemForWorkspace>
<StyledListItemForWorkspace>
<WorkspaceSelector />
</StyledListItemForWorkspace> */}
</StyledListItemForWorkspace>
<StyledQuickSearch
data-testid="sliderBar-quickSearchButton"
style={{ cursor: 'pointer' }}

View File

@@ -35,7 +35,7 @@ test.describe('Change page mode(Paper or Edgeless)', () => {
expect(await edgeless.isVisible()).toBe(true);
});
test.skip('Convert to edgeless by editor header items', async ({ page }) => {
test('Convert to edgeless by editor header items', async ({ page }) => {
await page
.getByTestId('editor-header-items')
.getByRole('button')

View File

@@ -4,11 +4,18 @@ import { loadPage } from './libs/load-page';
loadPage();
test.describe('Open contact us', () => {
test.skip('Click about us', async ({ page }) => {
test('Click about us', async ({ page }) => {
const currentWorkspace = page.getByTestId('current-workspace');
await currentWorkspace.click();
// await page.waitForTimeout(1000);
await page.getByText('About AFFiNE').click();
await page
.getByRole('tooltip', {
name: 'AFFiNE Log in to sync with affine About AFFiNE',
})
.locator('div')
.filter({ hasText: 'About AFFiNE' })
.nth(2)
.click();
const contactUsModal = page.locator(
'[data-testid=contact-us-modal-content]'
);

View File

@@ -4,7 +4,7 @@ import { loadPage } from './libs/load-page';
loadPage();
test.describe('Local first delete page', () => {
test.skip('New a page , then delete it in all pages, permanently delete it', async ({
test('New a page , then delete it in all pages, permanently delete it', async ({
page,
}) => {
await page.getByText('New Page').click();

View File

@@ -3,7 +3,7 @@ import { loadPage } from './libs/load-page';
loadPage();
test.describe.skip('Local first export page', () => {
test.describe('Local first export page', () => {
test('New a page ,then open it and export html', async ({ page }) => {
await page.getByText('New Page').click();
await page.getByPlaceholder('Title').click();

View File

@@ -3,7 +3,7 @@ import { loadPage } from './libs/load-page';
loadPage();
test.describe.skip('Local first favorite and cancel favorite page', () => {
test.describe('Local first favorite and cancel favorite page', () => {
test('New a page and open it ,then favorite it', async ({ page }) => {
await page.getByText('New Page').click();
await page.getByPlaceholder('Title').click();

View File

@@ -3,7 +3,7 @@ import { loadPage } from './libs/load-page';
loadPage();
test.describe.skip('Local first favorite items ui', () => {
test.describe('Local first favorite items ui', () => {
test('Show favorite items in sidebar', async ({ page }) => {
await page.getByText('New Page').click();
await page.getByPlaceholder('Title').click();

View File

@@ -3,7 +3,7 @@ import { loadPage } from './libs/load-page';
loadPage();
test.describe.skip('local first new page', () => {
test.describe('local first new page', () => {
test('click btn new page', async ({ page }) => {
const originPageId = page.url().split('/').reverse()[0];
await page.getByText('New Page').click();

View File

@@ -3,7 +3,7 @@ import { loadPage } from './libs/load-page';
loadPage();
test.describe.skip('local first new page', () => {
test.describe('local first new page', () => {
test('click btn bew page and open in tab', async ({ page }) => {
await page.getByText('New Page').click();
await page.getByPlaceholder('Title').click();

View File

@@ -3,7 +3,7 @@ import { loadPage } from './libs/load-page';
loadPage();
test.describe.skip('Local first delete page', () => {
test.describe('Local first delete page', () => {
test('New a page ,then open it and show delete modal', async ({ page }) => {
await page.getByText('New Page').click();
await page.getByPlaceholder('Title').click();

View File

@@ -3,7 +3,7 @@ import { loadPage } from './libs/load-page';
loadPage();
test.describe.skip('Local first trash page', () => {
test.describe('Local first trash page', () => {
test('New a page , then delete it in all pages, finally find it in trash', async ({
page,
}) => {

View File

@@ -3,7 +3,7 @@ import { loadPage } from './libs/load-page';
loadPage();
test.describe.skip('Local first default workspace', () => {
test.describe('Local first default workspace', () => {
test('Default workspace name', async ({ page }) => {
const workspaceName = page.getByTestId('workspace-name');
expect(await workspaceName.textContent()).toBe('AFFiNE');

View File

@@ -3,7 +3,7 @@ import { loadPage } from './libs/load-page';
loadPage();
test.describe.skip('Login Flow', () => {
test.describe('Login Flow', () => {
test('Open login modal by click current workspace', async ({ page }) => {
await page.getByTestId('current-workspace').click();
await page.waitForTimeout(800);