diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 6d88e9e..2d63b6b 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -4,7 +4,7 @@ on: push jobs: publish: - if: github.ref == 'refs/heads/7.x' + if: github.ref == 'refs/heads/main' runs-on: ubuntu-latest steps: - name: Checkout @@ -25,6 +25,11 @@ jobs: with: token: ${{ secrets.NPM_TOKEN }} access: "public" + - name: Build Changelog + id: github_release + uses: mikepenz/release-changelog-builder-action@v3 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Create Release if: steps.publish.outputs.type != 'none' id: create_release @@ -34,6 +39,6 @@ jobs: with: tag_name: ${{ steps.publish.outputs.version }} release_name: Release ${{ steps.publish.outputs.version }} - body: ${{ steps.publish.outputs.version }} + body: ${{ steps.build_changelog.outputs.changelog }} draft: false prerelease: false \ No newline at end of file diff --git a/cypress/support/CHANGELOG.md b/cypress/support/CHANGELOG.md index 72d9c2f..4671f51 100644 --- a/cypress/support/CHANGELOG.md +++ b/cypress/support/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. +## [8.0.0] - 07.12.2023 + +### Breaking changes +- Replaced URIEncoding in `typeAndCheckSearchField` command with Vue3 compatible encoding + ## [7.0.6] - 16.11.2023 ### Changed diff --git a/cypress/support/commands/commands.js b/cypress/support/commands/commands.js index 7dd248f..6d55104 100644 --- a/cypress/support/commands/commands.js +++ b/cypress/support/commands/commands.js @@ -27,6 +27,37 @@ require("cypress-file-upload"); const { v4: uuid } = require('uuid'); +function vue3RouterEncodeUrl(url) { + /** + * Reference: https://github.com/vuejs/router/blob/main/packages/router/src/encoding.ts + */ + + const HASH_RE = /#/g // %23 + const AMPERSAND_RE = /&/g // %26 + const PLUS_RE = /\+/g // %2B + const ENC_BRACKET_OPEN_RE = /%5B/g // [ + const ENC_BRACKET_CLOSE_RE = /%5D/g // ] + const ENC_CARET_RE = /%5E/g // ^ + const ENC_BACKTICK_RE = /%60/g // ` + const ENC_CURLY_OPEN_RE = /%7B/g // { + const ENC_PIPE_RE = /%7C/g // | + const ENC_CURLY_CLOSE_RE = /%7D/g // } + const ENC_SPACE_RE = /%20/g // } + + return encodeURI(url) + .replace(ENC_PIPE_RE, '|') + .replace(ENC_BRACKET_OPEN_RE, '[') + .replace(ENC_BRACKET_CLOSE_RE, ']') + .replace(PLUS_RE, '%2B') + .replace(ENC_SPACE_RE, '+') + .replace(HASH_RE, '%23') + .replace(AMPERSAND_RE, '%26') + .replace(ENC_BACKTICK_RE, '`') + .replace(ENC_CURLY_OPEN_RE, '{') + .replace(ENC_CURLY_CLOSE_RE, '}') + .replace(ENC_CARET_RE, '^'); +} + /** * Logs in to the Administration manually * @memberOf Cypress.Chainable# @@ -474,7 +505,7 @@ Cypress.Commands.add('typeAndCheckSearchField', { cy.wait('@searchResultCall') .its('response.statusCode').should('equal', 200); - cy.url().should('include', encodeURI(value)); + cy.url().should('include', vue3RouterEncodeUrl(value)); cy.wrap(subject).type('{esc}'); }); diff --git a/package.json b/package.json index 73bef5e..6f949bb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@shopware-ag/e2e-testsuite-platform", - "version": "7.0.6", + "version": "8.0.0", "description": "E2E Testsuite for Shopware 6 using Cypress.js", "keywords": [ "e2e",