Rocket.Chat.ReactNative/e2e/data.ts

41 lines
972 B
TypeScript
Raw Normal View History

// @ts-ignore
2023-03-07 12:28:51 +00:00
// eslint-disable-next-line import/no-unresolved, import/extensions
import account from './e2e_account';
2023-03-07 12:28:51 +00:00
import random from './helpers/random';
export interface IUser {
username: string;
password: string;
email: string;
}
export type TData = typeof data;
export type TDataKeys = keyof TData;
export type TDataChannels = keyof typeof data.channels;
2018-05-23 13:39:18 +00:00
const data = {
server: 'https://mobile.rocket.chat',
alternateServer: 'https://stable.rocket.chat',
2023-03-07 12:28:51 +00:00
...account,
channels: {
detoxpublic: {
name: 'detox-public'
},
detoxpublicprotected: {
name: 'detox-public-protected',
joinCode: '123'
}
},
2023-03-07 12:28:51 +00:00
randomUser: (): { username: string; name: string; password: string; email: string } => {
const randomVal = random();
return {
username: `user${randomVal}`,
name: `user${randomVal}`, // FIXME: apply a different name
password: `Password1@${randomVal}`,
2023-03-07 12:28:51 +00:00
email: `mobile+${randomVal}@rocket.chat`
};
}
};
export default data;