mirror of
				https://github.com/zulip/zulip-desktop.git
				synced 2025-11-04 14:03:27 +00:00 
			
		
		
		
	xo: Lint *.js too.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
		@@ -1,19 +1,21 @@
 | 
			
		||||
const test = require('tape')
 | 
			
		||||
const setup = require('./setup')
 | 
			
		||||
 | 
			
		||||
test('add-organization', function (t) {
 | 
			
		||||
  t.timeoutAfter(50e3)
 | 
			
		||||
  setup.resetTestDataDir()
 | 
			
		||||
  const app = setup.createApp()
 | 
			
		||||
  setup.waitForLoad(app, t)
 | 
			
		||||
    .then(() => app.client.windowByIndex(1)) // focus on webview
 | 
			
		||||
    .then(() => app.client.setValue('.setting-input-value', 'chat.zulip.org'))
 | 
			
		||||
    .then(() => app.client.click('#connect'))
 | 
			
		||||
    .then(() => setup.wait(5000))
 | 
			
		||||
    .then(() => app.client.windowByIndex(0)) // Switch focus back to main win
 | 
			
		||||
    .then(() => app.client.windowByIndex(1)) // Switch focus back to org webview
 | 
			
		||||
    .then(() => app.client.waitForExist('//*[@id="id_username"]'))
 | 
			
		||||
    .then(() => setup.endTest(app, t),
 | 
			
		||||
          (err) => setup.endTest(app, t, err || 'error'))
 | 
			
		||||
})
 | 
			
		||||
const test = require('tape');
 | 
			
		||||
const setup = require('./setup');
 | 
			
		||||
 | 
			
		||||
test('add-organization', async t => {
 | 
			
		||||
	t.timeoutAfter(50e3);
 | 
			
		||||
	setup.resetTestDataDir();
 | 
			
		||||
	const app = setup.createApp();
 | 
			
		||||
	try {
 | 
			
		||||
		await setup.waitForLoad(app, t);
 | 
			
		||||
		await app.client.windowByIndex(1); // Focus on webview
 | 
			
		||||
		await app.client.setValue('.setting-input-value', 'chat.zulip.org');
 | 
			
		||||
		await app.client.click('#connect');
 | 
			
		||||
		await setup.wait(5000);
 | 
			
		||||
		await app.client.windowByIndex(0); // Switch focus back to main win
 | 
			
		||||
		await app.client.windowByIndex(1); // Switch focus back to org webview
 | 
			
		||||
		await app.client.waitForExist('//*[@id="id_username"]');
 | 
			
		||||
		await setup.endTest(app, t);
 | 
			
		||||
	} catch (error) {
 | 
			
		||||
		await setup.endTest(app, t, error || 'error');
 | 
			
		||||
	}
 | 
			
		||||
});
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user