@open-xchange/appsuite-codeceptjs 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.defaults +47 -0
- package/README.md +40 -0
- package/chai.d.ts +5 -0
- package/customRerun.js +135 -0
- package/global.d.ts +5 -0
- package/index.js +187 -0
- package/package.json +39 -0
- package/src/actor.js +174 -0
- package/src/appsuiteHttpClient.js +155 -0
- package/src/chai.d.ts +6 -0
- package/src/chai.js +58 -0
- package/src/contexts/contexts.js +172 -0
- package/src/contexts/reseller.js +248 -0
- package/src/contexts.js +29 -0
- package/src/event.js +54 -0
- package/src/helper.js +817 -0
- package/src/pageobjects/calendar.js +226 -0
- package/src/pageobjects/contacts.js +148 -0
- package/src/pageobjects/drive.js +96 -0
- package/src/pageobjects/fragments/contact-autocomplete.js +45 -0
- package/src/pageobjects/fragments/contact-picker.js +50 -0
- package/src/pageobjects/fragments/dialogs.js +41 -0
- package/src/pageobjects/fragments/search.js +54 -0
- package/src/pageobjects/fragments/settings-mailfilter.js +90 -0
- package/src/pageobjects/fragments/settings.js +71 -0
- package/src/pageobjects/fragments/tinymce.js +41 -0
- package/src/pageobjects/fragments/topbar.js +43 -0
- package/src/pageobjects/fragments/viewer.js +67 -0
- package/src/pageobjects/mail.js +67 -0
- package/src/pageobjects/mobile/mobileCalendar.js +41 -0
- package/src/pageobjects/mobile/mobileContacts.js +40 -0
- package/src/pageobjects/mobile/mobileMail.js +51 -0
- package/src/pageobjects/tasks.js +58 -0
- package/src/plugins/emptyModule/index.js +21 -0
- package/src/plugins/settingsInit/index.js +35 -0
- package/src/plugins/testmetrics/index.js +135 -0
- package/src/soap/services/context.js +147 -0
- package/src/soap/services/oxaas.js +36 -0
- package/src/soap/services/resellerContext.js +65 -0
- package/src/soap/services/resellerUser.js +100 -0
- package/src/soap/services/user.js +114 -0
- package/src/soap/services/util.js +39 -0
- package/src/soap/soap.js +172 -0
- package/src/users/reseller.js +233 -0
- package/src/users/users.js +183 -0
- package/src/users.js +29 -0
- package/src/util.js +104 -0
- package/steps.d.ts +16 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Copyright (c) Open-Xchange GmbH, Germany <info@open-xchange.com>
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
*
|
|
5
|
+
* This code is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU Affero General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with OX App Suite. If not, see <https://www.gnu.org/licenses/agpl-3.0.txt>.
|
|
17
|
+
*
|
|
18
|
+
* Any use of the work other than as authorized under this license or copyright law is prohibited.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
const { I, dialogs, settings } = inject()
|
|
22
|
+
|
|
23
|
+
module.exports = {
|
|
24
|
+
|
|
25
|
+
section: '.io-ox-mailfilter-settings .settings-explanation',
|
|
26
|
+
dialog: locate('.modal[data-point="io.ox/settings/mailfilter/filter/settings/detail/dialog"]').as('Create/Edit dialog'),
|
|
27
|
+
lastaction: locate('.io-ox-mailfilter-edit .actions > li:last-of-type').as('Last action'),
|
|
28
|
+
|
|
29
|
+
// there are so many tests doing this (also slightly differently)
|
|
30
|
+
async openRules () {
|
|
31
|
+
await settings.open('Mail', 'Rules')
|
|
32
|
+
I.waitForElement(this.section)
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
async newRule (name) {
|
|
36
|
+
I.waitForText('Add new rule')
|
|
37
|
+
I.click('Add new rule')
|
|
38
|
+
I.waitForVisible(this.dialog)
|
|
39
|
+
await I.waitForFocus('[name="rulename"]')
|
|
40
|
+
I.see('Create new rule')
|
|
41
|
+
I.see('This rule applies to all messages. Please add a condition to restrict this rule to specific messages.')
|
|
42
|
+
I.see('Please define at least one action.')
|
|
43
|
+
// set rulename
|
|
44
|
+
I.fillField('rulename', name)
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
addCondition (condition, value, field = 'values') {
|
|
48
|
+
I.click('Add condition')
|
|
49
|
+
I.clickDropdown(condition)
|
|
50
|
+
I.waitForDetached('.dropdown.open')
|
|
51
|
+
I.fillField(field, value)
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
addSubjectCondition (value) {
|
|
55
|
+
I.click('Add condition')
|
|
56
|
+
I.clickDropdown('Subject')
|
|
57
|
+
I.waitForDetached('.dropdown.open')
|
|
58
|
+
I.fillField('values', value)
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
addSimpleAction (label) {
|
|
62
|
+
I.click('Add action')
|
|
63
|
+
I.clickDropdown(label)
|
|
64
|
+
I.waitForDetached('.dropdown.open')
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
addAction (label, value) {
|
|
68
|
+
I.click('Add action')
|
|
69
|
+
I.clickDropdown(label)
|
|
70
|
+
I.waitForDetached('.dropdown.open')
|
|
71
|
+
I.fillField(this.lastaction.find('input[name]'), value)
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
setFlag (flag) {
|
|
75
|
+
I.click('Add action')
|
|
76
|
+
I.clickDropdown('Set color flag')
|
|
77
|
+
I.waitForDetached('.dropdown.open')
|
|
78
|
+
I.waitForVisible('~Set color')
|
|
79
|
+
I.click('~Set color')
|
|
80
|
+
|
|
81
|
+
I.waitForVisible('.flag-dropdown')
|
|
82
|
+
I.click(flag, '.flag-dropdown')
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
save () {
|
|
86
|
+
dialogs.clickButton('Save')
|
|
87
|
+
I.waitForDetached(this.dialog)
|
|
88
|
+
I.waitForVisible('.settings-detail-pane li.settings-list-item[data-id="0"]')
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Copyright (c) Open-Xchange GmbH, Germany <info@open-xchange.com>
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
*
|
|
5
|
+
* This code is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU Affero General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with OX App Suite. If not, see <https://www.gnu.org/licenses/agpl-3.0.txt>.
|
|
17
|
+
*
|
|
18
|
+
* Any use of the work other than as authorized under this license or copyright law is prohibited.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
const { I } = inject()
|
|
22
|
+
|
|
23
|
+
function getPageTitle (page) {
|
|
24
|
+
if (page === 'General') return 'core'
|
|
25
|
+
if (page === 'Drive') return 'files'
|
|
26
|
+
if (page === 'Download personal data') return 'personaldata'
|
|
27
|
+
if (page === 'Accounts') return 'io.ox/settings/accounts'
|
|
28
|
+
return page.toLocaleLowerCase()
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
module.exports = {
|
|
32
|
+
/**
|
|
33
|
+
* Opens a new settings page in the virtual settings editor.
|
|
34
|
+
*
|
|
35
|
+
* @async
|
|
36
|
+
* @param {string} [page='general'] - The name of the settings page to open.
|
|
37
|
+
* @param {string} [section=''] - The name of the settings section to open.
|
|
38
|
+
*/
|
|
39
|
+
async open (page = '', section = '') {
|
|
40
|
+
page = getPageTitle(page)
|
|
41
|
+
|
|
42
|
+
I.executeScript(async (page) => {
|
|
43
|
+
const { default: ox } = await import(String(new URL('ox.js', location.href)))
|
|
44
|
+
|
|
45
|
+
if (!page) page = ox.ui.App.getCurrentApp().get('id')
|
|
46
|
+
page = ox.ui.App.getByCid(`io.ox/${page}`) ? `io.ox/${page}` : page
|
|
47
|
+
page = page === 'core' ? 'io.ox/core' : page
|
|
48
|
+
const { default: openSettings } = await import(String(new URL('io.ox/settings/util.js', location.href)))
|
|
49
|
+
await openSettings(`virtual/settings/${page}`)
|
|
50
|
+
}, page)
|
|
51
|
+
await I.waitForApp()
|
|
52
|
+
if (section) return this.expandSection(section)
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
close () {
|
|
56
|
+
I.waitForElement('.settings-detail-pane .close-settings')
|
|
57
|
+
I.click('.settings-detail-pane .close-settings')
|
|
58
|
+
I.waitForDetached('.settings-detail-pane')
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
expandSection (title) {
|
|
62
|
+
const locator = locate('summary').withText(title).inside('.settings-detail-pane .expandable-section').as(`Expandable section "${title}"`)
|
|
63
|
+
I.waitForText(title, undefined, '.settings-detail-pane')
|
|
64
|
+
I.waitForElement(locator)
|
|
65
|
+
I.click(locator)
|
|
66
|
+
|
|
67
|
+
// wait for expanded section
|
|
68
|
+
const expanded = locate('summary').withText(title).inside('.settings-detail-pane .expandable-section[open]').as(`Expandable section "${title}" (expanded)`)
|
|
69
|
+
I.waitForElement(expanded)
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Copyright (c) Open-Xchange GmbH, Germany <info@open-xchange.com>
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
*
|
|
5
|
+
* This code is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU Affero General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with OX App Suite. If not, see <https://www.gnu.org/licenses/agpl-3.0.txt>.
|
|
17
|
+
*
|
|
18
|
+
* Any use of the work other than as authorized under this license or copyright law is prohibited.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
const { I } = inject()
|
|
22
|
+
|
|
23
|
+
module.exports = {
|
|
24
|
+
attachInlineImage (path) {
|
|
25
|
+
const inputId = 'temp_input_for_tinymce'
|
|
26
|
+
I.executeScript(function (id) {
|
|
27
|
+
const el = document.createElement('input')
|
|
28
|
+
el.setAttribute('type', 'file')
|
|
29
|
+
el.setAttribute('id', id)
|
|
30
|
+
document.getElementsByTagName('body')[0].appendChild(el)
|
|
31
|
+
el.onchange = function () {
|
|
32
|
+
// @ts-ignore
|
|
33
|
+
window.tinyMCE.activeEditor.uploadBlob(el.files[0])
|
|
34
|
+
el.remove()
|
|
35
|
+
}
|
|
36
|
+
}, inputId)
|
|
37
|
+
// not sure why, but it takes a little to be able to attach files here.
|
|
38
|
+
I.wait(0.5)
|
|
39
|
+
I.attachFile(`#${inputId}`, path)
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Copyright (c) Open-Xchange GmbH, Germany <info@open-xchange.com>
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
*
|
|
5
|
+
* This code is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU Affero General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with OX App Suite. If not, see <https://www.gnu.org/licenses/agpl-3.0.txt>.
|
|
17
|
+
*
|
|
18
|
+
* Any use of the work other than as authorized under this license or copyright law is prohibited.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
const { I } = inject()
|
|
22
|
+
|
|
23
|
+
module.exports = {
|
|
24
|
+
|
|
25
|
+
// new connect your device wizard, see OXUI-793
|
|
26
|
+
connectDeviceWizard () {
|
|
27
|
+
I.waitForElement('#io-ox-topbar-settings-dropdown-icon button', 30)
|
|
28
|
+
I.wait(1)
|
|
29
|
+
I.click('#io-ox-topbar-settings-dropdown-icon button')
|
|
30
|
+
I.waitForVisible(locate('a').withText('Connect your device').inside('.dropdown.open').as('Connect your device'))
|
|
31
|
+
I.click(locate('a').withText('Connect your device').inside('.dropdown.open').as('Connect your device'))
|
|
32
|
+
I.waitForVisible('.wizard-step')
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
help () {
|
|
36
|
+
I.waitForElement('#io-ox-topbar-help-dropdown-icon')
|
|
37
|
+
I.click('#io-ox-topbar-help-dropdown-icon .dropdown-toggle')
|
|
38
|
+
I.waitForElement('#topbar-help-dropdown .io-ox-context-help')
|
|
39
|
+
I.click('#topbar-help-dropdown .io-ox-context-help')
|
|
40
|
+
I.waitForElement('.io-ox-help-window')
|
|
41
|
+
I.waitForVisible('.inline-help-iframe', 10)
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Copyright (c) Open-Xchange GmbH, Germany <info@open-xchange.com>
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
*
|
|
5
|
+
* This code is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU Affero General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with OX App Suite. If not, see <https://www.gnu.org/licenses/agpl-3.0.txt>.
|
|
17
|
+
*
|
|
18
|
+
* Any use of the work other than as authorized under this license or copyright law is prohibited.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
const { I } = inject()
|
|
22
|
+
|
|
23
|
+
module.exports = {
|
|
24
|
+
|
|
25
|
+
async scrollTo (x = null, y = null) {
|
|
26
|
+
await I.executeScript(({ x, y }) => {
|
|
27
|
+
document.querySelector('.io-ox-pdf-container.scrollable').scrollTo(x, y)
|
|
28
|
+
}, { x, y })
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
async grabTextAtPoint (x = null, y = null) {
|
|
32
|
+
return await I.executeScript(({ x, y }) => {
|
|
33
|
+
return document.elementFromPoint(x, y).textContent
|
|
34
|
+
}, { x, y })
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
async grabScrollPosition () {
|
|
38
|
+
return await I.executeScript(() => { return document.querySelector('.io-ox-pdf-container.scrollable').scrollTop })
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
async clickAtPosition (x = null, y = null) {
|
|
42
|
+
return await I.executeScript(({ x, y }) => {
|
|
43
|
+
return document.elementFromPoint(x, y).click()
|
|
44
|
+
}, { x, y })
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Set a browser selection.
|
|
49
|
+
* @param {string} startText - The 'innerText' of the node that starts the selection.
|
|
50
|
+
* @param {string} endText - The 'innerText' of the node that ends the selection.
|
|
51
|
+
* @param {string} wrapperClass - The selection is searched inside the wrapper. Provide a class name ('.className') for it.
|
|
52
|
+
* *
|
|
53
|
+
* Using the recommended workaround by pupeteer(v20.30) to select text.
|
|
54
|
+
* "dragging and selecting text is not possible using page.mouse"
|
|
55
|
+
* https://pptr.dev/api/puppeteer.mouse#example-1
|
|
56
|
+
*/
|
|
57
|
+
async setBrowserSelection (startText, endText, wrapperClass) {
|
|
58
|
+
await I.executeScript(({ startText, endText, wrapperClass }) => {
|
|
59
|
+
const selection = window.getSelection()
|
|
60
|
+
const range = document.createRange()
|
|
61
|
+
range.setStartBefore([...document.querySelectorAll(`${wrapperClass} *`)].filter(node => node.innerText.includes(startText))[0])
|
|
62
|
+
range.setEndAfter([...document.querySelectorAll(`${wrapperClass} *`)].filter(node => node.innerText.includes(endText))[0])
|
|
63
|
+
selection.removeAllRanges()
|
|
64
|
+
selection.addRange(range)
|
|
65
|
+
}, { startText, endText, wrapperClass })
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Copyright (c) Open-Xchange GmbH, Germany <info@open-xchange.com>
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
*
|
|
5
|
+
* This code is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU Affero General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with OX App Suite. If not, see <https://www.gnu.org/licenses/agpl-3.0.txt>.
|
|
17
|
+
*
|
|
18
|
+
* Any use of the work other than as authorized under this license or copyright law is prohibited.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
const { I } = inject()
|
|
22
|
+
|
|
23
|
+
module.exports = {
|
|
24
|
+
|
|
25
|
+
composeWindow: '.io-ox-mail-compose-window',
|
|
26
|
+
editorIframe: '.io-ox-mail-compose-window .editor iframe',
|
|
27
|
+
to: '.to .tt-input',
|
|
28
|
+
subject: '.mail-input [name="subject"]',
|
|
29
|
+
editorText: '.editor .plain-text',
|
|
30
|
+
|
|
31
|
+
async selectMail (text, selector) {
|
|
32
|
+
const titleSelector = `.list-item[aria-label*="${text}"]`
|
|
33
|
+
const senderSelector = locate('.list-view .person').withText(text).as('Mail sender')
|
|
34
|
+
const item = selector === 'Sender' ? senderSelector : titleSelector
|
|
35
|
+
I.waitForElement(item, 60)
|
|
36
|
+
I.wait(1)
|
|
37
|
+
I.click(item)
|
|
38
|
+
await I.waitForFocus('.list-view li.list-item.selected')
|
|
39
|
+
I.waitForElement('.mail-detail-frame')
|
|
40
|
+
},
|
|
41
|
+
async selectMailByIndex (index) {
|
|
42
|
+
const item = locate('.list-view li.list-item').withAttr({ 'data-index': index.toString() }).as('Mail item')
|
|
43
|
+
I.waitForElement(item)
|
|
44
|
+
I.wait(0.5)
|
|
45
|
+
I.click(item)
|
|
46
|
+
await I.waitForFocus('.list-view li.list-item.selected')
|
|
47
|
+
},
|
|
48
|
+
async newMail () {
|
|
49
|
+
I.clickPrimary('New email')
|
|
50
|
+
I.waitForVisible('.active .io-ox-mail-compose [placeholder="To"]', 30)
|
|
51
|
+
await I.waitForFocus('.active .io-ox-mail-compose [placeholder="To"]')
|
|
52
|
+
I.waitForInvisible('.active.io-ox-mail-compose-window .window-blocker', 30)
|
|
53
|
+
},
|
|
54
|
+
addAttachment (path) {
|
|
55
|
+
I.click('~Attachments')
|
|
56
|
+
const ext = path.match(/\.(.{3,4})$/)[1]
|
|
57
|
+
I.attachFile({ css: 'input[type=file]' }, path)
|
|
58
|
+
I.pressKey('Escape')
|
|
59
|
+
I.waitForText(ext, 30, '.attachment-list.preview .fallback')
|
|
60
|
+
},
|
|
61
|
+
send () {
|
|
62
|
+
I.click('Send')
|
|
63
|
+
I.wait(0.5)
|
|
64
|
+
I.waitToHide('.io-ox-mail-compose-window')
|
|
65
|
+
I.waitToHide('.mail-send-progress', 45)
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Copyright (c) Open-Xchange GmbH, Germany <info@open-xchange.com>
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
*
|
|
5
|
+
* This code is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU Affero General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with OX App Suite. If not, see <https://www.gnu.org/licenses/agpl-3.0.txt>.
|
|
17
|
+
*
|
|
18
|
+
* Any use of the work other than as authorized under this license or copyright law is prohibited.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
const { I } = inject()
|
|
22
|
+
|
|
23
|
+
module.exports = {
|
|
24
|
+
|
|
25
|
+
// attr: [startDate, endDate]
|
|
26
|
+
setDate (attr, value) {
|
|
27
|
+
const date = value.format('YYYY-MM-DDTHH:mm')
|
|
28
|
+
I.executeScript(({ attr, date }) => {
|
|
29
|
+
const fieldset = document.querySelector(`fieldset[data-attribute="${attr}"]`)
|
|
30
|
+
const input = fieldset.querySelector('input')
|
|
31
|
+
input.value = date
|
|
32
|
+
input.dispatchEvent(new Event('input'))
|
|
33
|
+
}, { attr, date })
|
|
34
|
+
},
|
|
35
|
+
async newAppointment () {
|
|
36
|
+
I.wait(0.5) // prevent clicking a detached element caused by the bottom toolbar being re-rendered multiple times
|
|
37
|
+
I.click('~Create appointment', '#io-ox-appcontrol')
|
|
38
|
+
I.waitForVisible('.io-ox-calendar-edit-window.complete input[type="text"][name="summary"]')
|
|
39
|
+
await I.waitForFocus('.io-ox-calendar-edit-window input[type="text"][name="summary"]')
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Copyright (c) Open-Xchange GmbH, Germany <info@open-xchange.com>
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
*
|
|
5
|
+
* This code is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU Affero General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with OX App Suite. If not, see <https://www.gnu.org/licenses/agpl-3.0.txt>.
|
|
17
|
+
*
|
|
18
|
+
* Any use of the work other than as authorized under this license or copyright law is prohibited.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
const { I } = inject()
|
|
22
|
+
|
|
23
|
+
module.exports = {
|
|
24
|
+
|
|
25
|
+
newContact () {
|
|
26
|
+
I.wait(0.5) // prevent clicking a detached element caused by the bottom toolbar being re-rendered multiple times
|
|
27
|
+
I.waitForElement('~New contact')
|
|
28
|
+
I.click({ css: '[data-action="io.ox/contacts/actions/create"]' })
|
|
29
|
+
I.waitForElement('.io-ox-contacts-edit-window')
|
|
30
|
+
I.waitForVisible('.io-ox-contacts-edit-window.complete')
|
|
31
|
+
I.waitForText('Add personal info')
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
addField (fieldType, field) {
|
|
35
|
+
I.click(`.dropdown[data-add="${fieldType}"] button`, '.contact-edit')
|
|
36
|
+
I.waitForVisible('.dropdown.open')
|
|
37
|
+
I.click(field)
|
|
38
|
+
I.waitForText(field, 30, '.contact-edit')
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Copyright (c) Open-Xchange GmbH, Germany <info@open-xchange.com>
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
*
|
|
5
|
+
* This code is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU Affero General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with OX App Suite. If not, see <https://www.gnu.org/licenses/agpl-3.0.txt>.
|
|
17
|
+
*
|
|
18
|
+
* Any use of the work other than as authorized under this license or copyright law is prohibited.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
const { I } = inject()
|
|
22
|
+
|
|
23
|
+
module.exports = {
|
|
24
|
+
newMail () {
|
|
25
|
+
I.waitForVisible('~New email')
|
|
26
|
+
I.wait(0.5)
|
|
27
|
+
I.click('~New email')
|
|
28
|
+
I.waitForVisible('.io-ox-mail-compose [placeholder="To"]', 30)
|
|
29
|
+
I.waitForInvisible('.io-ox-mail-compose-window .window-blocker', 30)
|
|
30
|
+
I.waitForElement('.io-ox-mail-compose-window.complete')
|
|
31
|
+
I.wait(0.5) // Wait for tinyMCE to be ready
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
send () {
|
|
35
|
+
I.wait(0.5)
|
|
36
|
+
I.click('Send')
|
|
37
|
+
I.waitForDetached('.io-ox-mail-compose-window')
|
|
38
|
+
I.waitToHide('.mail-send-progress', 45)
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
selectMail (text, selector) {
|
|
42
|
+
const titleSelector = locate(`.list-view .subject span[title*="${text}"]`).as('Mail title')
|
|
43
|
+
const senderSelector = locate('.list-view .person').withText(text).as('Mail sender')
|
|
44
|
+
const item = selector === 'Sender' ? senderSelector : titleSelector
|
|
45
|
+
I.waitForElement(item, 60)
|
|
46
|
+
I.wait(0.5)
|
|
47
|
+
I.click(item)
|
|
48
|
+
I.waitForVisible('.mail-detail-pane')
|
|
49
|
+
I.waitForInvisible('.mail-detail-pane .mail-detail .io-ox-busy')
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Copyright (c) Open-Xchange GmbH, Germany <info@open-xchange.com>
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
*
|
|
5
|
+
* This code is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU Affero General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with OX App Suite. If not, see <https://www.gnu.org/licenses/agpl-3.0.txt>.
|
|
17
|
+
*
|
|
18
|
+
* Any use of the work other than as authorized under this license or copyright law is prohibited.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
const { I } = inject()
|
|
22
|
+
|
|
23
|
+
module.exports = {
|
|
24
|
+
|
|
25
|
+
editWindow: '.io-ox-tasks-edit-window',
|
|
26
|
+
|
|
27
|
+
newTask () {
|
|
28
|
+
I.clickPrimary('New task')
|
|
29
|
+
I.waitForElement('.io-ox-tasks-edit')
|
|
30
|
+
},
|
|
31
|
+
editTask () {
|
|
32
|
+
I.clickToolbar('Edit')
|
|
33
|
+
I.waitForElement('.io-ox-tasks-edit')
|
|
34
|
+
},
|
|
35
|
+
async selectTask (id) {
|
|
36
|
+
const item = locate('.vgrid-cell').withText(id).as(id)
|
|
37
|
+
I.waitForElement(item)
|
|
38
|
+
I.click(item)
|
|
39
|
+
await I.waitForFocus('.vgrid-cell.selected')
|
|
40
|
+
},
|
|
41
|
+
create () {
|
|
42
|
+
I.click('Create')
|
|
43
|
+
I.waitForDetached('.io-ox-tasks-edit-window')
|
|
44
|
+
I.waitForElement('.vgrid-cell.selected.tasks')
|
|
45
|
+
I.waitForElement('.tasks-detailview')
|
|
46
|
+
},
|
|
47
|
+
save () {
|
|
48
|
+
I.click('Save')
|
|
49
|
+
I.waitForDetached('.io-ox-tasks-edit-window')
|
|
50
|
+
I.waitForElement('.vgrid-cell.selected.tasks')
|
|
51
|
+
I.waitForElement('.tasks-detailview')
|
|
52
|
+
},
|
|
53
|
+
selectAll () {
|
|
54
|
+
I.waitForElement('.selectable.tasks')
|
|
55
|
+
I.click('.dropdown', '~Tasks toolbar')
|
|
56
|
+
I.clickDropdown('Select all')
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Copyright (c) Open-Xchange GmbH, Germany <info@open-xchange.com>
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
*
|
|
5
|
+
* This code is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU Affero General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with OX App Suite. If not, see <https://www.gnu.org/licenses/agpl-3.0.txt>.
|
|
17
|
+
*
|
|
18
|
+
* Any use of the work other than as authorized under this license or copyright law is prohibited.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
module.exports = function (config) {}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Copyright (c) Open-Xchange GmbH, Germany <info@open-xchange.com>
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
*
|
|
5
|
+
* This code is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU Affero General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with OX App Suite. If not, see <https://www.gnu.org/licenses/agpl-3.0.txt>.
|
|
17
|
+
*
|
|
18
|
+
* Any use of the work other than as authorized under this license or copyright law is prohibited.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
'use strict'
|
|
22
|
+
|
|
23
|
+
const { recorder } = require('codeceptjs')
|
|
24
|
+
const event = require('../../event')
|
|
25
|
+
const Helper = require('../../helper')
|
|
26
|
+
|
|
27
|
+
module.exports = function () {
|
|
28
|
+
event.dispatcher.on(event.provisioning.user.created, (user) => {
|
|
29
|
+
recorder.startUnlessRunning()
|
|
30
|
+
const helper = new Helper()
|
|
31
|
+
recorder.add('inject starting in contacts folder setting', async () => {
|
|
32
|
+
await helper.haveSetting({ 'io.ox/contacts': { startInGlobalAddressbook: false } }, { user })
|
|
33
|
+
})
|
|
34
|
+
})
|
|
35
|
+
}
|