mirror of
https://github.com/oxen-io/session-desktop.git
synced 2023-12-14 02:12:57 +01:00
Changing tests names to match appium
This commit is contained in:
parent
e7709b3f7c
commit
5e2e3840cf
|
@ -14,7 +14,7 @@ import {
|
|||
|
||||
test.beforeEach(beforeAllClean);
|
||||
|
||||
test('Check group syncs', async () => {
|
||||
test('Check group and name syncs', async () => {
|
||||
const [windowA, windowC, windowD] = await openApp(3);
|
||||
const [userA, userB, userC] = await Promise.all([
|
||||
newUser(windowA, 'Alice'),
|
||||
|
@ -36,7 +36,7 @@ test('Check group syncs', async () => {
|
|||
await waitForTestIdWithText(windowB, 'module-conversation__user__profile-name', group.userName);
|
||||
});
|
||||
|
||||
test('Check leaving group syncs', async () => {
|
||||
test('Leaving group syncs', async () => {
|
||||
const [windowA, windowC, windowD] = await openApp(3);
|
||||
const [userA, userB, userC] = await Promise.all([
|
||||
newUser(windowA, 'Alice'),
|
||||
|
|
|
@ -51,7 +51,7 @@ test('Link a device', async () => {
|
|||
}
|
||||
});
|
||||
|
||||
test('Check changed username syncs', async () => {
|
||||
test('Changed username syncs', async () => {
|
||||
const [windowA] = await openApp(1);
|
||||
const userA = await newUser(windowA, 'Alice');
|
||||
const [windowB] = await linkedDevice(userA.recoveryPhrase);
|
||||
|
@ -71,7 +71,7 @@ test('Check changed username syncs', async () => {
|
|||
await waitForTestIdWithText(windowB, 'your-profile-name', newUsername);
|
||||
});
|
||||
|
||||
test('Check profile picture syncs', async () => {
|
||||
test('Profile picture syncs', async () => {
|
||||
const [windowA] = await openApp(1);
|
||||
const userA = await newUser(windowA, 'Alice');
|
||||
const [windowB] = await linkedDevice(userA.recoveryPhrase);
|
||||
|
@ -96,19 +96,19 @@ test('Check profile picture syncs', async () => {
|
|||
expect(screenshot).toMatchSnapshot({ name: 'avatar-updated-blue.jpeg' });
|
||||
});
|
||||
|
||||
test('Check contacts sync', async () => {
|
||||
test('Contact syncs', async () => {
|
||||
const [windowA, windowC] = await openApp(2);
|
||||
const [userA, userB] = await Promise.all([newUser(windowA, 'Alice'), newUser(windowC, 'Bob')]);
|
||||
const [windowB] = await linkedDevice(userA.recoveryPhrase);
|
||||
// Waiting for linked device to finish loading
|
||||
await waitForLoadingAnimationToFinish(windowB, 'loading-spinner');
|
||||
await createContact(windowA, windowC, userA, userB);
|
||||
// Check linked device (windowB)
|
||||
// linked device (windowB)
|
||||
await waitForTestIdWithText(windowB, 'module-conversation__user__profile-name', userB.userName);
|
||||
console.info('Contacts correctly synced');
|
||||
});
|
||||
|
||||
test('Check deleted message syncs', async () => {
|
||||
test('Deleted message syncs', async () => {
|
||||
const [windowA, windowC] = await openApp(2);
|
||||
const [userA, userB] = await Promise.all([newUser(windowA, 'Alice'), newUser(windowC, 'Bob')]);
|
||||
const [windowB] = await linkedDevice(userA.recoveryPhrase);
|
||||
|
@ -116,7 +116,7 @@ test('Check deleted message syncs', async () => {
|
|||
await waitForLoadingAnimationToFinish(windowB, 'loading-spinner');
|
||||
await createContact(windowA, windowC, userA, userB);
|
||||
await sendMessage(windowA, deletedMessage);
|
||||
// Navigate to conversation on linked device and check for message from user A to user B
|
||||
// Navigate to conversation on linked device and for message from user A to user B
|
||||
await clickOnTestIdWithText(windowB, 'module-conversation__user__profile-name', userB.userName);
|
||||
await waitForTextMessage(windowB, deletedMessage);
|
||||
await waitForTextMessage(windowC, deletedMessage);
|
||||
|
@ -125,7 +125,7 @@ test('Check deleted message syncs', async () => {
|
|||
await clickOnMatchingText(windowA, 'Delete');
|
||||
await waitForTestIdWithText(windowA, 'session-toast', 'Deleted');
|
||||
await hasTextElementBeenDeleted(windowA, deletedMessage, 1000);
|
||||
// Check linked device for deleted message
|
||||
// linked device for deleted message
|
||||
// Waiting for message to be removed
|
||||
await sleepFor(5000);
|
||||
await hasTextElementBeenDeleted(windowB, deletedMessage, 1000);
|
||||
|
@ -133,7 +133,7 @@ test('Check deleted message syncs', async () => {
|
|||
await waitForMatchingText(windowC, deletedMessage);
|
||||
});
|
||||
|
||||
test('Check unsent message syncs', async () => {
|
||||
test('Unsent message syncs', async () => {
|
||||
const [windowA, windowC] = await openApp(2);
|
||||
const [userA, userB] = await Promise.all([newUser(windowA, 'Alice'), newUser(windowC, 'Bob')]);
|
||||
const [windowB] = await linkedDevice(userA.recoveryPhrase);
|
||||
|
@ -141,7 +141,7 @@ test('Check unsent message syncs', async () => {
|
|||
await waitForLoadingAnimationToFinish(windowB, 'loading-spinner');
|
||||
await createContact(windowA, windowC, userA, userB);
|
||||
await sendMessage(windowA, unsentMessage);
|
||||
// Navigate to conversation on linked device and check for message from user A to user B
|
||||
// Navigate to conversation on linked device and for message from user A to user B
|
||||
await clickOnTestIdWithText(windowB, 'module-conversation__user__profile-name', userB.userName);
|
||||
await waitForTextMessage(windowB, unsentMessage);
|
||||
await waitForTextMessage(windowC, unsentMessage);
|
||||
|
@ -151,11 +151,11 @@ test('Check unsent message syncs', async () => {
|
|||
await waitForTestIdWithText(windowA, 'session-toast', 'Deleted');
|
||||
await hasTextElementBeenDeleted(windowA, unsentMessage, 1000);
|
||||
await waitForMatchingText(windowC, 'This message has been deleted');
|
||||
// Check linked device for deleted message
|
||||
// linked device for deleted message
|
||||
await hasTextElementBeenDeleted(windowB, unsentMessage, 1000);
|
||||
});
|
||||
|
||||
// test('Check blocked user syncs', async () => {
|
||||
// test('Blocked user syncs', async () => {
|
||||
// const [windowA, windowC] = await openApp(2);
|
||||
// const [userA, userB] = await Promise.all([newUser(windowA, 'Alice'), newUser(windowC, 'Bob')]);
|
||||
// const [windowB] = await linkedDevice(userA.recoveryPhrase);
|
||||
|
@ -163,16 +163,16 @@ test('Check unsent message syncs', async () => {
|
|||
// await waitForLoadingAnimationToFinish(windowB, 'loading-spinner');
|
||||
// await createContact(windowA, windowC, userA, userB);
|
||||
// await sendMessage(windowA, testMessage);
|
||||
// // Navigate to conversation on linked device and check for message from user A to user B
|
||||
// // Navigate to conversation on linked device and for message from user A to user B
|
||||
// await clickOnTestIdWithText(windowB, 'module-conversation__user__profile-name', userB.userName);
|
||||
// await clickOnElement(windowA, 'data-testid', 'three-dots-conversation-options');
|
||||
// await clickOnMatchingText(windowA, 'Block');
|
||||
// await waitForTestIdWithText(windowA, 'session-toast', 'Blocked');
|
||||
// await waitForMatchingText(windowA, 'Unblock this contact to send a message.');
|
||||
// // Check linked device for blocked contact in settings screen
|
||||
// // linked device for blocked contact in settings screen
|
||||
// await clickOnTestIdWithText(windowB, 'settings-section');
|
||||
// await clickOnTestIdWithText(windowB, 'conversations-settings-menu-item');
|
||||
// await clickOnTestIdWithText(windowB, 'reveal-blocked-user-settings');
|
||||
// // Check if user B is in blocked contact list
|
||||
// // if user B is in blocked contact list
|
||||
// await waitForMatchingText(windowB, userB.userName);
|
||||
// });
|
||||
|
|
|
@ -22,7 +22,7 @@ import {
|
|||
|
||||
test.beforeEach(beforeAllClean);
|
||||
|
||||
test('Send image and reply test', async () => {
|
||||
test('Send image', async () => {
|
||||
const [windowA, windowB] = await openApp(2);
|
||||
const [userA, userB] = await Promise.all([newUser(windowA, 'Alice'), newUser(windowB, 'Bob')]);
|
||||
const testMessage = `${userA.userName} sending image to ${userB.userName}`;
|
||||
|
@ -43,7 +43,7 @@ test('Send image and reply test', async () => {
|
|||
await replyTo(windowB, testMessage, testReply);
|
||||
});
|
||||
|
||||
test('Send video and reply test', async () => {
|
||||
test('Send video', async () => {
|
||||
const [windowA, windowB] = await openApp(2);
|
||||
const [userA, userB] = await Promise.all([newUser(windowA, 'Alice'), newUser(windowB, 'Bob')]);
|
||||
const testMessage = `${userA.userName} sending video to ${userB.userName}`;
|
||||
|
@ -63,7 +63,7 @@ test('Send video and reply test', async () => {
|
|||
await replyTo(windowB, testMessage, testReply);
|
||||
});
|
||||
|
||||
test('Send document and reply test', async () => {
|
||||
test('Send document', async () => {
|
||||
const [windowA, windowB] = await openApp(2);
|
||||
const [userA, userB] = await Promise.all([newUser(windowA, 'Alice'), newUser(windowB, 'Bob')]);
|
||||
const testMessage = `${userA.userName} sending document to ${userB.userName}`;
|
||||
|
@ -83,7 +83,7 @@ test('Send document and reply test', async () => {
|
|||
await replyTo(windowB, testMessage, testReply);
|
||||
});
|
||||
|
||||
test('Send voice message and reply test', async () => {
|
||||
test('Send voice message', async () => {
|
||||
const [windowA, windowB] = await openApp(2);
|
||||
const [userA, userB] = await Promise.all([newUser(windowA, 'Alice'), newUser(windowB, 'Bob')]);
|
||||
// const testReply = `${userB.userName} to ${userA.userName}`;
|
||||
|
@ -103,7 +103,7 @@ test('Send voice message and reply test', async () => {
|
|||
await clickOnTestIdWithText(windowB, 'session-confirm-ok-button');
|
||||
});
|
||||
|
||||
test('Send GIF and reply test', async () => {
|
||||
test('Send GIF', async () => {
|
||||
const [windowA, windowB] = await openApp(2);
|
||||
const [userA, userB] = await Promise.all([newUser(windowA, 'Alice'), newUser(windowB, 'Bob')]);
|
||||
// const testReply = `${userB.userName} to ${userA.userName}`;
|
||||
|
@ -116,7 +116,7 @@ test('Send GIF and reply test', async () => {
|
|||
await clickOnMatchingText(windowB, 'Click to download media');
|
||||
});
|
||||
|
||||
test('Send long text and reply test', async () => {
|
||||
test('Send long text', async () => {
|
||||
const [windowA, windowB] = await openApp(2);
|
||||
const [userA, userB] = await Promise.all([newUser(windowA, 'Alice'), newUser(windowB, 'Bob')]);
|
||||
|
||||
|
@ -133,7 +133,7 @@ test('Send long text and reply test', async () => {
|
|||
await replyTo(windowB, longText, testReply);
|
||||
});
|
||||
|
||||
test('Unsend text message', async () => {
|
||||
test('Unsend message', async () => {
|
||||
const [windowA, windowB] = await openApp(2);
|
||||
const [userA, userB] = await Promise.all([newUser(windowA, 'Alice'), newUser(windowB, 'Bob')]);
|
||||
const unsendMessage = 'Testing unsend functionality';
|
||||
|
|
|
@ -1,4 +1,11 @@
|
|||
// add loop into hasTextElementBeenDeleted function
|
||||
|
||||
|
||||
// Change the test names to match appium
|
||||
// New Tests
|
||||
// Read status
|
||||
// Typing indicators
|
||||
// Community tests
|
||||
// Group message checks
|
||||
// Pinned conversations
|
||||
// Media saved notifications
|
||||
// Emojis working
|
||||
// Display information on media message
|
Loading…
Reference in a new issue