lint
This commit is contained in:
parent
f2c3ffa6bc
commit
b4e802d4bf
|
@ -15,6 +15,7 @@ export type TUserRegularChannels = keyof typeof data.userRegularChannels;
|
|||
export type TDataGroups = keyof typeof data.groups;
|
||||
export type TDataTeams = keyof typeof data.teams;
|
||||
|
||||
// @ts-ignore
|
||||
const value = globalThis.random;
|
||||
const data = {
|
||||
server: 'https://mobile.rocket.chat',
|
||||
|
|
|
@ -8,6 +8,7 @@ import random from './helpers/random';
|
|||
|
||||
module.exports = async () => {
|
||||
await require('detox/runners/jest/index').globalSetup();
|
||||
// @ts-ignore
|
||||
globalThis.random = random(20);
|
||||
await setup();
|
||||
};
|
||||
|
|
|
@ -106,6 +106,7 @@ const changeChannelJoinCode = async (roomId: string, joinCode: string) => {
|
|||
await rocketchat.post('method.call/saveRoomSettings', {
|
||||
message: JSON.stringify({
|
||||
msg: 'method',
|
||||
// @ts-ignore
|
||||
id: globalThis.random,
|
||||
method: 'saveRoomSettings',
|
||||
params: [roomId, { joinCode }]
|
||||
|
@ -130,6 +131,7 @@ const sendMessage = async (user: { username: string; password: string }, channel
|
|||
};
|
||||
|
||||
const setup = async () => {
|
||||
// @ts-ignore
|
||||
const data = new Data(globalThis.random);
|
||||
|
||||
await login(data.adminUser, data.adminPassword);
|
||||
|
@ -186,6 +188,7 @@ const get = (endpoint: string) => {
|
|||
};
|
||||
|
||||
const post = async (endpoint: string, body: any) => {
|
||||
// @ts-ignore
|
||||
const data = new Data(globalThis.random);
|
||||
await login(data.users.regular.username, data.users.regular.password);
|
||||
console.log(`POST /${endpoint} ${JSON.stringify(body)}`);
|
||||
|
|
Loading…
Reference in New Issue