Skip to content

Commit a4d6305

Browse files
committed
Update e2ee tests
1 parent 1dac91b commit a4d6305

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

app/views/RoomView/components/EncryptedRoom.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const EncryptedRoom = ({
3434
};
3535

3636
return (
37-
<View style={styles.root}>
37+
<View style={styles.root} testID='room-view-encrypted-room'>
3838
<View style={styles.container}>
3939
<View style={styles.textView}>
4040
<View style={styles.icon}>

e2e/tests/assorted/01-e2eencryption.spec.ts

+7-10
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ import {
1212
tapAndWaitFor,
1313
expectValidRegisterOrRetry,
1414
mockMessage,
15-
tryTapping
15+
tryTapping,
16+
navigateToRoom
1617
} from '../../helpers/app';
1718
import data from '../../data';
1819
import { createRandomUser, deleteCreatedUsers, IDeleteCreateUser, ITestUser } from '../../helpers/data_setup';
@@ -40,14 +41,6 @@ const checkBanner = async () => {
4041
.withTimeout(10000);
4142
};
4243

43-
async function navigateToRoom(roomName: string) {
44-
await searchRoom(`${roomName}`);
45-
await element(by.id(`rooms-list-view-item-${roomName}`)).tap();
46-
await waitFor(element(by.id('room-view')))
47-
.toBeVisible()
48-
.withTimeout(5000);
49-
}
50-
5144
async function waitForToast() {
5245
await sleep(300);
5346
}
@@ -298,7 +291,9 @@ describe('E2E Encryption', () => {
298291
await waitFor(element(by[textMatcher](mockedMessageText)).atIndex(0))
299292
.not.toExist()
300293
.withTimeout(2000);
301-
await expect(element(by.label('Encrypted message')).atIndex(0)).toExist();
294+
await waitFor(element(by.id('room-view-encrypted-room')))
295+
.toBeVisible()
296+
.withTimeout(2000);
302297
});
303298

304299
it('should enter new e2e password and messages should be decrypted', async () => {
@@ -431,4 +426,6 @@ describe('E2E Encryption', () => {
431426
await checkBanner();
432427
});
433428
});
429+
430+
// TODO: missing request e2ee room key
434431
});

0 commit comments

Comments
 (0)