@open-xchange/appsuite-codeceptjs 0.6.10 → 0.6.12
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/container/Dockerfile +1 -1
- package/index.js +2 -19
- package/package.json +6 -5
- 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
package/container/Dockerfile
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
FROM registry.gitlab.com/openxchange/appsuite/web-foundation/base-images/playwright:v1.55.
|
|
1
|
+
FROM registry.gitlab.com/openxchange/appsuite/web-foundation/base-images/playwright:v1.55.1-jammy
|
package/index.js
CHANGED
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
require('./src/chai')
|
|
22
22
|
const { recorder, event: codeceptEvents } = require('codeceptjs')
|
|
23
|
+
const pageobjects = require('@open-xchange/appsuite-codeceptjs-pageobjects')
|
|
23
24
|
|
|
24
25
|
const dotenv = require('dotenv')
|
|
25
26
|
dotenv.config({ path: ['.env', '.env.defaults'], quiet: true })
|
|
@@ -87,25 +88,7 @@ module.exports = {
|
|
|
87
88
|
I: '@open-xchange/appsuite-codeceptjs/src/actor',
|
|
88
89
|
users: '@open-xchange/appsuite-codeceptjs/src/users',
|
|
89
90
|
contexts: '@open-xchange/appsuite-codeceptjs/src/contexts',
|
|
90
|
-
|
|
91
|
-
contacts: '@open-xchange/appsuite-codeceptjs/src/pageobjects/contacts',
|
|
92
|
-
calendar: '@open-xchange/appsuite-codeceptjs/src/pageobjects/calendar',
|
|
93
|
-
mail: '@open-xchange/appsuite-codeceptjs/src/pageobjects/mail',
|
|
94
|
-
drive: '@open-xchange/appsuite-codeceptjs/src/pageobjects/drive',
|
|
95
|
-
tasks: '@open-xchange/appsuite-codeceptjs/src/pageobjects/tasks',
|
|
96
|
-
// fragments
|
|
97
|
-
dialogs: '@open-xchange/appsuite-codeceptjs/src/pageobjects/fragments/dialogs',
|
|
98
|
-
autocomplete: '@open-xchange/appsuite-codeceptjs/src/pageobjects/fragments/contact-autocomplete',
|
|
99
|
-
contactpicker: '@open-xchange/appsuite-codeceptjs/src/pageobjects/fragments/contact-picker',
|
|
100
|
-
mailfilter: '@open-xchange/appsuite-codeceptjs/src/pageobjects/fragments/settings-mailfilter',
|
|
101
|
-
search: '@open-xchange/appsuite-codeceptjs/src/pageobjects/fragments/search',
|
|
102
|
-
tinymce: '@open-xchange/appsuite-codeceptjs/src/pageobjects/fragments/tinymce',
|
|
103
|
-
topbar: '@open-xchange/appsuite-codeceptjs/src/pageobjects/fragments/topbar',
|
|
104
|
-
settings: '@open-xchange/appsuite-codeceptjs/src/pageobjects/fragments/settings',
|
|
105
|
-
viewer: '@open-xchange/appsuite-codeceptjs/src/pageobjects/fragments/viewer',
|
|
106
|
-
mobileCalendar: '@open-xchange/appsuite-codeceptjs/src/pageobjects/mobile/mobileCalendar',
|
|
107
|
-
mobileMail: '@open-xchange/appsuite-codeceptjs/src/pageobjects/mobile/mobileMail',
|
|
108
|
-
mobileContacts: '@open-xchange/appsuite-codeceptjs/src/pageobjects/mobile/mobileContacts'
|
|
91
|
+
...pageobjects
|
|
109
92
|
},
|
|
110
93
|
async bootstrap () {
|
|
111
94
|
// set moment defaults
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-xchange/appsuite-codeceptjs",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.12",
|
|
4
4
|
"description": "OX App Suite CodeceptJS Configuration and Helpers",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -17,12 +17,13 @@
|
|
|
17
17
|
"@axe-core/playwright": "^4.10.2",
|
|
18
18
|
"@codeceptjs/helper": "^2.0.4",
|
|
19
19
|
"@influxdata/influxdb-client": "^1.35.0",
|
|
20
|
-
"@
|
|
20
|
+
"@open-xchange/appsuite-codeceptjs-pageobjects": "^1.0.0",
|
|
21
|
+
"@playwright/test": "1.55.1",
|
|
21
22
|
"allure-codeceptjs": "2.15.1",
|
|
22
23
|
"chai": "^6.0.0",
|
|
23
24
|
"chalk": "^4.1.2",
|
|
24
25
|
"chalk-table": "^1.0.2",
|
|
25
|
-
"codeceptjs": "3.7.
|
|
26
|
+
"codeceptjs": "3.7.5",
|
|
26
27
|
"dotenv": "^17.2.1",
|
|
27
28
|
"mocha": "^11.7.1",
|
|
28
29
|
"mocha-junit-reporter": "^2.2.1",
|
|
@@ -30,9 +31,9 @@
|
|
|
30
31
|
"moment": "^2.30.1",
|
|
31
32
|
"moment-timezone": "^0.6.0",
|
|
32
33
|
"p-retry": "^7.0.0",
|
|
33
|
-
"playwright-core": "1.55.
|
|
34
|
+
"playwright-core": "1.55.1",
|
|
34
35
|
"short-uuid": "^5.2.0",
|
|
35
|
-
"@open-xchange/codecept-horizontal-scaler": "0.1.
|
|
36
|
+
"@open-xchange/codecept-horizontal-scaler": "0.1.13",
|
|
36
37
|
"@open-xchange/soap-client": "0.0.7"
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|
|
@@ -1,229 +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, contactpicker, autocomplete, dialogs } = inject()
|
|
22
|
-
const { getMonday } = require('./util')
|
|
23
|
-
|
|
24
|
-
module.exports = {
|
|
25
|
-
|
|
26
|
-
editWindow: '.io-ox-calendar-edit-window',
|
|
27
|
-
miniCalendar: '.window-sidepanel .date-picker',
|
|
28
|
-
title: '[data-extension-point="io.ox/calendar/edit/section"] input[name="summary"]',
|
|
29
|
-
location: '[data-extension-point="io.ox/calendar/edit/section"] input[name="location"]',
|
|
30
|
-
description: '[data-extension-point="io.ox/calendar/edit/section"] textarea[name="description"]',
|
|
31
|
-
|
|
32
|
-
async newAppointment () {
|
|
33
|
-
I.wait(1)
|
|
34
|
-
I.clickPrimary('New appointment')
|
|
35
|
-
I.waitForVisible(this.editWindow)
|
|
36
|
-
return I.waitForFocus('.io-ox-calendar-edit-window input[type="text"][name="summary"]')
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
clickAppointment (title, position = 1) {
|
|
40
|
-
I.wait(0.5) // wait for rendering
|
|
41
|
-
const appointment = locate('.page.current .appointment .title').withText(title).at(position).as('Appointment')
|
|
42
|
-
I.waitForElement(appointment)
|
|
43
|
-
I.scrollTo(appointment)
|
|
44
|
-
I.click(appointment)
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
-
getNextMonday () {
|
|
48
|
-
return getMonday().add(1, 'week').set('hour', 8)
|
|
49
|
-
},
|
|
50
|
-
|
|
51
|
-
startNextMonday () {
|
|
52
|
-
// use next monday to avoid problems when tests run over the weekend
|
|
53
|
-
const date = this.getNextMonday()
|
|
54
|
-
I.fillField('Starts on', date.format('L'))
|
|
55
|
-
I.clearField('~Start time')
|
|
56
|
-
I.fillField('~Start time', '8:00')
|
|
57
|
-
return date
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
moveCalendarViewToNextWeek () {
|
|
61
|
-
I.waitForText('Today', undefined, '.calendar-header')
|
|
62
|
-
I.click('Today')
|
|
63
|
-
I.waitForElement('~Next week')
|
|
64
|
-
I.click('~Next week')
|
|
65
|
-
// look for proper aria-label
|
|
66
|
-
I.waitForElement('~' + this.getNextMonday().format('ddd D') + ', create all-day appointment')
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
openScheduling () {
|
|
70
|
-
I.waitForElement(locate('button').withText('New appointment').as('New appointment'))
|
|
71
|
-
I.click('.primary-action button[aria-label="More actions"]')
|
|
72
|
-
I.waitForElement('.primary-action .dropdown-menu')
|
|
73
|
-
I.click('Scheduling', '.primary-action .dropdown-menu')
|
|
74
|
-
},
|
|
75
|
-
|
|
76
|
-
recurAppointment (date) {
|
|
77
|
-
I.checkOption('Repeat')
|
|
78
|
-
if (date) I.see(`Every ${date.format('dddd')}.`)
|
|
79
|
-
I.click('.recurrence-view button.summary')
|
|
80
|
-
I.waitForElement('.recurrence-view-dialog')
|
|
81
|
-
},
|
|
82
|
-
|
|
83
|
-
deleteAppointment () {
|
|
84
|
-
I.waitForElement('~Delete')
|
|
85
|
-
I.click('~Delete', '.detail-popup')
|
|
86
|
-
dialogs.waitForVisible()
|
|
87
|
-
dialogs.clickButton('Delete')
|
|
88
|
-
I.waitForDetached('.modal-dialog')
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
// attr: [startDate, endDate, until]
|
|
92
|
-
setDate (attr, value) {
|
|
93
|
-
I.click('~Date (M/D/YYYY)', locate(`[data-attribute="${attr}"]`).as('Date input'))
|
|
94
|
-
I.waitForElement('.date-picker.open')
|
|
95
|
-
I.click(`.dateinput[data-attribute="${attr}"] .datepicker-day-field`)
|
|
96
|
-
I.fillField(`.dateinput[data-attribute="${attr}"] .datepicker-day-field`, value.format('L'))
|
|
97
|
-
I.pressKey('Enter')
|
|
98
|
-
I.waitForDetached('.date-picker.open')
|
|
99
|
-
},
|
|
100
|
-
|
|
101
|
-
getDate (attr) {
|
|
102
|
-
return I.executeScript(function (attr) {
|
|
103
|
-
// fillfield works only for puppeteer, pressKey(11/10....) only for webdriver
|
|
104
|
-
// @ts-ignore
|
|
105
|
-
return document.querySelector(`.dateinput[data-attribute="${attr}"] .datepicker-day-field`).value
|
|
106
|
-
}, attr)
|
|
107
|
-
},
|
|
108
|
-
|
|
109
|
-
addParticipant (name, exists = true, context) {
|
|
110
|
-
if (!context) context = '*'
|
|
111
|
-
|
|
112
|
-
// does suggestion exists (for contact, user, ...)
|
|
113
|
-
const addParticipantsLocator = locate('.add-participant.tt-input').inside(context).as('Add participant field')
|
|
114
|
-
// input field
|
|
115
|
-
I.waitForVisible(addParticipantsLocator)
|
|
116
|
-
// I.waitForEnabled(addParticipantsLocator)
|
|
117
|
-
I.fillField(addParticipantsLocator, name)
|
|
118
|
-
I.seeInField(addParticipantsLocator, name)
|
|
119
|
-
// tokenfield/typeahead
|
|
120
|
-
if (exists) {
|
|
121
|
-
autocomplete.select(name, context.replace('.', ''))
|
|
122
|
-
} else {
|
|
123
|
-
I.pressKey('Enter')
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
I.waitForInvisible(autocomplete.suggestions)
|
|
127
|
-
// note: might be more than one that get's added (group)
|
|
128
|
-
},
|
|
129
|
-
|
|
130
|
-
async addParticipantByPicker (name) {
|
|
131
|
-
I.click('~Select contacts')
|
|
132
|
-
await contactpicker.add(name)
|
|
133
|
-
contactpicker.close()
|
|
134
|
-
I.waitForText(name, undefined, '.attendee-container')
|
|
135
|
-
},
|
|
136
|
-
|
|
137
|
-
switchView (view) {
|
|
138
|
-
const viewMap = {
|
|
139
|
-
Day: 'week:day',
|
|
140
|
-
Week: 'week:week',
|
|
141
|
-
Workweek: 'week:workweek',
|
|
142
|
-
Month: 'month',
|
|
143
|
-
List: 'list'
|
|
144
|
-
}
|
|
145
|
-
I.waitForElement('.page.current .calendar-header > .dropdown button')
|
|
146
|
-
I.click('.page.current .calendar-header > .dropdown button')
|
|
147
|
-
I.waitForText(view, undefined, '.open .dropdown-menu')
|
|
148
|
-
I.click(locate('.dropdown.open a').withText(view).as('Switch to ' + view))
|
|
149
|
-
I.waitForVisible(`.io-ox-pagecontroller.page.current[data-page-id="io.ox/calendar/${viewMap[view]}"]`)
|
|
150
|
-
},
|
|
151
|
-
|
|
152
|
-
getFullname (user) {
|
|
153
|
-
return `${user.get('sur_name')}, ${user.get('given_name')}`
|
|
154
|
-
},
|
|
155
|
-
|
|
156
|
-
async createAppointment ({ subject, location, folder, startDate, startTime, endDate, endTime }) {
|
|
157
|
-
// select calendar
|
|
158
|
-
if (folder) {
|
|
159
|
-
I.selectFolder(folder)
|
|
160
|
-
I.waitForElement('li.selected[aria-label^="' + folder + '"] .color-label')
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
I.clickPrimary('New appointment')
|
|
164
|
-
I.waitForVisible(locate('.io-ox-calendar-edit-window').as('Edit Dialog'))
|
|
165
|
-
await I.waitForFocus('.io-ox-calendar-edit-window input[type="text"][name="summary"]')
|
|
166
|
-
|
|
167
|
-
if (folder) {
|
|
168
|
-
I.see(folder, '.io-ox-calendar-edit-window .folder-selection')
|
|
169
|
-
}
|
|
170
|
-
await within('.io-ox-calendar-edit-window', async () => {
|
|
171
|
-
I.fillField('Title', subject)
|
|
172
|
-
|
|
173
|
-
if (location) I.fillField('Location', location)
|
|
174
|
-
|
|
175
|
-
if (startDate) {
|
|
176
|
-
I.click('~Date (M/D/YYYY)')
|
|
177
|
-
I.pressKey(['CommandOrControl', 'a'])
|
|
178
|
-
I.type(startDate)
|
|
179
|
-
I.pressKey('Enter')
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
if (startTime) {
|
|
183
|
-
I.click('~Start time')
|
|
184
|
-
I.click(startTime)
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
if (endDate) {
|
|
188
|
-
I.click('~Date (M/D/YYYY)', '.dateinput[data-attribute="endDate"]')
|
|
189
|
-
I.pressKey(['CommandOrControl', 'a'])
|
|
190
|
-
I.type(endDate)
|
|
191
|
-
I.pressKey('Enter')
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
if (endTime) {
|
|
195
|
-
I.click('~End time')
|
|
196
|
-
I.click(endTime)
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
// save
|
|
200
|
-
I.click('Create')
|
|
201
|
-
})
|
|
202
|
-
I.waitForDetached('.io-ox-calendar-edit-window')
|
|
203
|
-
},
|
|
204
|
-
|
|
205
|
-
// remove previously created appointments by appointment title
|
|
206
|
-
async removeAllAppointments (title) {
|
|
207
|
-
const { skipRefresh } = await I.executeScript(async function (title) {
|
|
208
|
-
const appointments = [...document.querySelectorAll('.appointment')]
|
|
209
|
-
.map(el => {
|
|
210
|
-
const folder = el.getAttribute('data-folder')
|
|
211
|
-
return { folder, id: el.getAttribute('data-cid').replace(folder + '.', '') }
|
|
212
|
-
})
|
|
213
|
-
if (appointments.length === 0) return { skipRefresh: true }
|
|
214
|
-
const { default: api } = await import(String(new URL('io.ox/calendar/api.js', location.href)))
|
|
215
|
-
return await api.remove(appointments, {})
|
|
216
|
-
}, title)
|
|
217
|
-
if (skipRefresh === true) return
|
|
218
|
-
I.click('#io-ox-refresh-icon')
|
|
219
|
-
I.waitForDetached('#io-ox-refresh-icon .animate-spin')
|
|
220
|
-
},
|
|
221
|
-
|
|
222
|
-
async setDateTo (dateString) {
|
|
223
|
-
await I.executeScript(async function (dateStr) {
|
|
224
|
-
const { default: apps } = await import(String(new URL('io.ox/core/api/apps.js', location.href)))
|
|
225
|
-
const { moment } = await import(String(new URL('e2e.js', location.href)))
|
|
226
|
-
apps.get('io.ox/calendar').setDate(moment(dateStr))
|
|
227
|
-
}, dateString)
|
|
228
|
-
}
|
|
229
|
-
}
|
|
@@ -1,149 +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, dialogs } = inject()
|
|
22
|
-
|
|
23
|
-
module.exports = {
|
|
24
|
-
|
|
25
|
-
editWindow: '.io-ox-contacts-edit-window',
|
|
26
|
-
title: '.io-ox-contacts-edit-window input[name="title"]',
|
|
27
|
-
note: '.io-ox-contacts-edit-window textarea[name="note"]',
|
|
28
|
-
|
|
29
|
-
selectContact (text) {
|
|
30
|
-
I.waitForElement(`.vgrid [aria-label="${text}"]`)
|
|
31
|
-
I.click(`.vgrid [aria-label="${text}"]`)
|
|
32
|
-
I.waitForElement('.contact-header')
|
|
33
|
-
I.waitForText(text, undefined, '.contact-header .fullname')
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
selectListItem (text, selector = '.last_name') {
|
|
37
|
-
I.waitForElement(locate(`.vgrid-cell ${selector}`).withText(text).as(text))
|
|
38
|
-
I.click(locate(`.vgrid-cell ${selector}`).withText(text).as(text))
|
|
39
|
-
I.waitForElement(locate(`.contact-detail h2 ${selector}`).withText(text).as(text))
|
|
40
|
-
I.wait(0.5)
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
newAddressbook (name) {
|
|
44
|
-
I.click('button.contextmenu-control', '~My address books')
|
|
45
|
-
I.clickDropdown('Add new address book')
|
|
46
|
-
dialogs.waitForVisible()
|
|
47
|
-
I.fillField('[placeholder="New address book"][type="text"]', name)
|
|
48
|
-
dialogs.clickButton('Add')
|
|
49
|
-
I.waitForDetached('.modal-dialog')
|
|
50
|
-
},
|
|
51
|
-
|
|
52
|
-
newContact () {
|
|
53
|
-
I.waitForDetached('.dropdown-toggle.disabled')
|
|
54
|
-
I.clickPrimary('New contact')
|
|
55
|
-
I.waitForText('Add personal info')
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
newDistributionlist () {
|
|
59
|
-
I.waitForDetached('.dropdown-toggle.disabled')
|
|
60
|
-
const button = locate('.primary-action .btn-group').withText('New contact').as('Primary Dropdown Button: New contact')
|
|
61
|
-
I.waitForVisible(button)
|
|
62
|
-
I.click(locate('.dropdown-toggle').inside(button).as('Dropdown Toggle'))
|
|
63
|
-
I.click('New distribution list', '.primary-action .btn-group > .dropdown-menu')
|
|
64
|
-
I.waitForText('Participants')
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
addField (fieldType, field) {
|
|
68
|
-
I.click(`.dropdown[data-add="${fieldType}"] button`, '.contact-edit')
|
|
69
|
-
I.waitForVisible('.dropdown.open .dropdown-menu')
|
|
70
|
-
I.click(field)
|
|
71
|
-
I.waitForText(field, 30, '.contact-edit')
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
editMyAccount () {
|
|
75
|
-
I.waitForVisible('.dropdown-toggle[aria-label="My account"]')
|
|
76
|
-
I.waitForVisible('.contact-picture')
|
|
77
|
-
I.click('.contact-picture')
|
|
78
|
-
I.waitForText('Edit personal data', 30, '.dropdown.open .dropdown-menu')
|
|
79
|
-
I.click('Edit personal data', '.dropdown.open .dropdown-menu')
|
|
80
|
-
I.waitForVisible(this.editWindow)
|
|
81
|
-
},
|
|
82
|
-
|
|
83
|
-
deleteSelected () {
|
|
84
|
-
I.clickToolbar('Delete')
|
|
85
|
-
dialogs.waitForVisible()
|
|
86
|
-
dialogs.clickButton('Delete')
|
|
87
|
-
I.waitForDetached('.modal-dialog')
|
|
88
|
-
},
|
|
89
|
-
|
|
90
|
-
async hasImage () {
|
|
91
|
-
const rule = await I.grabCssPropertyFrom('.contact-header .contact-photo', 'background-image')
|
|
92
|
-
expect(rule).to.match(/^url\(/)
|
|
93
|
-
},
|
|
94
|
-
|
|
95
|
-
importCSV (file, path = 'media/imports/contacts', folder = 'Contacts') {
|
|
96
|
-
I.rightClick(`~${folder}`)
|
|
97
|
-
I.clickDropdown('Import')
|
|
98
|
-
dialogs.waitForVisible()
|
|
99
|
-
I.selectOption('Format', 'CSV')
|
|
100
|
-
I.attachFile('.file-input', `${path}/${file}.csv`)
|
|
101
|
-
dialogs.clickButton('Import')
|
|
102
|
-
I.waitForDetached('.modal-dialog')
|
|
103
|
-
I.waitForText('Data imported successfully')
|
|
104
|
-
},
|
|
105
|
-
|
|
106
|
-
importVCF (file, path = 'media/imports/contacts', folder = 'Contacts') {
|
|
107
|
-
I.rightClick(`~${folder}`)
|
|
108
|
-
I.clickDropdown('Import')
|
|
109
|
-
dialogs.waitForVisible()
|
|
110
|
-
I.selectOption('Format', 'VCARD')
|
|
111
|
-
I.attachFile('.file-input', `${path}/${file}.vcf`)
|
|
112
|
-
dialogs.clickButton('Import')
|
|
113
|
-
I.waitForDetached('.modal-dialog')
|
|
114
|
-
I.waitForText('Data imported successfully')
|
|
115
|
-
},
|
|
116
|
-
|
|
117
|
-
async exportCSV (file) {
|
|
118
|
-
I.clickToolbar('More actions')
|
|
119
|
-
I.clickDropdown('Export')
|
|
120
|
-
dialogs.waitForVisible()
|
|
121
|
-
I.checkOption('CSV')
|
|
122
|
-
I.waitForDownload('.modal-dialog button:has-text("Export")', `${file}.csv`)
|
|
123
|
-
I.waitForDetached('.modal-dialog')
|
|
124
|
-
},
|
|
125
|
-
async exportVCF (file) {
|
|
126
|
-
I.clickToolbar('More actions')
|
|
127
|
-
I.clickDropdown('Export')
|
|
128
|
-
dialogs.waitForVisible()
|
|
129
|
-
I.checkOption('vCard')
|
|
130
|
-
I.waitForDownload('.modal-dialog button:has-text("Export")', `${file}.vcf`)
|
|
131
|
-
I.waitForDetached('.modal-dialog')
|
|
132
|
-
},
|
|
133
|
-
async exportAddressBookCSV (file) {
|
|
134
|
-
I.rightClick('~Contacts')
|
|
135
|
-
I.clickDropdown('Export')
|
|
136
|
-
dialogs.waitForVisible()
|
|
137
|
-
I.checkOption('CSV')
|
|
138
|
-
I.waitForDownload('.modal-dialog button:has-text("Export")', `${file}.csv`)
|
|
139
|
-
I.waitForDetached('.modal-dialog')
|
|
140
|
-
},
|
|
141
|
-
async exportAddressBookVCF (file) {
|
|
142
|
-
I.rightClick('~Contacts')
|
|
143
|
-
I.clickDropdown('Export')
|
|
144
|
-
dialogs.waitForVisible()
|
|
145
|
-
I.checkOption('vCard')
|
|
146
|
-
I.waitForDownload('.modal-dialog button:has-text("Export")', `${file}.vcf`)
|
|
147
|
-
I.waitForDetached('.modal-dialog')
|
|
148
|
-
}
|
|
149
|
-
}
|
package/src/pageobjects/drive.js
DELETED
|
@@ -1,96 +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, dialogs } = inject()
|
|
22
|
-
|
|
23
|
-
module.exports = {
|
|
24
|
-
|
|
25
|
-
openSecondary () {
|
|
26
|
-
I.waitForElement('~New')
|
|
27
|
-
I.click('.primary-action > .dropdown > button')
|
|
28
|
-
I.waitForElement('.dropdown.open .dropdown-menu')
|
|
29
|
-
},
|
|
30
|
-
clickSecondary (name) {
|
|
31
|
-
this.openSecondary()
|
|
32
|
-
I.click(name, '.dropdown.open .dropdown-menu')
|
|
33
|
-
},
|
|
34
|
-
selectFile (title, { timeout = undefined } = {}) {
|
|
35
|
-
I.waitForElement(`.filename[title="${title}"]`, timeout)
|
|
36
|
-
I.click(`.filename[title="${title}"]`)
|
|
37
|
-
I.wait(0.5) // wait for toolbar rendering
|
|
38
|
-
},
|
|
39
|
-
shareFolder (name, role) {
|
|
40
|
-
I.clickToolbar('Share')
|
|
41
|
-
dialogs.waitForVisible()
|
|
42
|
-
I.waitForText('Share folder')
|
|
43
|
-
|
|
44
|
-
if (role !== 'Viewer') {
|
|
45
|
-
I.waitForVisible('.permission-pre-selection .btn')
|
|
46
|
-
I.click('.permission-pre-selection .btn')
|
|
47
|
-
I.clickDropdown(role)
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
I.waitForText(role, undefined, '.permission-pre-selection')
|
|
51
|
-
I.click('~Select contacts')
|
|
52
|
-
|
|
53
|
-
// dialog is open
|
|
54
|
-
dialogs.waitForVisible()
|
|
55
|
-
I.waitForElement('.modal-body .list-view.address-picker li.list-item') // check if list items are loaded
|
|
56
|
-
I.fillField('Search', name)
|
|
57
|
-
I.waitForText(name, undefined, '.modal-dialog .address-picker')
|
|
58
|
-
I.waitForElement('.address-picker .list-item')
|
|
59
|
-
I.click('.address-picker .list-item')
|
|
60
|
-
dialogs.clickButton('Select')
|
|
61
|
-
|
|
62
|
-
I.waitForText('Share folder', undefined, dialogs.header)
|
|
63
|
-
I.waitForText('ADDED', undefined, '.permissions-view .permission.row:first-child .added')
|
|
64
|
-
I.see('Owner', '.permissions-view .permission.row:last-child')
|
|
65
|
-
I.see(role, '.permissions-view .permission.row:first-child')
|
|
66
|
-
I.see('Internal user (' + name + ')', '.permissions-view .permission.row:first-child .description')
|
|
67
|
-
dialogs.clickButton('Share')
|
|
68
|
-
I.waitForDetached('.modal-dialog')
|
|
69
|
-
},
|
|
70
|
-
moveManuallyTo (destination) {
|
|
71
|
-
I.clickToolbar('More actions')
|
|
72
|
-
I.clickDropdown('Move')
|
|
73
|
-
|
|
74
|
-
I.waitForElement('.folder-picker-dialog')
|
|
75
|
-
I.waitForElement(`.folder-picker-dialog [data-id="${destination}"]`)
|
|
76
|
-
I.click(`.folder-picker-dialog [data-id="${destination}"]`)
|
|
77
|
-
I.waitForElement(`.folder-picker-dialog [data-id="${destination}"].selected`)
|
|
78
|
-
I.click('Move', '.folder-picker-dialog')
|
|
79
|
-
I.waitForDetached('.folder-picker-dialog')
|
|
80
|
-
},
|
|
81
|
-
seeListViewIcon (itemName, icon, title) {
|
|
82
|
-
I.seeElement(`.list-item .filename[title="${itemName}"] ~ .icons span[title="${title}"] .${icon}`)
|
|
83
|
-
},
|
|
84
|
-
seeNumberOfListViewIcons (itemName, count) {
|
|
85
|
-
I.seeNumberOfElements(`.list-item .filename[title="${itemName}"] ~ .icons span`, count)
|
|
86
|
-
},
|
|
87
|
-
seeInternalUserInShareSection (userName, email) {
|
|
88
|
-
I.waitForText(`${userName}${email}`, undefined, '.viewer-shares-info')
|
|
89
|
-
},
|
|
90
|
-
seeGuestInShareSection (email) {
|
|
91
|
-
I.waitForText(`${email}Guest`, undefined, '.viewer-shares-info')
|
|
92
|
-
},
|
|
93
|
-
seePublicLinkInShareSection () {
|
|
94
|
-
I.waitForText('Public link', undefined, '.viewer-shares-info')
|
|
95
|
-
}
|
|
96
|
-
}
|
|
@@ -1,45 +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
|
-
suggestion: locate('.tt-dropdown-menu .tt-suggestion:nth-of-type(1)').as('First suggestion'),
|
|
26
|
-
suggestions: locate('.tt-dropdown-menu').as('Suggestion dropdown'),
|
|
27
|
-
|
|
28
|
-
select (elementName, within) {
|
|
29
|
-
const context = within === '*' ? '//span[@class="tt-dropdown-menu"]' : `//div[contains(@class, "${within}")]//span[@class="tt-dropdown-menu"]`
|
|
30
|
-
|
|
31
|
-
I.waitForText(elementName, 10, context)
|
|
32
|
-
|
|
33
|
-
// searched entry could be a resource or user where the DOM structure differs
|
|
34
|
-
const searchEntry = locate(`${context}//div[@class="participant-name"]/strong[text()="${elementName}"]|//div[@class="participant-email"]/span/strong[text()="${elementName}"]`).as(elementName)
|
|
35
|
-
I.waitForElement(searchEntry, 10)
|
|
36
|
-
I.click(searchEntry)
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
selectFirst () {
|
|
40
|
-
I.waitForVisible(this.suggestion)
|
|
41
|
-
I.waitForEnabled(this.suggestion)
|
|
42
|
-
I.click(this.suggestion)
|
|
43
|
-
I.waitForInvisible(this.suggestions)
|
|
44
|
-
}
|
|
45
|
-
}
|
|
@@ -1,50 +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
|
-
results: locate('.addressbook-popup').find('.list-item').as('Results'),
|
|
26
|
-
|
|
27
|
-
ready () {
|
|
28
|
-
I.waitForVisible('.addressbook-popup')
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
async add (query) {
|
|
32
|
-
this.ready()
|
|
33
|
-
await I.waitForFocus('.addressbook-popup .search-field')
|
|
34
|
-
I.fillField('.addressbook-popup .search-field', query)
|
|
35
|
-
I.waitForVisible(this.results)
|
|
36
|
-
this.selectFirst()
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
selectFirst () {
|
|
40
|
-
I.waitForEnabled(this.results)
|
|
41
|
-
I.waitForEnabled(this.results.first().as('First list item'))
|
|
42
|
-
I.click(this.results.first().as('First list item'))
|
|
43
|
-
I.waitForVisible(locate('.list-item.selected').as('Selected list item'))
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
close () {
|
|
47
|
-
I.click('Select')
|
|
48
|
-
I.waitToHide('.addressbook-popup')
|
|
49
|
-
}
|
|
50
|
-
}
|