docsifyjs / docsify

🃏 A magical documentation site generator.
https://docsify.js.org
MIT License
27.47k stars 5.67k forks source link

When the `onlyCover` configuration option is set to `true` in the test case, the test will always time out. #2446

Closed YiiGuxing closed 4 months ago

YiiGuxing commented 4 months ago

Bug Report

Steps to reproduce

Use the following code for testing:

  test.describe('onlyCover', () => {
    test('only cover', async ({ page }) => {
      await docsifyInit({
        config: {
          onlyCover: true,
        },
        markdown: {
          homepage: '# Hello World',
          coverpage: '# Cover Page :id=cover-title',
        },
        // _logHTML: true,
      });

      await expect(page.locator('#cover-title')).toContainText('Cover Page');
    });
  });

Current behaviour

The test will time out.

Expected behaviour

The test proceeds normally and returns results.

Other relevant information

Please create a reproducible sandbox

Edit 307qqv236

Mention the docsify version in which this bug was not present (if any)

YiiGuxing commented 4 months ago

Sorry, I didn't notice the waitForSelector configuration option.