@@ -737,6 +737,53 @@ class AutomaticCurationTests: XCTestCase {
737
737
try assertAutomaticCuration ( variants: [ ] )
738
738
try assertAutomaticCuration ( variants: [ . swift] )
739
739
}
740
+
741
+ func testAutomaticCurationDropsOverloadGroupWhenOverloadsAreCurated( ) throws {
742
+ enableFeatureFlag ( \. isExperimentalOverloadedSymbolPresentationEnabled)
743
+
744
+ let ( _, bundle, context) = try testBundleAndContext ( copying: " OverloadedSymbols " ) { url in
745
+ try """
746
+ # ``OverloadedProtocol``
747
+
748
+ This is a protocol's docs.
749
+
750
+ ## Topics
751
+
752
+ - ``fourthTestMemberName(test:)-1h173``
753
+ - ``fourthTestMemberName(test:)-8iuz7``
754
+ - ``fourthTestMemberName(test:)-91hxs``
755
+ - ``fourthTestMemberName(test:)-961zx``
756
+ """ . write ( to: url. appendingPathComponent ( " OverloadedProtocol.md " ) , atomically: true , encoding: . utf8)
757
+ }
758
+
759
+ let protocolDocumentationNode = try context. entity (
760
+ with: . init(
761
+ bundleIdentifier: bundle. identifier,
762
+ path: " /documentation/ShapeKit/OverloadedProtocol " ,
763
+ sourceLanguage: . swift) )
764
+
765
+ // Compile the render node to flex the automatic curator
766
+ let symbol = protocolDocumentationNode. semantic as! Symbol
767
+ var translator = RenderNodeTranslator (
768
+ context: context,
769
+ bundle: bundle,
770
+ identifier: protocolDocumentationNode. reference,
771
+ source: nil )
772
+ let renderNode = translator. visit ( symbol) as! RenderNode
773
+
774
+ XCTAssertEqual ( renderNode. topicSections. count, 1 )
775
+
776
+ // The page should not contain a reference to the overload group node, which would otherwise
777
+ // be automatically curated into an "Instance Methods" topic group with a hash suffix of 9b6be
778
+ let curatedTopic = try XCTUnwrap ( renderNode. topicSections. first)
779
+ XCTAssertEqual ( curatedTopic. title, nil )
780
+ XCTAssertEqual ( curatedTopic. identifiers, [
781
+ " doc://com.shapes.ShapeKit/documentation/ShapeKit/OverloadedProtocol/fourthTestMemberName(test:)-1h173 " ,
782
+ " doc://com.shapes.ShapeKit/documentation/ShapeKit/OverloadedProtocol/fourthTestMemberName(test:)-8iuz7 " ,
783
+ " doc://com.shapes.ShapeKit/documentation/ShapeKit/OverloadedProtocol/fourthTestMemberName(test:)-91hxs " ,
784
+ " doc://com.shapes.ShapeKit/documentation/ShapeKit/OverloadedProtocol/fourthTestMemberName(test:)-961zx " ,
785
+ ] )
786
+ }
740
787
}
741
788
742
789
private func makeSymbol(
0 commit comments