@open-xchange/appsuite-codeceptjs 0.6.3 → 0.6.4
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-xchange/appsuite-codeceptjs",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.4",
|
|
4
4
|
"description": "OX App Suite CodeceptJS Configuration and Helpers",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"p-retry": "^6.2.1",
|
|
33
33
|
"playwright-core": "1.53.0",
|
|
34
34
|
"short-uuid": "^5.2.0",
|
|
35
|
-
"@open-xchange/
|
|
36
|
-
"@open-xchange/
|
|
35
|
+
"@open-xchange/soap-client": "0.0.1",
|
|
36
|
+
"@open-xchange/codecept-horizontal-scaler": "0.1.12"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/node": "^24.0.0",
|
package/src/actor.js
CHANGED
|
@@ -107,7 +107,7 @@ module.exports = function () {
|
|
|
107
107
|
*
|
|
108
108
|
* @param {string} locator - The locator of the element. Only accepts css selectors.
|
|
109
109
|
*/
|
|
110
|
-
waitForFocus (locator) {
|
|
110
|
+
async waitForFocus (locator) {
|
|
111
111
|
this.waitForElement(locator)
|
|
112
112
|
this.waitForVisible(locator)
|
|
113
113
|
return this.usePlaywrightTo('wait for focus', async ({ page }) => {
|
|
@@ -26,12 +26,14 @@ module.exports = {
|
|
|
26
26
|
editWindow: '.io-ox-calendar-edit-window',
|
|
27
27
|
miniCalendar: '.window-sidepanel .date-picker',
|
|
28
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"]',
|
|
29
31
|
|
|
30
32
|
async newAppointment () {
|
|
31
33
|
I.wait(1)
|
|
32
34
|
I.clickPrimary('New appointment')
|
|
33
35
|
I.waitForVisible(this.editWindow)
|
|
34
|
-
|
|
36
|
+
return I.waitForFocus('.io-ox-calendar-edit-window input[type="text"][name="summary"]')
|
|
35
37
|
},
|
|
36
38
|
|
|
37
39
|
clickAppointment (title, position = 1) {
|
|
@@ -104,17 +106,14 @@ module.exports = {
|
|
|
104
106
|
}, attr)
|
|
105
107
|
},
|
|
106
108
|
|
|
107
|
-
|
|
109
|
+
addParticipant (name, exists = true, context) {
|
|
108
110
|
if (!context) context = '*'
|
|
109
|
-
if (!addedParticipants) addedParticipants = 1
|
|
110
111
|
|
|
111
112
|
// does suggestion exists (for contact, user, ...)
|
|
112
|
-
exists = typeof exists === 'boolean' ? exists : true
|
|
113
|
-
const number = await I.grabNumberOfVisibleElements(locate('.attendee').inside(context).as('Attendee')) + addedParticipants
|
|
114
113
|
const addParticipantsLocator = locate('.add-participant.tt-input').inside(context).as('Add participant field')
|
|
115
114
|
// input field
|
|
116
115
|
I.waitForVisible(addParticipantsLocator)
|
|
117
|
-
I.waitForEnabled(addParticipantsLocator)
|
|
116
|
+
// I.waitForEnabled(addParticipantsLocator)
|
|
118
117
|
I.fillField(addParticipantsLocator, name)
|
|
119
118
|
I.seeInField(addParticipantsLocator, name)
|
|
120
119
|
// tokenfield/typeahead
|
|
@@ -126,7 +125,6 @@ module.exports = {
|
|
|
126
125
|
|
|
127
126
|
I.waitForInvisible(autocomplete.suggestions)
|
|
128
127
|
// note: might be more than one that get's added (group)
|
|
129
|
-
I.waitForElement(locate('.attendee').inside(context).at(number).as(`Attendee ${number}`))
|
|
130
128
|
},
|
|
131
129
|
|
|
132
130
|
async addParticipantByPicker (name) {
|
|
@@ -137,11 +135,18 @@ module.exports = {
|
|
|
137
135
|
},
|
|
138
136
|
|
|
139
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
|
+
}
|
|
140
145
|
I.waitForElement('.page.current .calendar-header > .dropdown button')
|
|
141
146
|
I.click('.page.current .calendar-header > .dropdown button')
|
|
142
147
|
I.waitForText(view, undefined, '.open .dropdown-menu')
|
|
143
148
|
I.click(locate('.dropdown.open a').withText(view).as('Switch to ' + view))
|
|
144
|
-
I.
|
|
149
|
+
I.waitForVisible(`.io-ox-pagecontroller.page.current[data-page-id="io.ox/calendar/${viewMap[view]}"]`)
|
|
145
150
|
},
|
|
146
151
|
|
|
147
152
|
getFullname (user) {
|
|
@@ -23,6 +23,8 @@ const { I, dialogs } = inject()
|
|
|
23
23
|
module.exports = {
|
|
24
24
|
|
|
25
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"]',
|
|
26
28
|
|
|
27
29
|
selectContact (text) {
|
|
28
30
|
I.waitForElement(`.vgrid [aria-label="${text}"]`)
|
package/src/pageobjects/mail.js
CHANGED
|
@@ -36,7 +36,6 @@ module.exports = {
|
|
|
36
36
|
I.wait(1)
|
|
37
37
|
I.click(item)
|
|
38
38
|
await I.waitForFocus('.list-view li.list-item.selected')
|
|
39
|
-
I.waitForElement('.mail-detail-frame')
|
|
40
39
|
},
|
|
41
40
|
async selectMailByIndex (index) {
|
|
42
41
|
const item = locate('.list-view li.list-item').withAttr({ 'data-index': index.toString() }).as('Mail item')
|
|
@@ -26,8 +26,7 @@ module.exports = {
|
|
|
26
26
|
I.wait(0.5) // prevent clicking a detached element caused by the bottom toolbar being re-rendered multiple times
|
|
27
27
|
I.waitForElement('~New contact')
|
|
28
28
|
I.click({ css: '[data-action="io.ox/contacts/actions/create"]' })
|
|
29
|
-
I.
|
|
30
|
-
I.waitForVisible('.io-ox-contacts-edit-window.complete')
|
|
29
|
+
I.waitForVisible('.io-ox-contacts-edit-window input[name="first_name"]')
|
|
31
30
|
I.waitForText('Add personal info')
|
|
32
31
|
},
|
|
33
32
|
|