@@ -1291,7 +1291,7 @@ test("selecting a persona mention reuses an existing persona agent", async ({
12911291 await expect ( mentionChip ) . toHaveText ( "Fizz" ) ;
12921292} ) ;
12931293
1294- test ( "managed relay-profile agents with member roles use the agent address tray " , async ( {
1294+ test ( "managed relay-profile agents with member roles can be addressed explicitly " , async ( {
12951295 page,
12961296} ) => {
12971297 await installMockBridge ( page , {
@@ -1317,9 +1317,17 @@ test("managed relay-profile agents with member roles use the agent address tray"
13171317 await input . fill ( "@char" ) ;
13181318
13191319 const dropdown = autocomplete ( page ) ;
1320- await expect ( dropdown . getByText ( "charlie" ) ) . toBeVisible ( ) ;
1321- await expect ( dropdown . getByText ( "agent" ) ) . toBeVisible ( ) ;
1322- await input . press ( "Enter" ) ;
1320+ const charlieRow = dropdown . getByTestId (
1321+ `mention-suggestion-${ TEST_IDENTITIES . charlie . pubkey } ` ,
1322+ ) ;
1323+ await expect ( charlieRow . getByText ( "charlie" ) ) . toBeVisible ( ) ;
1324+ await expect ( charlieRow . getByText ( "agent" ) ) . toBeVisible ( ) ;
1325+ await charlieRow
1326+ . getByRole ( "button" , {
1327+ name : "Automatically mention charlie" ,
1328+ exact : true ,
1329+ } )
1330+ . click ( ) ;
13231331
13241332 await expect ( input ) . toBeEmpty ( ) ;
13251333 await expect (
@@ -2648,7 +2656,7 @@ test("system member-joined rows render the joined person as a plain profile name
26482656 await expect ( joinedPersonName ) . not . toHaveAttribute ( "data-mention" ) ;
26492657} ) ;
26502658
2651- test ( "selecting a managed non-member agent from a DM addresses it " , async ( {
2659+ test ( "a managed non-member agent from a DM can be addressed explicitly " , async ( {
26522660 page,
26532661} ) => {
26542662 await installMockBridge ( page , {
@@ -2668,10 +2676,18 @@ test("selecting a managed non-member agent from a DM addresses it", async ({
26682676 await input . fill ( "@char" ) ;
26692677
26702678 const dropdown = autocomplete ( page ) ;
2671- await expect ( dropdown . getByText ( "charlie" ) ) . toBeVisible ( ) ;
2679+ const charlieRow = dropdown . getByTestId (
2680+ `mention-suggestion-${ TEST_IDENTITIES . charlie . pubkey } ` ,
2681+ ) ;
2682+ await expect ( charlieRow . getByText ( "charlie" ) ) . toBeVisible ( ) ;
26722683 await expect ( autocomplete ( page ) ) . toHaveCount ( 1 ) ;
26732684 await expect ( input . locator ( ".mention-chip" ) ) . toHaveCount ( 0 ) ;
2674- await input . press ( "Enter" ) ;
2685+ await charlieRow
2686+ . getByRole ( "button" , {
2687+ name : "Automatically mention charlie" ,
2688+ exact : true ,
2689+ } )
2690+ . click ( ) ;
26752691
26762692 await expect ( input ) . toBeEmpty ( ) ;
26772693 await expect ( input . locator ( ".mention-chip" ) ) . toHaveCount ( 0 ) ;
0 commit comments