Skip to content

Commit 0f54482

Browse files
committed
Move page trash into a dedicated modal
Signed-off-by: Jonas <jonas@freesources.org>
1 parent df8956c commit 0f54482

File tree

3 files changed

+155
-205
lines changed

3 files changed

+155
-205
lines changed

cypress/e2e/page-list.spec.js

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ describe('Page list', function() {
147147
})
148148
})
149149

150-
describe('Page trash', function() {
150+
describe.only('Page trash', function() {
151151
it('allows to trash and restore page with subpage and attachment', function() {
152152
cy.visit('/apps/collectives/Our%20Garden/Day%201')
153153

@@ -168,23 +168,27 @@ describe('Page list', function() {
168168
.should('not.contain', 'Day 1')
169169

170170
// Restore page
171-
cy.get('#page-trash')
171+
cy.get('.page-trash')
172172
.click()
173-
cy.contains('#page-trash__content .app-content-list-item', 'Day 1')
173+
cy.contains('table tr', 'Day 1')
174174
.find('.action-item__menutoggle')
175175
.click({ force: true })
176176
cy.get('button.action-button')
177177
.contains('Restore')
178178
.click()
179-
cy.get('#page-trash')
180-
.click()
181-
cy.get('#page-trash__content .app-content-list-item')
179+
cy.get('table tr')
182180
.should('not.exist')
183181

184182
cy.visit('/apps/collectives/Our%20Garden/Day%201')
185-
cy.getEditor()
186-
.find('img.image__main')
187-
.should('be.visible')
183+
if (Cypress.env('ncVersoin') === 'stable25') {
184+
cy.getReadOnlyEditor()
185+
.find('img.image__main')
186+
.should('be.visible')
187+
} else {
188+
cy.getEditor()
189+
.find('img.image__main')
190+
.should('be.visible')
191+
}
188192
})
189193
})
190194
})

0 commit comments

Comments
 (0)