Format
This commit is contained in:
parent
1ee817dc2b
commit
e1a6847c84
|
|
@ -19,10 +19,7 @@ export class WebSocketStore {
|
|||
}
|
||||
this.wsActive = true;
|
||||
|
||||
const wsUrl = config
|
||||
.get('url')
|
||||
.replace('http', 'ws')
|
||||
.replace('https', 'wss');
|
||||
const wsUrl = config.get('url').replace('http', 'ws').replace('https', 'wss');
|
||||
const ws = new WebSocket(wsUrl + 'stream?token=' + this.currentUser.token());
|
||||
|
||||
ws.onerror = (e) => {
|
||||
|
|
|
|||
|
|
@ -152,13 +152,7 @@ const PanelWrapper: React.SFC<IPanelWrapperProps> = ({
|
|||
</Typography>
|
||||
{description ? <Typography variant="subtitle1">{description}</Typography> : null}
|
||||
<hr />
|
||||
<div
|
||||
className={name
|
||||
.toLowerCase()
|
||||
.trim()
|
||||
.replace(/ /g, '-')}>
|
||||
{children}
|
||||
</div>
|
||||
<div className={name.toLowerCase().trim().replace(/ /g, '-')}>{children}</div>
|
||||
</Container>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -135,9 +135,9 @@ describe('plugin', () => {
|
|||
it('updates configurer', async () => {
|
||||
await inDetailPage(1, async () => {
|
||||
expect(
|
||||
await (await (await page.$('.config-save'))!.getProperty(
|
||||
'disabled'
|
||||
)).jsonValue()
|
||||
await (
|
||||
await (await page.$('.config-save'))!.getProperty('disabled')
|
||||
).jsonValue()
|
||||
).toBe(true);
|
||||
await page.waitForSelector('.CodeMirror .CodeMirror-code');
|
||||
await page.waitForFunction(
|
||||
|
|
@ -155,9 +155,9 @@ describe('plugin', () => {
|
|||
it('configurer updated', async () => {
|
||||
await inDetailPage(1, async () => {
|
||||
expect(
|
||||
await (await (await page.$('.config-save'))!.getProperty(
|
||||
'disabled'
|
||||
)).jsonValue()
|
||||
await (
|
||||
await (await page.$('.config-save'))!.getProperty('disabled')
|
||||
).jsonValue()
|
||||
).toBe(true);
|
||||
await page.waitForSelector('.CodeMirror .CodeMirror-code > div');
|
||||
await page.waitForFunction(
|
||||
|
|
|
|||
|
|
@ -61,9 +61,7 @@ export const newTest = async (pluginsDir = ''): Promise<GotifyTest> => {
|
|||
};
|
||||
|
||||
const testPluginDir = (): {dir: string; generator: () => string} => {
|
||||
const random = Math.random()
|
||||
.toString(36)
|
||||
.substring(2, 15);
|
||||
const random = Math.random().toString(36).substring(2, 15);
|
||||
const dirName = 'gotifyplugin_' + random;
|
||||
const dir = path.join(testBuildPath, dirName);
|
||||
if (!fs.existsSync(dir)) {
|
||||
|
|
@ -72,18 +70,14 @@ const testPluginDir = (): {dir: string; generator: () => string} => {
|
|||
return {
|
||||
dir,
|
||||
generator: () => {
|
||||
const randomFn = Math.random()
|
||||
.toString(36)
|
||||
.substring(2, 15);
|
||||
const randomFn = Math.random().toString(36).substring(2, 15);
|
||||
return path.join(dir, randomFn + '.so');
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
const testFilePath = (): string => {
|
||||
const random = Math.random()
|
||||
.toString(36)
|
||||
.substring(2, 15);
|
||||
const random = Math.random().toString(36).substring(2, 15);
|
||||
const filename = 'gotifytest_' + random + windowsPrefix;
|
||||
return path.join(testBuildPath, filename);
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue