Skip to content

Commit 47e511f

Browse files
committed
adjust spacing for comment readability
1 parent 114e455 commit 47e511f

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

tests/ui/LHNItemsPresence.tsx

+18-1
Original file line numberDiff line numberDiff line change
@@ -108,16 +108,21 @@ describe('SidebarLinksData', () => {
108108
// When the SidebarLinks are rendered without a specified report ID.
109109
LHNTestUtils.getDefaultRenderedSidebarLinks();
110110
const report = createReport();
111+
111112
// And the Onyx state is initialized with a report.
112113
await initializeState({
113114
[`${ONYXKEYS.COLLECTION.REPORT}${report.reportID}`]: report,
114115
});
116+
115117
// Then no other reports should be displayed in the sidebar.
116118
expect(getOptionRows()).toHaveLength(0);
119+
117120
// When the SidebarLinks are rendered again with the current active report ID.
118121
LHNTestUtils.getDefaultRenderedSidebarLinks(report.reportID);
122+
119123
// Then the active report should be displayed as part of LHN,
120124
expect(getOptionRows()).toHaveLength(1);
125+
121126
// And the active report should be highlighted.
122127
// TODO add the proper assertion for the highlighted report.
123128
});
@@ -129,16 +134,20 @@ describe('SidebarLinksData', () => {
129134
...createReport(false, [1, 2], 0),
130135
writeCapability: CONST.REPORT.WRITE_CAPABILITIES.ALL,
131136
};
137+
132138
// And Onyx state is initialized with a draft report.
133139
await initializeState({
134140
[`${ONYXKEYS.COLLECTION.REPORT}${draftReport.reportID}`]: draftReport,
135141
});
136142

137143
await waitForBatchedUpdatesWithAct();
144+
138145
// And a draft message is added to the report.
139146
await Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT_DRAFT_COMMENT}${draftReport.reportID}`, 'draft report message');
147+
140148
// Then the sidebar should display the draft report.
141149
expect(getDisplayNames()).toHaveLength(1);
150+
142151
// And the draft icon should be shown, indicating there is unsent content.
143152
expect(screen.getByTestId('Pencil Icon')).toBeOnTheScreen();
144153
});
@@ -147,18 +156,22 @@ describe('SidebarLinksData', () => {
147156
// When the SidebarLinks are rendered.
148157
LHNTestUtils.getDefaultRenderedSidebarLinks();
149158
const report = createReport(false);
159+
150160
// And the report is initialized in Onyx.
151161
await initializeState({
152162
[`${ONYXKEYS.COLLECTION.REPORT}${report.reportID}`]: report,
153163
});
164+
154165
// Then the report should not appear in the sidebar as it is not pinned.
155166
expect(getOptionRows()).toHaveLength(0);
156-
157167
await waitForBatchedUpdatesWithAct();
168+
158169
// When the report is marked as pinned.
159170
await Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT}${report.reportID}`, {isPinned: true});
171+
160172
// Then the report should appear in the sidebar because it’s pinned.
161173
expect(getOptionRows()).toHaveLength(1);
174+
162175
// TODO add the proper assertion for the pinned report.
163176
});
164177
});
@@ -168,10 +181,12 @@ describe('SidebarLinksData', () => {
168181
// When the SidebarLinks are rendered.
169182
LHNTestUtils.getDefaultRenderedSidebarLinks();
170183
const report = LHNTestUtils.getFakeReport([]);
184+
171185
// And a report with no participants is initialized in Onyx.
172186
await initializeState({
173187
[`${ONYXKEYS.COLLECTION.REPORT}${report.reportID}`]: report,
174188
});
189+
175190
// Then the report should not appear in the sidebar.
176191
expect(getOptionRows()).toHaveLength(0);
177192
});
@@ -180,10 +195,12 @@ describe('SidebarLinksData', () => {
180195
// When the SidebarLinks are rendered.
181196
LHNTestUtils.getDefaultRenderedSidebarLinks();
182197
const report = LHNTestUtils.getFakeReport([1, 2], 0);
198+
183199
// And a report with no messages is initialized in Onyx
184200
await initializeState({
185201
[`${ONYXKEYS.COLLECTION.REPORT}${report.reportID}`]: report,
186202
});
203+
187204
// Then the empty report should not appear in the sidebar.
188205
expect(getOptionRows()).toHaveLength(0);
189206
});

tests/ui/UnreadIndicatorsTest.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import waitForBatchedUpdates from '../utils/waitForBatchedUpdates';
2929
import waitForBatchedUpdatesWithAct from '../utils/waitForBatchedUpdatesWithAct';
3030

3131
// We need a large timeout here as we are lazy loading React Navigation screens and this test is running against the entire mounted App
32-
jest.setTimeout(30000);
32+
jest.setTimeout(60000);
3333

3434
jest.mock('@react-navigation/native');
3535
jest.mock('../../src/libs/Notification/LocalNotification');

0 commit comments

Comments
 (0)