Commit Graph

3013 Commits

Author SHA1 Message Date
Koen Vlaswinkel
0ae7bb821d Extract mocking of repo states into method 2022-12-07 16:44:34 +01:00
Koen Vlaswinkel
ba419dd561 Remove duplicate describe 2022-12-07 16:40:15 +01:00
Koen Vlaswinkel
3dd0ef50e0 Merge pull request #1846 from github/koesie10/monitor-multiple-responses-test
Add integration test for variant analysis monitor
2022-12-07 16:38:47 +01:00
Nora
1c1117f7a3 Suggestion: initialize DbManager when newQueryRun is enabled 2022-12-07 16:35:51 +01:00
Koen Vlaswinkel
4e66b62534 Add environment variables for date test
This adds the environment variables necessary for running the date test
in all of these cases:
- When running the npm script outside of VSCode (using `cross-env`)
- When using the Jest Runner "Run" option (`terminal.integrated.env.*`)
- When using the Jest Runner "Debug" option
2022-12-07 16:35:48 +01:00
Nora
572ba290b4 Merge pull request #1838 from github/charis-nora/run-mrva-against-selected-db
Use currently selected remote DB when Variant Analysis is run
2022-12-07 15:05:35 +01:00
Koen Vlaswinkel
63c2932cd9 Add integration test for variant analysis monitor
This integration test will check that the monitor will actually make
multiple requests to the API and that it will trigger a download
extension command for each repo that has finished scanning.
2022-12-07 14:49:32 +01:00
Charis Kyriakou
d97eb2e76b Track expanded state of db items (#1844) 2022-12-07 12:39:18 +00:00
Nora
323862a828 Merge comments 2022-12-07 12:57:10 +01:00
Koen Vlaswinkel
502d4236ad Add tests for removing remote queries and variant analyses
Unfortunately, one of the tests we have for local queries doesn't seem
to be working for variant analyses. I'm not sure why it isn't
working, but I think it's better to get the rest of the integration
tests in and then figure out what's going on with that one.
2022-12-07 12:30:56 +01:00
dependabot[bot]
28652a2088 Bump decode-uri-component from 0.2.0 to 0.2.2 in /extensions/ql-vscode (#1842)
Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2.
- [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases)
- [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2)

---
updated-dependencies:
- dependency-name: decode-uri-component
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-06 17:39:18 +01:00
dependabot[bot]
04b4d15099 Bump @xmldom/xmldom from 0.8.3 to 0.8.6 in /extensions/ql-vscode (#1843)
Bumps [@xmldom/xmldom](https://github.com/xmldom/xmldom) from 0.8.3 to 0.8.6.
- [Release notes](https://github.com/xmldom/xmldom/releases)
- [Changelog](https://github.com/xmldom/xmldom/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xmldom/xmldom/compare/0.8.3...0.8.6)

---
updated-dependencies:
- dependency-name: "@xmldom/xmldom"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-06 17:20:19 +01:00
Shati Patel
7ef75f5971 New DB panel: Add UI command to select database item (#1840) 2022-12-06 16:00:08 +00:00
Koen Vlaswinkel
4bfefb8ebb Merge pull request #1841 from github/koesie10/fix-monitor-await
Fix incorrect await for monitor
2022-12-06 16:30:15 +01:00
Charis Kyriakou
a5fcfe7f40 Add functionality to set the selected db item (#1839) 2022-12-06 15:20:07 +00:00
Nora
7a3d5c1925 Add unit tests 2022-12-06 15:28:14 +01:00
Nora
18c3ce237e Reorder existing tests in new describe blog 2022-12-06 15:25:33 +01:00
Koen Vlaswinkel
6f52469d64 Fix incorrect await for monitor
When rehydrating remote queries, we were awaiting the monitoring
command. Since this command may take minutes to hours to complete, it
seems like this would block the extension from loading. This is the same
issue as in https://github.com/github/vscode-codeql/pull/1698, but for
remote queries instead of variant analyses.
2022-12-06 14:36:00 +01:00
Nora
728f80189b Refactor selection method to allow all types of DbItem lists 2022-12-06 09:41:36 +01:00
Nora
dbba6972e1 Run MRVA against remote DB 2022-12-06 09:41:36 +01:00
Nora
c436688eb2 Merge pull request #1830 from github/nora/selected-db-item
Create method that returns selected DbItem
2022-12-06 09:33:21 +01:00
darkred
127baea584 Update README.md to clarify that vscode-codeql also installs 'Test Adapter Converter' and 'Test Explorer UI' (#1831)
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
2022-12-05 09:10:20 -08:00
Nora
425befa959 Add tests 2022-12-05 17:38:40 +01:00
Nora
1050968db1 Update extensions/ql-vscode/test/pure-tests/databases/db-item-selection.test.ts
Co-authored-by: Charis Kyriakou <charisk@users.noreply.github.com>
2022-12-05 16:57:30 +01:00
Nora
7a2f976199 Refactor selection method to allow all types of DbItem lists 2022-12-05 16:21:35 +01:00
Nora
9362881e22 Rename method on db Manager 2022-12-05 16:21:03 +01:00
Nora
60b1f141a1 Rename and reduce test lines 2022-12-05 16:20:49 +01:00
Koen Vlaswinkel
02c8df003a Fix missing error message on repository selection
The repository selection was structured such that you would get in the
`else` case if there was nothing selected, but this case would also be
used if for some other reason the selected item was not valid.

This restructures the conditions to first check whether the user
cancelled out of the operation and will silently return in that case. In
other cases where it cannot determine the repositories, it will now show
a user-visible error.
2022-12-05 15:17:31 +01:00
Koen Vlaswinkel
b91e31cb2c Merge pull request #1835 from github/koesie10/hide-analyzed-when-failed
Hide analyzed panel when it's empty
2022-12-05 14:51:11 +01:00
Koen Vlaswinkel
272aed7d31 Merge pull request #1836 from github/koesie10/fix-view-jest-config
Fix Jest config for view tests
2022-12-05 14:40:17 +01:00
Koen Vlaswinkel
96850e442f Hide analyzed panel when it's empty
This will hide the "Analyzed" panel when there are no scanned repos and
it's completely empty.

When all three panels are empty, this will also hide the search bar and
filters, and will skip rendering anything for the panels.
2022-12-05 14:06:07 +01:00
Koen Vlaswinkel
a19a3297c5 Fix Jest config for view tests
This will allow running the view tests in `src/view`, rather than
only allowing these tests to be run from the root directory.
2022-12-05 13:59:09 +01:00
Shati Patel
795a0bc46d Minor: make changelog entry more consistent (#1834) 2022-12-05 11:19:08 +00:00
Charis Kyriakou
2967777db1 Track parent list name for db items (#1833) 2022-12-05 10:48:33 +00:00
Koen Vlaswinkel
7bb0d0fda9 Restructure variant analysis manager tests
This restructures the variant analysis manager tests to follow this
pattern:
- Class
  - Method
    - Context
      - Context
        - ...
          - Test

Before, we were only using this pattern for some of the tests and this
made it confusing were which method was being tested.

By splitting this off, it will also be easier to move some of these
tests out of the cli-integration tests and into the no-workspace or
minimal-workspace tests.
2022-12-05 11:16:27 +01:00
Koen Vlaswinkel
0e744fdb5a Merge pull request #1822 from github/koesie10/consistent-query-text-file-commands
Make query text and file commands consistent
2022-12-05 10:46:29 +01:00
Koen Vlaswinkel
39a0ef00c4 Merge pull request #1825 from github/koesie10/add-swift-support
Add basic Swift support
2022-12-05 10:23:33 +01:00
Nora
9110af80d8 Add test 2022-12-05 10:08:04 +01:00
Nora
ee056ce2b3 Create method to expose selected DbItem 2022-12-05 10:08:04 +01:00
Nora
2db4a951c2 Merge pull request #1829 from github/nora/fix-vscode-test-setup
Fix problem running integration tests from VsCode test and debug panel
2022-12-05 09:58:03 +01:00
Koen Vlaswinkel
994ebaacd0 Merge pull request #1827 from github/koesie10/filter-sarif-snippets
Limit SARIF code snippet size
2022-12-02 18:46:19 +01:00
Nora
d00dde06ca Adjust launch.json 2022-12-02 16:36:43 +01:00
Koen Vlaswinkel
402b33830d Add tests for excluded snippets 2022-12-02 16:32:29 +01:00
Koen Vlaswinkel
735372ee72 Implement PR feedback 2022-12-02 16:26:24 +01:00
Koen Vlaswinkel
51d3a018de Add spinner when loading results
This will add a spinner to each repo row when the results for a
particular repo are loading. It will also disable the row to make clear
that it is loading and not clickable.
2022-12-02 16:19:56 +01:00
Koen Vlaswinkel
c0187a5650 Limit SARIF code snippet size
This adds a new filtering on SARIF code snippets for very large code
snippets (defined as 8MB or more). If less than 1% of such a snippet
is highlighted, it will not include the code snippet in the analysed
results, and it will thus not be shown in the UI.

This is to avoid very large SARIF files that can cause the extension
host to crash when the analysis results are send to the UI. I don't
think any of these snippets would ever be useful to show, so it should
be fine to just not include them.
2022-12-02 15:33:44 +01:00
Robert
008d7b363f Merge pull request #1826 from github/robertbrignull/check_status
Check variant analysis status in isVariantAnalysisComplete
2022-12-02 14:23:36 +00:00
Koen Vlaswinkel
c9d6bfd32e Merge pull request #1820 from github/koesie10/export-progress
Add progress notification to exporting results
2022-12-02 14:55:28 +01:00
Koen Vlaswinkel
dc2bb3a6e0 Merge remote-tracking branch 'origin/main' into koesie10/export-progress 2022-12-02 14:25:05 +01:00
Robert
1d4cbde48e Check variant analysis status in isVariantAnalysisComplete 2022-12-02 12:45:52 +00:00