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