@open-xchange/appsuite-codeceptjs 0.6.11 → 0.6.13
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/index.js +2 -19
- package/package.json +5 -5
- package/src/contexts/contexts.js +6 -1
- package/spec/pageobjects/calendar.test.js +0 -123
- package/src/pageobjects/calendar.js +0 -229
- package/src/pageobjects/contacts.js +0 -149
- package/src/pageobjects/drive.js +0 -96
- package/src/pageobjects/fragments/contact-autocomplete.js +0 -45
- package/src/pageobjects/fragments/contact-picker.js +0 -50
- package/src/pageobjects/fragments/dialogs.js +0 -41
- package/src/pageobjects/fragments/search.js +0 -54
- package/src/pageobjects/fragments/settings-mailfilter.js +0 -90
- package/src/pageobjects/fragments/settings.js +0 -71
- package/src/pageobjects/fragments/tinymce.js +0 -41
- package/src/pageobjects/fragments/topbar.js +0 -43
- package/src/pageobjects/fragments/viewer.js +0 -67
- package/src/pageobjects/mail.js +0 -66
- package/src/pageobjects/mobile/mobileCalendar.js +0 -41
- package/src/pageobjects/mobile/mobileContacts.js +0 -39
- package/src/pageobjects/mobile/mobileMail.js +0 -51
- package/src/pageobjects/tasks.js +0 -58
- package/src/pageobjects/util.js +0 -34
|
@@ -1,41 +0,0 @@
|
|
|
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
|
-
async setDate (attr, value) {
|
|
27
|
-
const date = value.toFormat("yyyy-MM-dd'T'HH:mm")
|
|
28
|
-
await I.executeScript(async ({ 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('mouseout'))
|
|
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
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
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.waitForVisible('.io-ox-contacts-edit-window input[name="first_name"]')
|
|
30
|
-
I.waitForText('Add personal info')
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
addField (fieldType, field) {
|
|
34
|
-
I.click(`.dropdown[data-add="${fieldType}"] button`, '.contact-edit')
|
|
35
|
-
I.waitForVisible('.dropdown.open')
|
|
36
|
-
I.click(field)
|
|
37
|
-
I.waitForText(field, 30, '.contact-edit')
|
|
38
|
-
}
|
|
39
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
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
|
-
}
|
package/src/pageobjects/tasks.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
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
|
-
}
|
package/src/pageobjects/util.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
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 moment = require('moment')
|
|
22
|
-
|
|
23
|
-
module.exports = {
|
|
24
|
-
|
|
25
|
-
// return the (standard) workweek start on the current week depending on the locale
|
|
26
|
-
getMonday (date = moment()) {
|
|
27
|
-
// robust approach that also works:
|
|
28
|
-
// a) over the weekend (!)
|
|
29
|
-
// b) if firstDayOfWeek is Sunday or Saturday
|
|
30
|
-
const firstDayOfWeek = moment.localeData(date.locale()).firstDayOfWeek()
|
|
31
|
-
const localeWeekday = (8 - firstDayOfWeek) % 7
|
|
32
|
-
return date.startOf('week').weekday(localeWeekday)
|
|
33
|
-
}
|
|
34
|
-
}
|