diff --git a/packages/ember/dummy-docs/packages/ember/components/docfy-with-hyphenated-number-2-demo/demo1.md b/packages/ember/dummy-docs/packages/ember/components/docfy-with-hyphenated-number-2-demo/demo1.md new file mode 100644 index 0000000..2a19866 --- /dev/null +++ b/packages/ember/dummy-docs/packages/ember/components/docfy-with-hyphenated-number-2-demo/demo1.md @@ -0,0 +1,26 @@ +--- +order: 1 +--- + +# Demo of DocfyLink component + +This is a cool feature. + +[Link from a demo](../docfy-output.md) + +```hbs template +
+ This is my Demo: + + My Link +
+
{{this.url}}
+``` + +```js component +import Component from '@glimmer/component'; + +export default class MyDemo extends Component { + url = '/docs/ember/'; +} +``` diff --git a/packages/ember/dummy-docs/packages/ember/components/docfy-with-hyphenated-number-2.md b/packages/ember/dummy-docs/packages/ember/components/docfy-with-hyphenated-number-2.md new file mode 100644 index 0000000..5883453 --- /dev/null +++ b/packages/ember/dummy-docs/packages/ember/components/docfy-with-hyphenated-number-2.md @@ -0,0 +1,9 @@ +--- +category: ember +subcategory: components +--- + +# Docfy With Hyphenated Number 2 + +Testing doc pages with numbers in their name and how that corresponds with +automatic component registration. diff --git a/packages/ember/tests/fastboot/docs-test.js b/packages/ember/tests/fastboot/docs-test.js index be6831f..a9666bb 100644 --- a/packages/ember/tests/fastboot/docs-test.js +++ b/packages/ember/tests/fastboot/docs-test.js @@ -25,7 +25,7 @@ module('FastBoot | docs', function (hooks) { assert .dom('[data-test-id="docs-nav"]') .hasText( - 'Welcome to Docfy Introduction Installation Overview @docfy/core Overview Helpers genereateFlatOutput genereateNestedOutput @docfy/ember Working with Ember Installation Components Docfy Link Component Docfy Output Component Plugins Manual Demo Insertion' + 'Welcome to Docfy Introduction Installation Overview @docfy/core Overview Helpers genereateFlatOutput genereateNestedOutput @docfy/ember Working with Ember Installation Components Docfy Link Component Docfy Output Component Docfy With Hyphenated Number 2 Plugins Manual Demo Insertion' ); }); diff --git a/packages/ember/tests/integration/components/docfy-output-test.ts b/packages/ember/tests/integration/components/docfy-output-test.ts index 73aa5da..67e23a3 100644 --- a/packages/ember/tests/integration/components/docfy-output-test.ts +++ b/packages/ember/tests/integration/components/docfy-output-test.ts @@ -49,7 +49,7 @@ module('Integration | Component | DocfyOutput', function (hooks) { assert .dom('[data-test-id="flat-urls"]') .hasText( - '/docs/ /docs/introduction /docs/installation /docs/overview /docs/core/overview /docs/core/helpers/genereate-flat-output /docs/core/helpers/genereate-nested-output /docs/ember/ /docs/ember/installation /docs/ember/components/docfy-link /docs/ember/components/docfy-output /docs/ember/plugins/manual-demo-insertion' + '/docs/ /docs/introduction /docs/installation /docs/overview /docs/core/overview /docs/core/helpers/genereate-flat-output /docs/core/helpers/genereate-nested-output /docs/ember/ /docs/ember/installation /docs/ember/components/docfy-link /docs/ember/components/docfy-output /docs/ember/components/docfy-with-hyphenated-number-2 /docs/ember/plugins/manual-demo-insertion' ); }); diff --git a/packages/ember/tests/unit/demo-component-generation-test.ts b/packages/ember/tests/unit/demo-component-generation-test.ts index d7d1d9b..db89fc5 100644 --- a/packages/ember/tests/unit/demo-component-generation-test.ts +++ b/packages/ember/tests/unit/demo-component-generation-test.ts @@ -20,6 +20,8 @@ module('Unit | Demo component generation', function (hooks) { // dummy/docs/packages/ember/components/docfy-link-demo/{demo-file}.md has('packages-ember-components-docfy-link-demo1'); has('packages-ember-components-docfy-link-demo2'); + // dummy/docs/packages/ember/components/docfy-with-hyphenated-number-2/{demo-file}.md + has('packages-ember-components-docfy-with-hyphenated-number-2-demo1'); // where do these come from? has('preview-ember'); has('preview-ember1'); diff --git a/packages/ember/tests/unit/services/docfy-test.ts b/packages/ember/tests/unit/services/docfy-test.ts index 865132e..065e9f5 100644 --- a/packages/ember/tests/unit/services/docfy-test.ts +++ b/packages/ember/tests/unit/services/docfy-test.ts @@ -119,7 +119,10 @@ module('Unit | Service | docfy', function (hooks) { .stub(routerService, 'currentURL') .get(() => '/docs/ember/plugins/manual-demo-insertion'); - assert.equal(service.previousPage()?.title, 'Docfy Output Component'); + assert.equal( + service.previousPage()?.title, + 'Docfy With Hyphenated Number 2' + ); assert.equal(service.nextPage()?.title, undefined); });