There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
TypeScript appcrdteditorelectronknowledge-basemarkdownmironotesnotionnotion-alternativerustrust-langrust-languagetabletableviewwhiteboardwikiworkspace
fix(core): copilot test condition & retry (#8665)
darkskygit2e7a7d5909cf
diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.ymlindex a8c976517c..7539c0cac2 100644--- a/.github/workflows/build-test.yml+++ b/.github/workflows/build-test.yml@@ -473,12 +473,8 @@ jobs:env:BASE_REF: ${{ github.base_ref }}run: |- if [ -n "$BASE_REF" ]; then- if node ./scripts/detect-blocksuite-update.mjs "$BASE_REF"; then- echo "skip=false" >> $GITHUB_OUTPUT- else- echo "skip=true" >> $GITHUB_OUTPUT- fi+ if node ./scripts/detect-blocksuite-update.mjs "$BASE_REF"; then+ echo "skip=false" >> $GITHUB_OUTPUTelseecho "skip=true" >> $GITHUB_OUTPUTfidiff --git a/scripts/detect-blocksuite-update.mjs b/scripts/detect-blocksuite-update.mjsindex 7f3d11df95..be9ecc68cb 100644--- a/scripts/detect-blocksuite-update.mjs+++ b/scripts/detect-blocksuite-update.mjs@@ -65,13 +65,13 @@ async function findPackageJson(root) {}async function main() {- if (process.argv.length < 3) {- console.error('Usage: node script.js <commit-hash>');+ const commitHash = process.argv[2] || process.env.GITHUB_BASE_REF;+ const currentHead = process.argv[3] || 'HEAD';+ if (!commitHash) {+ console.error('Missing base ref commit hash, skipping check.');process.exit(1);}- const commitHash = process.argv[2];- const currentHead = process.argv[3] || 'HEAD';const changedPackages = new Set();const folders = await findPackageJson(join(fileURLToPath(import.meta.url), '..', '..')diff --git a/tests/affine-cloud-copilot/e2e/copilot.spec.ts b/tests/affine-cloud-copilot/e2e/copilot.spec.tsindex 1b303be251..5c41243522 100644--- a/tests/affine-cloud-copilot/e2e/copilot.spec.ts+++ b/tests/affine-cloud-copilot/e2e/copilot.spec.ts@@ -113,15 +113,22 @@ const focusToEditor = async (page: Page) => {};const getEditorContent = async (page: Page) => {- const lines = await page.$$('page-editor .inline-editor');- const contents = await Promise.all(lines.map(el => el.innerText()));- return (- contents+ let content = '';+ let retry = 3;+ while (!content && retry > 0) {+ const lines = await page.$$('page-editor .inline-editor');+ const contents = await Promise.all(lines.map(el => el.innerText()));+ content = contents// cleanup zero width space.map(c => c.replace(/\u200B/g, '').trim()).filter(c => !!c)- .join('\n')- );+ .join('\n');+ if (!content) {+ await page.waitForTimeout(500);+ retry -= 1;+ }+ }+ return content;};const switchToEdgelessMode = async (page: Page) => {