mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-11-01 20:43:33 +00:00
setting up multi org test
This commit is contained in:
@@ -66,7 +66,8 @@ class PreferenceView {
|
||||
document.getElementById(`delete-server-action-${index}`).addEventListener('click', () => {
|
||||
this.domainUtil.removeDomain(index);
|
||||
this.initServers();
|
||||
alert('Success. Reload to apply changes.');
|
||||
// alert('Success. Reload to apply changes.');
|
||||
ipcRenderer.send('reload-main');
|
||||
this.$reloadServerButton.classList.remove('hidden');
|
||||
});
|
||||
}
|
||||
@@ -80,15 +81,15 @@ class PreferenceView {
|
||||
<div class="server-info-right">
|
||||
<div class="server-info-row">
|
||||
<span class="server-info-key">Name</span>
|
||||
<input class="server-info-value" placeholder="(Required)"/>
|
||||
<input id="server-info-name" class="server-info-value" placeholder="(Required)"/>
|
||||
</div>
|
||||
<div class="server-info-row">
|
||||
<span class="server-info-key">Url</span>
|
||||
<input class="server-info-value" placeholder="(Required)"/>
|
||||
<input id="server-info-url" class="server-info-value" placeholder="(Required)"/>
|
||||
</div>
|
||||
<div class="server-info-row">
|
||||
<span class="server-info-key">Icon</span>
|
||||
<input class="server-info-value" placeholder="(Optional)"/>
|
||||
<input id="server-info-icon" class="server-info-value" placeholder="(Optional)"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -120,7 +121,8 @@ class PreferenceView {
|
||||
this.$newServerForm.classList.add('hidden');
|
||||
|
||||
this.initServers();
|
||||
alert('Success. Reload to apply changes.');
|
||||
// alert('Success. Reload to apply changes.');
|
||||
ipcRenderer.send('reload-main');
|
||||
this.$reloadServerButton.classList.remove('hidden');
|
||||
}, errorMessage => {
|
||||
alert(errorMessage);
|
||||
|
||||
@@ -27,7 +27,7 @@ describe('application launch', function () {
|
||||
return this.app.stop()
|
||||
}
|
||||
})
|
||||
|
||||
/*
|
||||
it('shows an initial window', function () {
|
||||
return this.app.client.waitUntilWindowLoaded(5000)
|
||||
.getWindowCount().should.eventually.equal(2)
|
||||
@@ -38,10 +38,50 @@ describe('application launch', function () {
|
||||
.browserWindow.getBounds().should.eventually.have.property('width').and.be.above(0)
|
||||
.browserWindow.getBounds().should.eventually.have.property('height').and.be.above(0)
|
||||
})
|
||||
*/
|
||||
it('sets up a default organization', function () {
|
||||
let app = this.app
|
||||
app.client.execute(() => {
|
||||
window.confirm = function () { return true }
|
||||
})
|
||||
|
||||
it('sets up a default organization', function () {
|
||||
return this.app.client.waitUntilWindowLoaded(5000)
|
||||
.pause(10000);
|
||||
})
|
||||
return this.app.client.waitUntilWindowLoaded(5000)
|
||||
.pause(1000)
|
||||
.windowHandles()
|
||||
.then(function (session) {
|
||||
console.log(session)
|
||||
this.window(session.value[1])
|
||||
})
|
||||
.click('#new-server-action')
|
||||
.setValue('input[id="server-info-name"]', 'Zulip')
|
||||
.setValue('input[id="server-info-url"]', 'chat.zulip.org')
|
||||
.click('#save-server-action')
|
||||
.pause(500) // Need to pause while server verification takes place
|
||||
.then(() => app.browserWindow.reload())
|
||||
.pause(1000)
|
||||
// .then(() => app.browserWindow.click('//*[@id="add-action"]/i'))
|
||||
.then(() => {
|
||||
console.log('got here..', this)
|
||||
app.browserWindow.focus()
|
||||
console.log('got here..')
|
||||
// app.client.pause(2000).click('//*[@id="settings-action"]/i')
|
||||
// app.client.click('//*[@id="settings-action"]/i')
|
||||
// console.log('got here..')
|
||||
})
|
||||
.windowHandles()
|
||||
.then(function (session) {
|
||||
this.window(session.value[0])
|
||||
})
|
||||
.click('//*[@id="settings-action"]/i')
|
||||
//.pause(1000)
|
||||
.windowHandles()
|
||||
.then(function (session) {
|
||||
this.window(session.value[0])
|
||||
})
|
||||
.click('#new-server-action')
|
||||
.setValue('input[id="server-info-name"]', 'Zulip')
|
||||
.setValue('input[id="server-info-url"]', 'chat.zulip.org')
|
||||
.click('#save-server-action')
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user