diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 3ae530e2fa0cb..634c71a0df754 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,76 +1,2 @@ # For most projects, this workflow file will not need changing; you simply need # to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -name: "CodeQL scanning - action" - -on: - push: - branches: [master] - pull_request: - # The branches below must be a subset of the branches above - branches: [master] - schedule: - - cron: '0 22 * * 3' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - # Override automatic language detection by changing the below list - # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] - language: ['cpp', 'javascript'] - # Learn more... - # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - # We must fetch at least the immediate parents so that if this is - # a pull request then we can checkout the head. - fetch-depth: 2 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - config-file: ./.github/codeql/codeql-config.yml - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - - if: matrix.language == 'cpp' - name: Install dependencies - run: | - sudo sh -c "echo deb-src http://archive.ubuntu.com/ubuntu/ noble main restricted >> /etc/apt/sources.list" - sudo sh -c "echo deb-src http://archive.ubuntu.com/ubuntu/ noble-updates main restricted >> /etc/apt/sources.list" - sudo sh -c "echo deb-src http://security.ubuntu.com/ubuntu/ noble-security main restricted >> /etc/apt/sources.list" - sudo sh -c "echo deb-src http://security.ubuntu.com/ubuntu/ noble-security universe >> /etc/apt/sources.list" - sudo sh -c "echo deb-src http://security.ubuntu.com/ubuntu/ noble-security multiverse >> /etc/apt/sources.list" - sudo apt-get update - sudo apt install -y libunwind-dev - sudo apt-get install -y build-essential git libpoco-dev libcap-dev python3-polib npm libpng-dev python3-lxml libpam-dev libzstd-dev libssl-dev libcppunit-dev - - - if: matrix.language == 'cpp' - name: Configure - run: | - cd .. && wget https://github.com/CollaboraOnline/online/releases/download/for-code-assets/core-co-24.04-assets.tar.gz - tar xvf core-co-24.04-assets.tar.gz && rm core-co-24.04-assets.tar.gz && export LOCOREPATH=$(pwd) - cd online && ./autogen.sh - ./configure --enable-silent-rules --with-lokit-path=${LOCOREPATH}/include --with-lo-path=${LOCOREPATH}/instdir --enable-debug - cd browser && npm update - - - if: matrix.language == 'cpp' - name: Build - run: make -j `nproc` build-nocheck - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 diff --git a/cypress_test/integration_tests/desktop/calc/annotation_spec.js b/cypress_test/integration_tests/desktop/calc/annotation_spec.js index f0c15425d26a7..7a0ae47ba1155 100644 --- a/cypress_test/integration_tests/desktop/calc/annotation_spec.js +++ b/cypress_test/integration_tests/desktop/calc/annotation_spec.js @@ -47,6 +47,27 @@ describe(['tagdesktop'], 'Annotation Tests', function() { cy.cGet('#comment-container-1').should('exist'); }); + it('Modify and Save using shortcut Ctrl+Enter', function() { + // Given an open comment edit dialog + desktopHelper.insertComment(); + cy.cGet('#comment-container-1').should('exist'); + cy.cGet('#comment-container-1').then(function (element) { + element[0].style.visibility = ''; + element[0].style.display = ''; + }); + cy.cGet('#comment-container-1').trigger('mouseover'); + cy.cGet('#annotation-content-area-1').should('contain','some text'); + cy.cGet('#comment-annotation-menu-1').click(); + cy.cGet('body').contains('.context-menu-item','Modify').click(); + cy.cGet('#annotation-modify-textarea-1').type('some other text, '); + + // When Ctrl+Enter is hit + cy.cGet('annotation-modify-textarea-1').type('{ctrl}{enter}'); + + // Then, the dialog is closed and the comment content should be updated + cy.cGet('#comment-container-1').should('not.exist'); + }); + it('Reply should not be possible', function() { desktopHelper.insertComment(); diff --git a/cypress_test/integration_tests/desktop/writer/annotation_spec.js b/cypress_test/integration_tests/desktop/writer/annotation_spec.js index a3fc5da1fc03d..9932611ac11d7 100644 --- a/cypress_test/integration_tests/desktop/writer/annotation_spec.js +++ b/cypress_test/integration_tests/desktop/writer/annotation_spec.js @@ -34,6 +34,23 @@ describe(['tagdesktop'], 'Annotation Tests', function() { cy.cGet('#annotation-content-area-1').should('contain','some text0, some other text'); }); + it('Modify and Save using shortcut Ctrl+Enter', function() { + // Given an open comment edit dialog + desktopHelper.insertComment(); + cy.cGet('.cool-annotation-content-wrapper').should('exist'); + cy.cGet('#annotation-content-area-1').should('contain','some text0'); + cy.cGet('#comment-annotation-menu-1').click(); + cy.cGet('body').contains('.context-menu-item', 'Modify').click(); + cy.cGet('#annotation-modify-textarea-1').type('some other text, '); + + // When Ctrl+Enter is hit + cy.cGet('annotation-modify-textarea-1').type('{ctrl}{enter}'); + + // Then, the dialog is closed and the comment content is updated + cy.cGet('.cool-annotation-content-wrapper').should('not.exist'); + cy.cGet('#annotation-content-area-1').should('contain','some other text, some text0'); + }); + it('Reply', function() { desktopHelper.insertComment();