Skip to content

Commit 66cee21

Browse files
committed
refactor: rename SendSending to LongSend; revert unrelated test changes
- Rename LiveRegion/SendSending.tsx -> LiveRegion/LongSend.tsx - Rename component LiveRegionSendSending -> LiveRegionLongSend - Revert unknownActivity.html, fluentTheme/suggestedActions.html, updateActivity/sameActivityId.html to base (unrelated test fixes) - Revert videoCard.html.snap-1.png to base (spurious 1-byte PNG artifact)
1 parent 9c84327 commit 66cee21

6 files changed

Lines changed: 5 additions & 14 deletions

File tree

1 Byte
Loading

__tests__/html2/activity/legacy/unknownActivity.html

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,6 @@
7070
expect(consoleError.mock.calls[0][0].message).toBe('No renderer for activity of type "x-unknown-activity"');
7171

7272
// THEN: Should emit as exception event.
73-
// The telemetry event fires asynchronously; wait for it to appear.
74-
await pageConditions.became(
75-
'telemetry exception event for unknown activity',
76-
() => onTelemetry.mock.calls.some(call => call[0]?.type === 'exception'),
77-
2000
78-
);
79-
8073
const exceptionEvent = onTelemetry.mock.calls.find(call => call[0]?.type === 'exception');
8174

8275
expect(exceptionEvent).toBeTruthy();

__tests__/html2/fluentTheme/suggestedActions.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@
9797
});
9898

9999
// THEN: Should render the activity.
100-
await pageConditions.allImagesLoaded();
101100
await host.snapshot('local');
102101
});
103102
</script>

__tests__/html2/updateActivity/sameActivityId.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
// THEN: Bot should reply with 2 messages. However, we change their `activity.id` to be the same value.
5656
// Thus, only the second message will be shown. And there are 2 messages in total only.
5757
await pageConditions.numActivitiesShown(2);
58-
await pageConditions.scrollToBottomCompleted();
5958

6059
// THEN: It should show 1 outgoing message, and 1 incoming message.
6160
await host.snapshot('local');

packages/component/src/Transcript/LiveRegion/SendSending.tsx renamed to packages/component/src/Transcript/LiveRegion/LongSend.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const SENDING_ANNOUNCEMENT_DELAY = 3000;
1818
*
1919
* Presentational activities (e.g. `event` or `typing`) are excluded to reduce noise.
2020
*/
21-
const LiveRegionSendSending = () => {
21+
const LiveRegionLongSend = () => {
2222
const [sendStatusByActivityKey] = useSendStatusByActivityKey();
2323
const getActivityByKey = useGetActivityByKey();
2424
const localize = useLocalizer();
@@ -93,6 +93,6 @@ const LiveRegionSendSending = () => {
9393
return null;
9494
};
9595

96-
LiveRegionSendSending.displayName = 'LiveRegionSendSending';
96+
LiveRegionLongSend.displayName = 'LiveRegionLongSend';
9797

98-
export default memo(LiveRegionSendSending);
98+
export default memo(LiveRegionLongSend);

packages/component/src/Transcript/LiveRegionTranscript.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import useLocalizeAccessKey from '../hooks/internal/useLocalizeAccessKey';
99
import useSuggestedActionsAccessKey from '../hooks/internal/useSuggestedActionsAccessKey';
1010
import { useQueueStaticElement } from '../providers/LiveRegionTwin';
1111
import LiveRegionSendFailed from './LiveRegion/SendFailed';
12-
import LiveRegionSendSending from './LiveRegion/SendSending';
12+
import LiveRegionLongSend from './LiveRegion/LongSend';
1313
import isPresentational from './LiveRegion/isPresentational';
1414
import useTypistNames from './useTypistNames';
1515

@@ -134,7 +134,7 @@ const LiveRegionTranscript = ({ activityElementMapRef }: LiveRegionTranscriptPro
134134
return (
135135
<React.Fragment>
136136
<LiveRegionSendFailed />
137-
<LiveRegionSendSending />
137+
<LiveRegionLongSend />
138138
</React.Fragment>
139139
);
140140
};

0 commit comments

Comments
 (0)