Skip to content

Commit

Permalink
fix(cypress): Fix the user theming cypress test for the new filepicker
Browse files Browse the repository at this point in the history
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
  • Loading branch information
susnux committed Aug 10, 2023
1 parent 5bb1dda commit 2e35020
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions cypress/e2e/theming/user-background.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,17 @@ describe('User select a custom background', function() {
it('Select a custom background', function() {
cy.intercept('*/apps/theming/background/custom').as('setBackground')

cy.on('uncaught:exception', (err) => {
// This can happen because of blink engine & skeleton animation, its not a bug just engine related.
if (err.message.includes('ResizeObserver loop limit exceeded')) {
return false
}
})

// Pick background
cy.get('[data-user-theming-background-custom]').click()
cy.get(`#picker-filestable tr[data-entryname="${image}"]`).click()
cy.get('#oc-dialog-filepicker-content ~ .oc-dialog-buttonrow button.primary').click()
cy.get('.file-picker__files tr').contains(image).click()
cy.get('.dialog__actions .button-vue--vue-primary').click()

// Wait for background to be set
cy.wait('@setBackground')
Expand Down Expand Up @@ -242,10 +249,17 @@ describe('User changes settings and reload the page', function() {
it('Select a custom background', function() {
cy.intercept('*/apps/theming/background/custom').as('setBackground')

cy.on('uncaught:exception', (err) => {
// This can happen because of blink engine & skeleton animation, its not a bug just engine related.
if (err.message.includes('ResizeObserver loop limit exceeded')) {
return false
}
})

// Pick background
cy.get('[data-user-theming-background-custom]').click()
cy.get(`#picker-filestable tr[data-entryname="${image}"]`).click()
cy.get('#oc-dialog-filepicker-content ~ .oc-dialog-buttonrow button.primary').click()
cy.get('.file-picker__files tr').contains(image).click()
cy.get('.dialog__actions .button-vue--vue-primary').click()

// Wait for background to be set
cy.wait('@setBackground')
Expand Down

0 comments on commit 2e35020

Please sign in to comment.