Skip to content
Open
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
11 changes: 0 additions & 11 deletions .eslintignore

This file was deleted.

15 changes: 0 additions & 15 deletions .eslintrc.js

This file was deleted.

3 changes: 1 addition & 2 deletions .github/workflows/lint-eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ jobs:
- 'package.json'
- 'package-lock.json'
- 'tsconfig.json'
- '.eslintrc.*'
- '.eslintignore'
- 'eslint.config.*'
- '**.js'
- '**.ts'
- '**.vue'
Expand Down
2 changes: 1 addition & 1 deletion .nextcloudignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/tests
/babel.config.js
/.editorconfig
/.eslintrc.js
/.eslint.config.mjs
/.nextcloudignore
/webpack.js
/.codecov.yml
Expand Down
5 changes: 0 additions & 5 deletions cypress/.eslintrc.js

This file was deleted.

6 changes: 3 additions & 3 deletions cypress/e2e/boardFeatures.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

import { randUser } from '../utils/index.js'
const user = randUser()
const recipient = randUser()
import { sampleBoard } from '../utils/sampleBoard'
import { sampleBoard } from '../utils/sampleBoard.js'

describe('Board', function() {

before(function() {
cy.createUser(user)
cy.createUser(recipient)
Expand Down Expand Up @@ -257,7 +257,7 @@ describe('Board title editing', function() {
})

describe('Board import', function() {
before(function () {
before(function() {
cy.createUser(user)
})
beforeEach(function() {
Expand Down
1 change: 1 addition & 0 deletions cypress/e2e/boardFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

import { randUser } from '../utils/index.js'

const user = randUser()
Expand Down
45 changes: 23 additions & 22 deletions cypress/e2e/cardActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

import { randUser } from '../utils/index.js'
import { sampleBoard } from '../utils/sampleBoard'
import { sampleBoard } from '../utils/sampleBoard.js'

const user = randUser()
const boardData = sampleBoard()
Expand All @@ -13,7 +14,7 @@ const auth = {
password: user.password,
}

const useModal = (useModal) => {
function useModal(useModal) {
return cy.request({
method: 'POST',
url: `${Cypress.expose('baseUrl')}/ocs/v2.php/apps/deck/api/v1.0/config/cardDetailsInModal?format=json`,
Expand All @@ -24,9 +25,9 @@ const useModal = (useModal) => {
})
}

describe('Card actions', function () {
describe('Card actions', function() {
let boardId
before(function () {
before(function() {
cy.createUser(user)
cy.login(user)
cy.createExampleBoard({
Expand All @@ -37,7 +38,7 @@ describe('Card actions', function () {
})
})

beforeEach(function () {
beforeEach(function() {
cy.login(user)
useModal(false).then(() => {
cy.visit(`/apps/deck/#/board/${boardId}`)
Expand All @@ -54,7 +55,7 @@ describe('Card actions', function () {
}
cy.spy(myAction, 'callback').as('myAction.callback')

cy.window().then(win => {
cy.window().then((win) => {
win.OCA.Deck.registerCardAction(myAction)
})

Expand All @@ -70,7 +71,7 @@ describe('Card actions', function () {
.its('firstCall.args.0')
.as('args')

cy.url().then(url => {
cy.url().then((url) => {
const cardId = url.split('/').pop()
cy.get('@args').should('have.property', 'name', 'Hello world')
cy.get('@args').should('have.property', 'stackname', 'TestList')
Expand All @@ -85,20 +86,20 @@ describe('Card actions', function () {
})

it('clone card', () => {
cy.intercept({ method: 'POST', url: '**/apps/deck/**/cards/*/clone' }).as('clone')
cy.get('.card:contains("Hello world")').should('be.visible').click()
cy.get('#app-sidebar-vue')
.find('.ProseMirror h1').contains('Hello world').should('be.visible')
cy.intercept({ method: 'POST', url: '**/apps/deck/**/cards/*/clone' }).as('clone')
cy.get('.card:contains("Hello world")').should('be.visible').click()
cy.get('#app-sidebar-vue')
.find('.ProseMirror h1').contains('Hello world').should('be.visible')

cy.get('.app-sidebar-header .action-item__menutoggle').click()
cy.get('.v-popper__popper button:contains("Move/copy card")').click()
cy.get('.vs__dropdown-toggle span[title="MyTestBoard"]').should('be.visible').click()
cy.get('.vs__dropdown-menu span[title="MyTestBoard"]').should('be.visible').click()
cy.wait(3000) // wait for select component to load stacks
cy.get('[data-cy="select-stack"] .vs__dropdown-toggle').should('be.visible').click()
cy.get('.vs__dropdown-menu span[title="TestList"]').should('be.visible').click()
cy.get('.modal-container button:contains("Copy card")').click()
cy.wait('@clone', { timeout: 7000 })
cy.get('.card:contains("Hello world")').should('have.length', 2)
})
cy.get('.app-sidebar-header .action-item__menutoggle').click()
cy.get('.v-popper__popper button:contains("Move/copy card")').click()
cy.get('.vs__dropdown-toggle span[title="MyTestBoard"]').should('be.visible').click()
cy.get('.vs__dropdown-menu span[title="MyTestBoard"]').should('be.visible').click()
cy.wait(3000) // wait for select component to load stacks
cy.get('[data-cy="select-stack"] .vs__dropdown-toggle').should('be.visible').click()
cy.get('.vs__dropdown-menu span[title="TestList"]').should('be.visible').click()
cy.get('.modal-container button:contains("Copy card")').click()
cy.wait('@clone', { timeout: 7000 })
cy.get('.card:contains("Hello world")').should('have.length', 2)
})
})
27 changes: 6 additions & 21 deletions cypress/e2e/cardColor.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,16 @@
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

import { randUser } from '../utils/index.js'
import { sampleBoard } from '../utils/sampleBoard'
import { sampleBoard } from '../utils/sampleBoard.js'

const user = randUser()
const boardData = sampleBoard()

const auth = {
username: user.userId,
password: user.password,
}

const useModal = (useModal) => {
return cy.request({
method: 'POST',
url: `${Cypress.expose('baseUrl')}/ocs/v2.php/apps/deck/api/v1.0/config/cardDetailsInModal?format=json`,
auth,
body: { value: useModal },
}).then((response) => {
expect(response.status).to.eq(200)
})
}

describe('Card color', function () {
describe('Card color', function() {
let boardId
before(function () {
before(function() {
cy.createUser(user)
cy.login(user)
cy.createExampleBoard({
Expand All @@ -37,11 +22,11 @@ describe('Card color', function () {
})
})

beforeEach(function () {
beforeEach(function() {
cy.login(user)
})

it('Set a color', function () {
it('Set a color', function() {
cy.visit(`/apps/deck/#/board/${boardId}`)

const newCardTitle = 'Card with color'
Expand Down
39 changes: 18 additions & 21 deletions cypress/e2e/cardFeatures.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import { randUser } from '../utils/index.js'
import { sampleBoard } from '../utils/sampleBoard'

import moment from '@nextcloud/moment'
import { randUser } from '../utils/index.js'
import { sampleBoard } from '../utils/sampleBoard.js'

const user = randUser()
const boardData = sampleBoard()
Expand All @@ -14,7 +15,7 @@ const auth = {
password: user.password,
}

const useModal = (useModal) => {
function useModal(useModal) {
return cy.request({
method: 'POST',
url: `${Cypress.expose('baseUrl')}/ocs/v2.php/apps/deck/api/v1.0/config/cardDetailsInModal?format=json`,
Expand All @@ -25,7 +26,7 @@ const useModal = (useModal) => {
})
}

const addCardsAtTop = (enabled) => {
function addCardsAtTop(enabled) {
return cy.request({
method: 'POST',
url: `${Cypress.expose('baseUrl')}/ocs/v2.php/apps/deck/api/v1.0/config/stackAddCardAtTop?format=json`,
Expand All @@ -36,9 +37,9 @@ const addCardsAtTop = (enabled) => {
})
}

describe('Card', function () {
describe('Card', function() {
let boardId
before(function () {
before(function() {
cy.createUser(user)
cy.login(user)
cy.createExampleBoard({
Expand All @@ -49,11 +50,11 @@ describe('Card', function () {
})
})

beforeEach(function () {
beforeEach(function() {
cy.login(user)
})

it('Can add a card', function () {
it('Can add a card', function() {
cy.visit(`/apps/deck/#/board/${boardId}`)
const newCardTitle = 'Write some cypress tests'

Expand Down Expand Up @@ -139,8 +140,8 @@ describe('Card', function () {
})
})

it('Create card from overview', function () {
cy.visit(`/apps/deck/#/`)
it('Create card from overview', function() {
cy.visit('/apps/deck/#/')
const newCardTitle = 'Test create from overview'
cy.intercept({ method: 'POST', url: '**/ocs/v2.php/apps/deck/api/v1.0/cards' }).as('save')
cy.intercept({ method: 'GET', url: '**/apps/deck/boards/*' }).as('getBoard')
Expand Down Expand Up @@ -172,7 +173,7 @@ describe('Card', function () {

it('Card with link reference', () => {
cy.visit(`/apps/deck/#/board/${boardId}`)
const absoluteUrl = `https://example.com`
const absoluteUrl = 'https://example.com'
cy.get('.board .stack').eq(0).within(() => {
cy.get('[data-cy="action:add-card"]')
.first().click()
Expand All @@ -193,7 +194,7 @@ describe('Card', function () {

it('Rename card with link', () => {
cy.visit(`/apps/deck/#/board/${boardId}`)
const absoluteUrl = `https://example.com`
const absoluteUrl = 'https://example.com'
const plainTitle = 'New title'
cy.get('.board .stack').eq(0).within(() => {
cy.get('[data-cy="action:add-card"]')
Expand Down Expand Up @@ -230,18 +231,17 @@ describe('Card', function () {
cy.get('.board').click()
cy.get('.card:contains("Example Domain")')
.should('be.visible')

})

describe('Modal', () => {
beforeEach(function () {
beforeEach(function() {
cy.login(user)
useModal(true).then(() => {
cy.visit(`/apps/deck/#/board/${boardId}`)
})
})

it('Can show card details modal', function () {
it('Can show card details modal', function() {
cy.getNavigationEntry(boardData.title)
.first().click({ force: true })

Expand Down Expand Up @@ -322,7 +322,7 @@ describe('Card', function () {
})

describe('Sidebar', () => {
beforeEach(function () {
beforeEach(function() {
cy.login(user)
useModal(false).then(() => {
cy.visit(`/apps/deck/#/board/${boardId}`)
Expand All @@ -335,7 +335,7 @@ describe('Card', function () {
.find('.ProseMirror h1').contains('Hello world writing more text').should('be.visible')
})

it('Set a due date', function () {
it('Set a due date', function() {
const newCardTitle = 'Card with a due date'

cy.get('[data-cy="action:add-card"]')
Expand All @@ -358,10 +358,8 @@ describe('Card', function () {
const tomorrow = moment().add(1, 'days').hour(8).minutes(0).seconds(0)
cy.get('#card-duedate-picker').should('have.value', tomorrow.format('YYYY-MM-DDTHH:mm'))


cy.get(`.card:contains("${newCardTitle}")`).find('[data-due-state="Now"]').should('be.visible').should('contain', '21 hours')


// Remove the due date again
cy.get('#app-sidebar-vue [data-cy-due-date-actions]').should('be.visible').click()
// tick needed to show the popover menu
Expand All @@ -371,7 +369,7 @@ describe('Card', function () {
cy.get(`.card:contains("${newCardTitle}")`).find('[data-due-state]').should('not.exist')
})

it('Add a label', function () {
it('Add a label', function() {
const newCardTitle = 'Card with labels'

cy.get('[data-cy="action:add-card"]')
Expand Down Expand Up @@ -401,6 +399,5 @@ describe('Card', function () {
cy.get(`.card:contains("${newCardTitle}")`).find('.labels li:contains("Action needed")')
.should('not.exist')
})

})
})
Loading
Loading