diff --git a/build/Targets.fs b/build/Targets.fs index f9c04512b..b5a1a69cb 100644 --- a/build/Targets.fs +++ b/build/Targets.fs @@ -134,7 +134,7 @@ let private runTests (testSuite: TestSuite) _ = let testFilter = match testSuite with | All -> [] - | Unit -> ["--filter"; "FullyQualifiedName~.Tests"] + | Unit -> ["--filter"; "FullyQualifiedName~.Tests|FullyQualifiedName~AuthoringTests"] | Integration -> ["--filter"; "FullyQualifiedName~.IntegrationTests"] exec { diff --git a/tests/authoring/Applicability/ApplicableToComponent.fs b/tests/authoring/Applicability/ApplicableToComponent.fs index 515e632d2..c2487cbf3 100644 --- a/tests/authoring/Applicability/ApplicableToComponent.fs +++ b/tests/authoring/Applicability/ApplicableToComponent.fs @@ -2,7 +2,7 @@ // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information -module ``product availability``.``applicable to component`` +module ``AuthoringTests``.``product availability``.``applicable to component`` open Elastic.Documentation.AppliesTo open Elastic.Markdown.Myst.Directives.AppliesTo diff --git a/tests/authoring/Applicability/AppliesToDirective.fs b/tests/authoring/Applicability/AppliesToDirective.fs index eda18b211..3cff502bc 100644 --- a/tests/authoring/Applicability/AppliesToDirective.fs +++ b/tests/authoring/Applicability/AppliesToDirective.fs @@ -2,7 +2,7 @@ // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information -module ``product availability``.``yaml directive`` +module ``AuthoringTests``.``product availability``.``yaml directive`` open Elastic.Documentation.AppliesTo open Elastic.Markdown.Myst.Directives.AppliesTo diff --git a/tests/authoring/Applicability/AppliesToFrontMatter.fs b/tests/authoring/Applicability/AppliesToFrontMatter.fs index 89d970e69..3901681c2 100644 --- a/tests/authoring/Applicability/AppliesToFrontMatter.fs +++ b/tests/authoring/Applicability/AppliesToFrontMatter.fs @@ -2,7 +2,7 @@ // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information -module ``product availability``.``yaml frontmatter`` +module ``AuthoringTests``.``product availability``.``yaml frontmatter`` open Elastic.Documentation.AppliesTo open JetBrains.Annotations diff --git a/tests/authoring/Blocks/Admonitions.fs b/tests/authoring/Blocks/Admonitions.fs index da416f54c..d7efdb64b 100644 --- a/tests/authoring/Blocks/Admonitions.fs +++ b/tests/authoring/Blocks/Admonitions.fs @@ -1,7 +1,7 @@ // Licensed to Elasticsearch B.V under one or more agreements. // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information -module ``block elements``.``admonition elements`` +module ``AuthoringTests``.``block elements``.``admonition elements`` open Xunit open authoring diff --git a/tests/authoring/Blocks/CodeBlocks/CodeBlocks.fs b/tests/authoring/Blocks/CodeBlocks/CodeBlocks.fs index 287bdee02..7a0109bbb 100644 --- a/tests/authoring/Blocks/CodeBlocks/CodeBlocks.fs +++ b/tests/authoring/Blocks/CodeBlocks/CodeBlocks.fs @@ -2,7 +2,7 @@ // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information -module ``block elements``.``code blocks`` +module ``AuthoringTests``.``block elements``.``code blocks`` open Elastic.Markdown.Myst.CodeBlocks open Swensen.Unquote diff --git a/tests/authoring/Blocks/ImageBlocks.fs b/tests/authoring/Blocks/ImageBlocks.fs index 2230bb8f6..e1fae7cf2 100644 --- a/tests/authoring/Blocks/ImageBlocks.fs +++ b/tests/authoring/Blocks/ImageBlocks.fs @@ -1,7 +1,7 @@ // Licensed to Elasticsearch B.V under one or more agreements. // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information -module ``block elements``.``image blocks`` +module ``AuthoringTests``.``block elements``.``image blocks`` open Xunit open authoring diff --git a/tests/authoring/Blocks/Lists.fs b/tests/authoring/Blocks/Lists.fs index 6aa560e35..b2dda5955 100644 --- a/tests/authoring/Blocks/Lists.fs +++ b/tests/authoring/Blocks/Lists.fs @@ -1,7 +1,7 @@ // Licensed to Elasticsearch B.V under one or more agreements. // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information -module ``block elements``.``list elements`` +module ``AuthoringTests``.``block elements``.``list elements`` open Xunit open authoring diff --git a/tests/authoring/Container/DefinitionLists.fs b/tests/authoring/Container/DefinitionLists.fs index 882f3e9e3..75a69193c 100644 --- a/tests/authoring/Container/DefinitionLists.fs +++ b/tests/authoring/Container/DefinitionLists.fs @@ -2,7 +2,7 @@ // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information -module ``container elements``.``vertical definition lists`` +module ``AuthoringTests``.``container elements``.``vertical definition lists`` open Xunit open authoring diff --git a/tests/authoring/Directives/IncludeBlocks.fs b/tests/authoring/Directives/IncludeBlocks.fs index 5199e105a..6e859a7ca 100644 --- a/tests/authoring/Directives/IncludeBlocks.fs +++ b/tests/authoring/Directives/IncludeBlocks.fs @@ -2,7 +2,7 @@ // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information -module ``directive elements``.``include directive`` +module ``AuthoringTests``.``directive elements``.``include directive`` open Swensen.Unquote open Xunit diff --git a/tests/authoring/Framework/MarkdownDocumentAssertions.fs b/tests/authoring/Framework/MarkdownDocumentAssertions.fs index 315bd119a..0aec36215 100644 --- a/tests/authoring/Framework/MarkdownDocumentAssertions.fs +++ b/tests/authoring/Framework/MarkdownDocumentAssertions.fs @@ -31,9 +31,10 @@ module MarkdownDocumentAssertions = let actual = actual.Value let result = actual.MarkdownResults |> Seq.find (fun r -> r.File.RelativePath = "index.md") let matter = result.File.YamlFrontMatter - matter.AppliesTo.Diagnostics <- expectedAvailability.Diagnostics match matter with | NonNull m -> + if expectedAvailability <> null then + m.AppliesTo.Diagnostics <- expectedAvailability.Diagnostics let apply = m.AppliesTo test <@ apply = expectedAvailability @> | _ -> failwithf "%s has no yamlfront matter" result.File.RelativePath diff --git a/tests/authoring/Generator/LinkReferenceFile.fs b/tests/authoring/Generator/LinkReferenceFile.fs index f8fbe3c24..7c60b8c0f 100644 --- a/tests/authoring/Generator/LinkReferenceFile.fs +++ b/tests/authoring/Generator/LinkReferenceFile.fs @@ -2,7 +2,7 @@ // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information -module ``documentation generator``.``links json artifact`` +module ``AuthoringTests``.``documentation generator``.``links json artifact`` open Xunit open authoring diff --git a/tests/authoring/Inline/AppliesToRole.fs b/tests/authoring/Inline/AppliesToRole.fs index a035cc072..6583a0d79 100644 --- a/tests/authoring/Inline/AppliesToRole.fs +++ b/tests/authoring/Inline/AppliesToRole.fs @@ -2,7 +2,7 @@ // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information -module ``inline elements``.``applies_to role`` +module ``AuthoringTests``.``inline elements``.``applies_to role`` open Elastic.Documentation.AppliesTo open Elastic.Markdown.Myst.Roles.AppliesTo diff --git a/tests/authoring/Inline/Comments.fs b/tests/authoring/Inline/Comments.fs index c325beb90..5742bb2e4 100644 --- a/tests/authoring/Inline/Comments.fs +++ b/tests/authoring/Inline/Comments.fs @@ -2,7 +2,7 @@ // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information -module ``inline elements``.``comment block`` +module ``AuthoringTests``.``inline elements``.``comment block`` open Xunit open authoring @@ -17,4 +17,3 @@ not a comment [] let ``validate HTML: commented line should not be emitted`` () = markdown |> convertsToHtml """

not a comment

""" - diff --git a/tests/authoring/Inline/CrossLinkRedirectAnchors.fs b/tests/authoring/Inline/CrossLinkRedirectAnchors.fs index 1e0be3ea4..c563b4ab3 100644 --- a/tests/authoring/Inline/CrossLinkRedirectAnchors.fs +++ b/tests/authoring/Inline/CrossLinkRedirectAnchors.fs @@ -2,7 +2,7 @@ // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information -module ``inline elements``.``complex anchors`` +module ``AuthoringTests``.``inline elements``.``complex anchors`` open Xunit open authoring.CrossLinkResolverAssertions @@ -82,4 +82,4 @@ type ``Scenario 2: complex redirect mapping with anchor passing for fallback red let ``topic-b-config redirects to topic-b-subpage and drops anchor (null target)``() = resolvesTo "docs-content://testing/redirects/multi-topic-page-2-old.md#topic-b-config" - "/testing/redirects/multi-topic-page-2-new-topic-b-subpage" \ No newline at end of file + "/testing/redirects/multi-topic-page-2-new-topic-b-subpage" diff --git a/tests/authoring/Inline/CrossLinks.fs b/tests/authoring/Inline/CrossLinks.fs index dc56dfa7d..c4bccbb2f 100644 --- a/tests/authoring/Inline/CrossLinks.fs +++ b/tests/authoring/Inline/CrossLinks.fs @@ -2,7 +2,7 @@ // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information -module ``inline elements``.``cross links`` +module ``AuthoringTests``.``inline elements``.``cross links`` open Xunit open authoring @@ -143,4 +143,4 @@ type ``link to repository that does not resolve yet using double slashes`` () = let ``error when not found in links.json`` () = markdown |> hasError("'elasticsearch' was not found in the cross link index") [] - let ``has no warning`` () = markdown |> hasNoWarnings \ No newline at end of file + let ``has no warning`` () = markdown |> hasNoWarnings diff --git a/tests/authoring/Inline/CrossLinksRedirects.fs b/tests/authoring/Inline/CrossLinksRedirects.fs index c7c1b5f22..1a212a458 100644 --- a/tests/authoring/Inline/CrossLinksRedirects.fs +++ b/tests/authoring/Inline/CrossLinksRedirects.fs @@ -2,7 +2,7 @@ // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information -module ``inline elements``.``cross links redirects`` +module ``AuthoringTests``.``inline elements``.``cross links redirects`` open Xunit open authoring @@ -164,4 +164,3 @@ type ``Scenario 5: Deleting an entire page`` () = markdown |> convertsToHtml $"""

Scenario 5

""" - diff --git a/tests/authoring/Inline/InlineAnchors.fs b/tests/authoring/Inline/InlineAnchors.fs index e068f4f54..d036e9e50 100644 --- a/tests/authoring/Inline/InlineAnchors.fs +++ b/tests/authoring/Inline/InlineAnchors.fs @@ -2,7 +2,7 @@ // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information -module ``inline elements``.``anchors DEPRECATED`` +module ``AuthoringTests``.``inline elements``.``anchors DEPRECATED`` open Elastic.Markdown.Myst.InlineParsers open Markdig.Syntax diff --git a/tests/authoring/Inline/InlineAppliesTo.fs b/tests/authoring/Inline/InlineAppliesTo.fs index 7b099111a..716193074 100644 --- a/tests/authoring/Inline/InlineAppliesTo.fs +++ b/tests/authoring/Inline/InlineAppliesTo.fs @@ -2,7 +2,7 @@ // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information -module ``inline elements``.``image`` +module ``AuthoringTests``.``inline elements``.``image`` open Xunit open authoring diff --git a/tests/authoring/Inline/InlineLinks.fs b/tests/authoring/Inline/InlineLinks.fs index 479e222df..160ec6593 100644 --- a/tests/authoring/Inline/InlineLinks.fs +++ b/tests/authoring/Inline/InlineLinks.fs @@ -2,7 +2,7 @@ // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information -module ``inline elements``.``links`` +module ``AuthoringTests``.``inline elements``.``links`` open Xunit open authoring diff --git a/tests/authoring/Inline/KbdRole.fs b/tests/authoring/Inline/KbdRole.fs index e72567dc0..d0c821b31 100644 --- a/tests/authoring/Inline/KbdRole.fs +++ b/tests/authoring/Inline/KbdRole.fs @@ -2,7 +2,7 @@ // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information -module ``inline elements``.``kbd role`` +module ``AuthoringTests``.``inline elements``.``kbd role`` open Xunit open authoring diff --git a/tests/authoring/Inline/RelativeLinks.fs b/tests/authoring/Inline/RelativeLinks.fs index 0060e9984..809c0069b 100644 --- a/tests/authoring/Inline/RelativeLinks.fs +++ b/tests/authoring/Inline/RelativeLinks.fs @@ -2,7 +2,7 @@ // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information -module ``inline elements``.``relative links`` +module ``AuthoringTests``.``inline elements``.``relative links`` open Xunit open authoring @@ -54,5 +54,3 @@ Through various means $$$including-this-inline-syntax$$$ [] let ``has no errors`` () = generator |> hasNoErrors - - diff --git a/tests/authoring/Inline/SubstitutionMutations.fs b/tests/authoring/Inline/SubstitutionMutations.fs index 6929efeff..50600f0ee 100644 --- a/tests/authoring/Inline/SubstitutionMutations.fs +++ b/tests/authoring/Inline/SubstitutionMutations.fs @@ -2,7 +2,7 @@ // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information -module ``inline elements``.``substitution mutations`` +module ``AuthoringTests``.``inline elements``.``substitution mutations`` open Xunit open authoring diff --git a/tests/authoring/Inline/Substitutions.fs b/tests/authoring/Inline/Substitutions.fs index 2ab97fa6e..e79446d46 100644 --- a/tests/authoring/Inline/Substitutions.fs +++ b/tests/authoring/Inline/Substitutions.fs @@ -2,7 +2,7 @@ // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information -module ``inline elements``.``substitutions`` +module ``AuthoringTests``.``inline elements``.``substitutions`` open Xunit open authoring diff --git a/tests/authoring/Linters/WhiteSpaceNormalizers.fs b/tests/authoring/Linters/WhiteSpaceNormalizers.fs index 3f8e44ddd..8d9391148 100644 --- a/tests/authoring/Linters/WhiteSpaceNormalizers.fs +++ b/tests/authoring/Linters/WhiteSpaceNormalizers.fs @@ -2,7 +2,7 @@ // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information -module ``linters``.``white space normalizers`` +module ``AuthoringTests``.``linters``.``white space normalizers`` open Xunit open authoring diff --git a/tests/authoring/LlmMarkdown/LlmMarkdownOutput.fs b/tests/authoring/LlmMarkdown/LlmMarkdownOutput.fs index 01e9f6992..cf7ecb8da 100644 --- a/tests/authoring/LlmMarkdown/LlmMarkdownOutput.fs +++ b/tests/authoring/LlmMarkdown/LlmMarkdownOutput.fs @@ -2,7 +2,7 @@ // Elasticsearch B.V licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information -module ``llm markdown``.``output tests`` +module ``AuthoringTests``.``llm markdown``.``output tests`` open Swensen.Unquote open Xunit