-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'canary' into fundon/01_17_improve_doc_title_and_icon_di…
…splay
- Loading branch information
Showing
7 changed files
with
59 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { ConsoleLogger, Injectable, Scope } from '@nestjs/common'; | ||
import { ConsoleLogger, Injectable } from '@nestjs/common'; | ||
|
||
@Injectable({ | ||
scope: Scope.TRANSIENT, | ||
}) | ||
// DO NOT use this Logger directly | ||
// Use it via this way: `private readonly logger = new Logger(MyService.name)` | ||
@Injectable() | ||
export class AFFiNELogger extends ConsoleLogger {} |
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { test } from '@affine-test/kit/playwright'; | ||
import { | ||
clickEdgelessModeButton, | ||
locateEditorContainer, | ||
locateElementToolbar, | ||
} from '@affine-test/kit/utils/editor'; | ||
import { openHomePage } from '@affine-test/kit/utils/load-page'; | ||
import { | ||
clickNewPageButton, | ||
waitForEditorLoad, | ||
} from '@affine-test/kit/utils/page-logic'; | ||
import { expect } from '@playwright/test'; | ||
|
||
const title = 'Edgeless Note Header Test'; | ||
|
||
test.beforeEach(async ({ page }) => { | ||
await openHomePage(page); | ||
await waitForEditorLoad(page); | ||
await clickNewPageButton(page, title); | ||
await clickEdgelessModeButton(page); | ||
const container = locateEditorContainer(page); | ||
await container.click(); | ||
}); | ||
|
||
test('should close embed editing modal when editor switching to page mode by short cut', async ({ | ||
page, | ||
}) => { | ||
await page.keyboard.press('@'); | ||
await page | ||
.getByTestId('cmdk-label') | ||
.getByText('Write, Draw, Plan all at Once.') | ||
.click(); | ||
const toolbar = locateElementToolbar(page); | ||
await toolbar.getByLabel('Edit').click(); | ||
|
||
const editingModal = page.locator('embed-card-edit-modal'); | ||
expect(editingModal).toBeVisible(); | ||
|
||
await page.keyboard.press('Alt+s'); | ||
await waitForEditorLoad(page); | ||
expect(editingModal).toBeHidden(); | ||
}); |