Skip to content

Commit

Permalink
Merge branch 'master' into IA-740-remove-tos-header
Browse files Browse the repository at this point in the history
  • Loading branch information
emiliopavia authored Apr 7, 2022
2 parents 2263255 + 2bfd702 commit a3aefd2
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
7 changes: 5 additions & 2 deletions ts/__e2e__/messages.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,16 @@ describe("Messages Screen", () => {
// exists (but is not visible)

await waitFor(
element(by.id(`MessageListItem_00000000000000000000000021`))
element(by.id(`MessageListItem_00000000000000000000000020`))
)
.toBeVisible()
.withTimeout(e2eWaitRenderTimeout);

// check for infinite scrolling
await element(by.id(`MessageList_inbox`)).scrollTo("bottom");

await waitFor(
element(by.id(`MessageListItem_00000000000000000000000001`))
element(by.id(`MessageListItem_00000000000000000000000008`))
)
.toExist()
.withTimeout(e2eWaitRenderTimeout);
Expand Down
1 change: 1 addition & 0 deletions ts/components/messages/paginated/MessageList/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ const MessageListItem = ({
accessible={true}
accessibilityLabel={announceMessage(message, isRead, maybeItemBadge)}
accessibilityRole="button"
testID={`MessageListItem_${message.id}`}
>
<View style={styles.titleRow}>
<View style={styles.organizationNameWrapper}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ exports[`MessageList Item component when \`isRead\` is true should match the sna
"paddingVertical": 16,
}
}
testID="MessageListItem_PMT00003"
>
<View
style={
Expand Down Expand Up @@ -238,6 +239,7 @@ exports[`MessageList Item component when \`isSelectionModeEnabled\` is true and
"paddingVertical": 16,
}
}
testID="MessageListItem_PMT00003"
>
<View
style={
Expand Down Expand Up @@ -552,6 +554,7 @@ exports[`MessageList Item component when \`isSelectionModeEnabled\` is true and
"paddingVertical": 16,
}
}
testID="MessageListItem_PMT00003"
>
<View
style={
Expand Down Expand Up @@ -866,6 +869,7 @@ exports[`MessageList Item component when category is LEGAL_MESSAGE should match
"paddingVertical": 16,
}
}
testID="MessageListItem_PMT00003"
>
<View
style={
Expand Down Expand Up @@ -1139,6 +1143,7 @@ exports[`MessageList Item component when hasPaidBadge=false category=EU_COVID_CE
"paddingVertical": 16,
}
}
testID="MessageListItem_PMT00003"
>
<View
style={
Expand Down Expand Up @@ -1436,6 +1441,7 @@ exports[`MessageList Item component when hasPaidBadge=false category=GENERIC sho
"paddingVertical": 16,
}
}
testID="MessageListItem_PMT00003"
>
<View
style={
Expand Down Expand Up @@ -1704,6 +1710,7 @@ exports[`MessageList Item component when hasPaidBadge=true category=EU_COVID_CER
"paddingVertical": 16,
}
}
testID="MessageListItem_PMT00003"
>
<View
style={
Expand Down Expand Up @@ -2033,6 +2040,7 @@ exports[`MessageList Item component when hasPaidBadge=true category=GENERIC shou
"paddingVertical": 16,
}
}
testID="MessageListItem_PMT00003"
>
<View
style={
Expand Down Expand Up @@ -2358,6 +2366,7 @@ exports[`MessageList Item component with all the flags set to false should match
"paddingVertical": 16,
}
}
testID="MessageListItem_PMT00003"
>
<View
style={
Expand Down
5 changes: 4 additions & 1 deletion ts/components/messages/paginated/MessageList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ const MessageList = ({
loadPreviousPage,
nextCursor,
previousCursor,
reloadAll
reloadAll,
testID
}: Props) => {
// when filteredMessage is defined, this component is used
// in search, so loading data on demand should be prevented
Expand Down Expand Up @@ -292,6 +293,7 @@ const MessageList = ({
onLayout={handleOnLayoutChange}
onEndReached={onEndReached}
onEndReachedThreshold={0.1}
testID={testID}
ListFooterComponent={renderListFooter}
/>
</>
Expand Down Expand Up @@ -319,6 +321,7 @@ const mapStateToProps = (state: GlobalState, { filter }: OwnProps) => {
const didLoad = pot.isSome(paginatedState);
return {
allMessages,
testID: `MessageList_${isArchive ? "archive" : "inbox"}`,
error,
hasPaidBadge: (category: UIMessage["category"]) =>
isNoticePaid(state, category),
Expand Down

0 comments on commit a3aefd2

Please sign in to comment.