Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport of #5964: Fix dependencies for file picker #6092

Merged
merged 4 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 14 additions & 19 deletions cypress/e2e/cardFeatures.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,13 @@ describe('Card', function() {
.first().click()
cy.get('.modal-mask.card-selector .card-title').should('be.visible').click().type(newCardTitle)
cy.get('.modal-mask.card-selector .multiselect-board').should('be.visible').click()
cy.get('.modal-mask.card-selector .multiselect-board li:contains("' + boardData.title + '")').should('be.visible').click()
cy.get('.vs__dropdown-menu [data-cy="board-select-title"]:contains("' + boardData.title + '")').should('be.visible').click()

cy.wait('@getBoard', { timeout: 7000 })

cy.get('.modal-mask.card-selector .multiselect-list').should('be.visible').click()
cy.get('.modal-mask.card-selector .multiselect-list li').eq(0).should('be.visible').click()
cy.get('.vs__dropdown-menu span[title="TestList"]').should('be.visible').click()

cy.get('.modal-mask.card-selector button.button-vue--vue-primary').should('be.visible').click()
cy.wait('@save', { timeout: 7000 })

Expand Down Expand Up @@ -101,13 +103,13 @@ describe('Card', function() {
})

cy.get('.modal__card').should('be.visible')
cy.get('.app-sidebar-header__maintitle').contains('Hello world')
cy.get('.app-sidebar-header__mainname').contains('Hello world')
})

it('Attachment from files app', () => {
cy.get('.card:contains("Hello world")').should('be.visible').click()
cy.get('.modal__card').should('be.visible')
cy.get('.app-sidebar-tabs__tab [data-id="attachments"]').click()
cy.get('#tab-button-attachments').click()
cy.get('button.icon-upload').should('be.visible')
cy.get('button.icon-folder').should('be.visible')
.click()
Expand All @@ -118,11 +120,11 @@ describe('Card', function() {
cy.get('.attachment-list .basename').contains('welcome.txt')
})

it('Shows the modal with the editor', () => {
it.only('Shows the modal with the editor', () => {
cy.get('.card:contains("Hello world")').should('be.visible').click()
cy.intercept({ method: 'PUT', url: '**/apps/deck/cards/*' }).as('save')
cy.get('.modal__card').should('be.visible')
cy.get('.app-sidebar-header__maintitle').contains('Hello world')
cy.get('.app-sidebar-header__mainname').contains('Hello world')
cy.get('.modal__card .ProseMirror h1').contains('Hello world').should('be.visible')
cy.get('.modal__card .ProseMirror h1')
.click()
Expand Down Expand Up @@ -229,20 +231,13 @@ describe('Card', function() {
cy.get(`.card:contains("${newCardTitle}")`).should('be.visible').click()

cy.get('#app-sidebar-vue [data-test="tag-selector"]').should('be.visible').click()
cy.get('.multiselect__option:contains("Action needed")').should('be.visible').click()

cy.get('[data-test="tag-selector"] .selector-wrapper--icon').click()
cy.get('.multiselect__option:contains("Action needed")').should('not.be.visible')

cy.get('[data-test="tag-selector"] .multiselect__tags .tag:contains("Action needed")')
.should('be.visible')
cy.get('.vs__dropdown-menu .tag:contains("Action needed")').should('be.visible').click()
cy.get('.vs__selected .tag:contains("Action needed")').should('be.visible')
cy.get('.vs__dropdown-menu .tag:contains("Later")').should('be.visible').click()

cy.get(`.card:contains("${newCardTitle}")`).find('.labels li:contains("Action needed")')
.should('be.visible')

cy.get('#app-sidebar-vue [data-test="tag-selector"]').should('be.visible').click()
cy.get('.multiselect__option:contains("Later")').should('be.visible').click()
cy.get('.multiselect__option:contains("Action needed")').should('be.visible').click()
cy.get('.vs__selected .tag:contains("Action needed")').should('be.visible')
cy.get('.vs__selected .tag:contains("Action needed")')
.parent().find('button').click()

cy.get(`.card:contains("${newCardTitle}")`).find('.labels li:contains("Later")')
.should('be.visible')
Expand Down
3 changes: 3 additions & 0 deletions cypress/e2e/sharingFeatures.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ describe('Board', function() {
cy.get('.board-title').contains(board.title)

cy.shareBoardWithUi(recipient.userId)

cy.intercept({ method: 'PUT', url: '**/apps/deck/boards/*/acl/*' }).as('setAcl')
cy.get(`[data-cy="acl-participant:${recipient.userId}"]`).find('[data-cy="action:permission-edit"]').click()
cy.wait('@setAcl')

cy.login(recipient)
cy.visit(`/apps/deck/#/board/${boardId}`)
Expand Down
9 changes: 6 additions & 3 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,14 @@ Cypress.Commands.add('getNavigationEntry', (boardTitle) => {
})

Cypress.Commands.add('shareBoardWithUi', (userId) => {
cy.intercept({ method: 'GET', url: `**/ocs/v2.php/apps/files_sharing/api/v1/sharees?search=${userId}*` }).as('fetchRecipients')
cy.get('[aria-label="Open details"]').click()
cy.get('.app-sidebar').should('be.visible')
cy.get('.multiselect__input').type(`${userId}`)
cy.get('.multiselect__content .multiselect__element').first().contains(userId)
cy.get('.multiselect__input').type('{enter}')
cy.get('.select input').type(`${userId}`)
cy.wait('@fetchRecipients', { timeout: 7000 })

cy.get('.vs__dropdown-menu .option').first().contains(userId)
cy.get('.select input').type('{enter}')

cy.get('.shareWithList').contains(userId)
})
Loading
Loading