with-electron?
parent
65148300e7
commit
aa6ce0787b
@ -0,0 +1,56 @@
|
||||
/* eslint-disable prefer-destructuring */
|
||||
/* eslint-disable more/no-then */
|
||||
/* eslint-disable func-names */
|
||||
/* eslint-disable import/no-extraneous-dependencies */
|
||||
|
||||
const { after, before, describe, it } = require('mocha');
|
||||
const common = require('../common');
|
||||
|
||||
const libsession = require('../../ts/session');
|
||||
|
||||
describe('SyncMessage Utils', function() {
|
||||
let app;
|
||||
this.timeout(60000);
|
||||
this.slow(15000);
|
||||
|
||||
before(async () => {
|
||||
await common.killallElectron();
|
||||
await common.stopStubSnodeServer();
|
||||
|
||||
const appProps = {
|
||||
mnemonic: common.TEST_MNEMONIC1,
|
||||
displayName: common.TEST_DISPLAY_NAME1,
|
||||
};
|
||||
|
||||
app = await common.startAndStub(appProps);
|
||||
});
|
||||
|
||||
|
||||
after(async () => {
|
||||
await common.stopApp(app);
|
||||
await common.killallElectron();
|
||||
await common.stopStubSnodeServer();
|
||||
});
|
||||
|
||||
|
||||
describe('getSyncContacts', async () => {
|
||||
it('can get sync contacts', async () => {
|
||||
const contacts = libsession.Protocols.SessionProtocol.
|
||||
|
||||
// const menuBarVisible = await app.browserWindow.isMenuBarVisible();
|
||||
|
||||
// await app.client.element(SettingsPage.settingsButtonSection).click();
|
||||
// await app.client
|
||||
// .element(SettingsPage.settingToggleWithText('Hide Menu Bar'))
|
||||
// .click();
|
||||
|
||||
// // Confirm that toggling works
|
||||
// const menuBarToggled = await app.browserWindow.isMenuBarVisible();
|
||||
// menuBarToggled.should.equal(!menuBarVisible);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
@ -0,0 +1,35 @@
|
||||
import chai from 'chai';
|
||||
import * as sinon from 'sinon';
|
||||
|
||||
import { PubKey } from '../../../session/types/';
|
||||
import { SyncMessageUtils } from '../../../session/utils/';
|
||||
import { SyncMessage } from '../../../session/messages/outgoing';
|
||||
import { TestUtils } from '../../test-utils';
|
||||
import { UserUtil } from '../../../util';
|
||||
|
||||
// tslint:disable-next-line: no-require-imports no-var-requires
|
||||
const chaiAsPromised = require('chai-as-promised');
|
||||
chai.use(chaiAsPromised);
|
||||
|
||||
const { expect } = chai;
|
||||
|
||||
describe('Groups Utils', () => {
|
||||
|
||||
describe('getGroupMembers', () => {
|
||||
it('', async () => {
|
||||
//
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
describe('isMediumGroup', () => {
|
||||
it('', async () => {
|
||||
//
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
@ -0,0 +1,40 @@
|
||||
import chai from 'chai';
|
||||
import * as sinon from 'sinon';
|
||||
|
||||
import { PubKey } from '../../../session/types/';
|
||||
import { SyncMessageUtils } from '../../../session/utils/';
|
||||
import { SyncMessage } from '../../../session/messages/outgoing';
|
||||
import { TestUtils } from '../../test-utils';
|
||||
import { UserUtil } from '../../../util';
|
||||
|
||||
// tslint:disable-next-line: no-require-imports no-var-requires
|
||||
const chaiAsPromised = require('chai-as-promised');
|
||||
chai.use(chaiAsPromised);
|
||||
|
||||
const { expect } = chai;
|
||||
|
||||
describe('Promise Utils', () => {
|
||||
|
||||
describe('poll', () => {
|
||||
it('', async () => {
|
||||
//
|
||||
});
|
||||
});
|
||||
|
||||
describe('waitForTask', () => {
|
||||
it('', async () => {
|
||||
//
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
describe('waitUntil', () => {
|
||||
it('', async () => {
|
||||
//
|
||||
});
|
||||
});
|
||||
|
||||
});
|
@ -0,0 +1,32 @@
|
||||
import chai from 'chai';
|
||||
import * as sinon from 'sinon';
|
||||
|
||||
import { PubKey } from '../../../session/types/';
|
||||
import { SyncMessageUtils } from '../../../session/utils/';
|
||||
import { SyncMessage } from '../../../session/messages/outgoing';
|
||||
import { TestUtils } from '../../test-utils';
|
||||
import { UserUtil } from '../../../util';
|
||||
|
||||
// tslint:disable-next-line: no-require-imports no-var-requires
|
||||
const chaiAsPromised = require('chai-as-promised');
|
||||
chai.use(chaiAsPromised);
|
||||
|
||||
const { expect } = chai;
|
||||
|
||||
describe('String Utils', () => {
|
||||
|
||||
describe('encode', () => {
|
||||
it('', async () => {
|
||||
//
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
describe('decode', () => {
|
||||
it('', async () => {
|
||||
//
|
||||
});
|
||||
});
|
||||
|
||||
});
|
Loading…
Reference in New Issue