1- import { describe , expect , usingHar } from '../../har-fixture'
1+ import { describe , expect , using , usingHar } from '../../har-fixture'
22
33// must import fixture **first** for mocks, the `expect` keeps biome from changing sort-order
44expect
@@ -102,7 +102,7 @@ describe('github', () => {
102102 ]
103103 ` )
104104 } )
105- usingHar ( 'gh_issue' ) . it ( 'should create the correct spot object ' , async ( ) => {
105+ usingHar ( 'gh_issue' ) . it ( 'no enhancement on initial page load ' , async ( ) => {
106106 expect ( enhancements ( document , window ) ) . toMatchInlineSnapshot ( `
107107 [
108108 {
@@ -112,6 +112,41 @@ describe('github', () => {
112112 ]
113113 ` )
114114 } )
115+ using( 'gh_issue_populated_comment' ) . it ( 'should create the correct spot object' , async ( ) => {
116+ expect ( enhancements ( document , window ) ) . toMatchInlineSnapshot ( `
117+ [
118+ {
119+ "for": "id=:rn: name=null className=prc-Textarea-TextArea-13q4j overtype-input",
120+ "spot": {
121+ "domain": "github.com",
122+ "number": 523,
123+ "slug": "diffplug/selfie",
124+ "title": "TODO_TITLE",
125+ "type": "GH_ISSUE_ADD_COMMENT",
126+ "unique_key": "github.com:diffplug/selfie:523",
127+ },
128+ "title": "TITLE_TODO",
129+ "upperDecoration": <React.Fragment>
130+ <span
131+ className="flex h-4 w-4 flex-shrink-0 items-center justify-center"
132+ >
133+ <IssueOpenedIcon
134+ size={16}
135+ />
136+ </span>
137+ #
138+ 523
139+ <a
140+ className="truncate hover:underline"
141+ href="https://github.com/diffplug/selfie"
142+ >
143+ diffplug/selfie
144+ </a>
145+ </React.Fragment>,
146+ },
147+ ]
148+ ` )
149+ } )
115150 usingHar ( 'gh_new_issue' ) . it ( 'should create the correct spot object' , async ( ) => {
116151 expect ( enhancements ( document , window ) ) . toMatchInlineSnapshot ( `
117152 [
0 commit comments