diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index 0eb36969a..b3400f3d9 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -26,11 +26,6 @@ jobs: server-versions: [ 'master' ] steps: - - name: Set up custom host for nextcloud - run: | - sudo echo "127.0.0.1 nextcloud.local" | sudo tee -a /etc/hosts - cat /etc/hosts - - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 with: diff --git a/cypress/integration/boardFeatures.js b/cypress/integration/boardFeatures.js index c47fe3730..6f6de322f 100644 --- a/cypress/integration/boardFeatures.js +++ b/cypress/integration/boardFeatures.js @@ -14,11 +14,16 @@ describe('Board', function () { it('Can create a board', function () { let board = 'Test' + + cy.intercept({ + method: 'POST', + url: '/index.php/apps/deck/boards', + }).as('createBoardRequest') // Click "Add board" cy.get('.app-navigation button.app-navigation-toggle').click() cy.get('#app-navigation-vue .app-navigation__list .app-navigation-entry') - .eq(1).find('a').first().click({force: true}) + .eq(3).find('a').first().click({force: true}) // Type the board title cy.get('.board-create form input[type=text]') @@ -27,8 +32,10 @@ describe('Board', function () { // Submit cy.get('.board-create form input[type=submit]') .first().click({force: true}) + + cy.wait('@createBoardRequest').its('response.statusCode').should('equal', 200) cy.get('.app-navigation__list .app-navigation-entry__children .app-navigation-entry') - .first().contains(board).should('be.visible') + .contains(board).should('be.visible') }) }) \ No newline at end of file diff --git a/cypress/integration/cardFeatures.js b/cypress/integration/cardFeatures.js index e8a772ed7..18ddd3e97 100644 --- a/cypress/integration/cardFeatures.js +++ b/cypress/integration/cardFeatures.js @@ -21,7 +21,7 @@ describe('Card', function () { cy.get('.app-navigation button.app-navigation-toggle').click() cy.get('#app-navigation-vue .app-navigation__list .app-navigation-entry') - .eq(1).find('.app-navigation-entry__children .app-navigation-entry a.app-navigation-entry-link') + .eq(3).find('a.app-navigation-entry-link') .first().click({force: true}) cy.get('.board .stack').eq(0).within(() => { diff --git a/cypress/integration/deckDashboard.js b/cypress/integration/deckDashboard.js index 08f98866f..c5155ae6d 100644 --- a/cypress/integration/deckDashboard.js +++ b/cypress/integration/deckDashboard.js @@ -18,12 +18,16 @@ describe('Deck dashboard', function() { .should('have.text', 'Upcoming cards') }) - /* it('Can see the default "Personal Board" created for user by default', function () { - cy.get('.app-navigation button.app-navigation-toggle') - .click() + it('Can see the default "Personal Board" created for user by default', function () { + const defaultBoard = 'Personal' + + cy.get('.app-navigation button.app-navigation-toggle').click() - cy.get('.app-navigation__list .app-navigation-entry__children .app-navigation-entry') + cy.get('.app-navigation__list .app-navigation-entry') + .eq(1) + .find('ul.app-navigation-entry__children li.app-navigation-entry') .first() - .contains('Personal') - }) */ -}) + .contains(defaultBoard) + .should('be.visible') + }) +}) \ No newline at end of file diff --git a/cypress/integration/stackFeatures.js b/cypress/integration/stackFeatures.js index b46a024af..48bac465c 100644 --- a/cypress/integration/stackFeatures.js +++ b/cypress/integration/stackFeatures.js @@ -20,8 +20,8 @@ describe('Stack', function () { cy.get('.app-navigation button.app-navigation-toggle').click() cy.get('#app-navigation-vue .app-navigation__list .app-navigation-entry') - .eq(1) - .find('.app-navigation-entry__children .app-navigation-entry a.app-navigation-entry-link') + .eq(3) + .find('a.app-navigation-entry-link') .first().click({force: true}) cy.get('#stack-add button').first().click() diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 659116859..a1653a63a 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -82,7 +82,7 @@ cy.get('.app-navigation button.app-navigation-toggle').click() cy.get('#app-navigation-vue .app-navigation__list .app-navigation-entry') - .eq(1) + .eq(3) .find('a') .first() .click({force: true}) @@ -100,8 +100,8 @@ cy.get('.app-navigation button.app-navigation-toggle').click() cy.get('#app-navigation-vue .app-navigation__list .app-navigation-entry') - .eq(1) - .find('.app-navigation-entry__children .app-navigation-entry a.app-navigation-entry-link') + .eq(3) + .find('a.app-navigation-entry-link') .first() .click({force: true}) @@ -111,5 +111,4 @@ cy.get('#stack-add form input[type=submit]') .first() .click() - }) - + }) \ No newline at end of file diff --git a/package.json b/package.json index f67215e64..34a8be295 100644 --- a/package.json +++ b/package.json @@ -43,12 +43,16 @@ "@nextcloud/vue": "^5.3.1", "@nextcloud/vue-dashboard": "^2.0.1", "blueimp-md5": "^2.19.0", - "cypress": "^9.5.3", "dompurify": "^2.3.6", "lodash": "^4.17.21", +<<<<<<< HEAD "markdown-it": "^13.0.1", "markdown-it-task-lists": "^2.1.1", +======= + "markdown-it": "^13.0.0", +>>>>>>> ea1ccdb2 (fix: cypress issues) "markdown-it-link-attributes": "^4.0.0", + "markdown-it-task-lists": "^2.1.1", "moment": "^2.29.3", "nextcloud-vue-collections": "^0.10.0", "p-queue": "^6.6.2", @@ -78,7 +82,12 @@ "@nextcloud/webpack-vue-config": "^5.1.0", "@relative-ci/agent": "^3.1.3", "@vue/test-utils": "^1.3.0", +<<<<<<< HEAD "jest": "^28.1.0", +======= + "cypress": "^9.6.0", + "jest": "^27.5.1", +>>>>>>> ea1ccdb2 (fix: cypress issues) "jest-serializer-vue": "^2.0.2", "node-polyfill-webpack-plugin": "^1.1.4", "postcss-html": "^1.4.1",