Commit Graph

89 Commits

Author SHA1 Message Date
Alex Khomenko
fd239f94e8
TeamSettings: Convert tests to RTL (#50513) 2022-06-10 09:50:53 +02:00
Ashley Harrison
6da4feb2a9
Convert OrgProfile test to RTL (#50525) 2022-06-09 16:07:40 +01:00
Alex Khomenko
ffb8ae4900
TeamPages: Convert tests to RTL (#50429)
* TeamPages: Setup tests

* TeamPages: Finalise tests

* TeamPages: Add missing test
2022-06-08 19:05:27 +03:00
Kevin Yu
8bd56b8226
Chore: convert Cloud Monitoring Aggregation enzyme tests to RTL (#50326) 2022-06-08 10:03:58 +02:00
Zoltán Bedi
aa74371008
Chore: Convert ReferenceLink.test.js to RTL (#50338) 2022-06-07 17:40:04 +02:00
Connor Lindsey
c65d62c95b
Tracing: Fix links to traces in Explore (#50113)
* Tracing: Fix links to traces in Explore

* Fix links in dashboard

* Fix references and tracetimelineviewer tests

* Remove hard-coded references to fix tests

* Add noopener
2022-06-07 07:21:01 -06:00
Joey Tawadrous
d20608ab84
Convert packages/jaeger-ui-components/src/TracePageHeader/TracePageSearchBar.test.js to RTL (#49992)
* Added new selectors

* Added selector to UIFindInput

* Added selectors to TracePageSearchBar

* Convert tests

* Remove next/prev button test ids

* Remove uiFindInput selector

* Remove tracePageSearchBar selector

* Remove tracePageSearchBarSuffix selector

* Update TraceViewContainer test
2022-06-06 16:31:51 +01:00
Ashley Harrison
6fcb2cd307
remove exported test globals from test/lib/common (#50256) 2022-06-06 15:38:37 +01:00
Ashley Harrison
22fbcebabf
Chore: convert DashboardsTable test to RTL (#50252)
* convert DashboardsTable test to RTL

* ensure render does not throw
2022-06-06 15:27:40 +01:00
Marcus Efraimsson
36c3398c6d
Datasource: Remove support for unencrypted passwords (#49987)
* Datasource: Remove support for unencrypted passwords

* regenerate swagger

* [WIP] Remove references to datasource password and basic auth password fields (#50015)

* try delete moar tings

* delete provisioning stuff

* remove from yaml

* update snapshots

* remove lingering snapshot fields

* fix ds http settings

* Re-generate swagger and fix swagger-api-spec make target

Co-authored-by: Will Browne <will.browne@grafana.com>
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2022-06-03 17:38:22 +02:00
Ashley Harrison
0de9808008
Draggable: only set drag handle props on the drag handle itself (#50025) 2022-06-02 13:34:05 +02:00
Joey Tawadrous
6703722278
Updated test (#50041) 2022-06-02 09:47:02 +01:00
Joey Tawadrous
3d26502db1
Convert packages/jaeger-ui-components/src/common/UiFindInput.test.js to RTL (#49994)
* Add selector

* Add test

* Remove snapshot

* Remove uiFindInput selector
2022-06-02 09:46:31 +01:00
Kevin Yu
dca0453c2e
CloudWatch: Add multi-value template variable support for log group names in logs query builder (#49737)
* Add multi-value template variable support for log group names

* add test for multi-value template variable for log group names

* add test
2022-06-01 10:23:31 -07:00
polibb
a19c3dae5a
Convert Enzyme UsersTable test to RTL (#49836)
* Convert Enzyme UsersTable test to RTL

* Fixes on UsersTable test; no additions

* remove snapshot of UsersTable test
2022-05-31 18:58:59 +03:00
Joao Silva
a91ecc566b
Chore: Converts DashboardRow tests to RTL (#49722) 2022-05-31 16:51:44 +01:00
Alex Khomenko
0a48b92d28
TeamMembers: Refactor test to RTL (#49922) 2022-05-31 17:11:12 +03:00
Zoltán Bedi
8e0342bc74
Chore: convert NewWindowIcon test to rtl (#49830) 2022-05-31 14:34:46 +02:00
Alex Khomenko
bfbe856319
TeamMemberRow: Convert tests to RTL (#49875)
* TeamMemberRow: Remove legacy select

* TeamMemberRow: Update attributes

* TeamMemberRow: Refactor tests to RTL
2022-05-31 10:33:27 +02:00
Zoltán Bedi
f87c1b0eb9
Chore: Convert FolderPicker test to rtl (#49838) 2022-05-30 17:36:16 +02:00
kay delaney
bae9a60089
Chore: Convert legacy Input test to RTL (#49713) 2022-05-26 17:10:35 +01:00
Ashley Harrison
a12cdf8283
convert PartialHighlighter test to RTL (#49708) 2022-05-26 17:09:44 +01:00
Ashley Harrison
43249464bb
convert bargauge test to RTL (#49701) 2022-05-26 14:58:01 +01:00
Ashley Harrison
ec65332c82
convert Typeahead test to RTL (#49509) 2022-05-25 16:53:55 +01:00
Ashley Harrison
970c395fb1
Cue: Use BarGauge, DashList and Gauge panel cue schemas (#49580)
* user essentials mob! 🔱

* Wip

* user essentials mob! 🔱

lastFile:public/app/plugins/panel/bargauge/module.tsx

* user essentials mob! 🔱

* update betterer results file

Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
2022-05-25 14:18:21 +01:00
Karl Persson
ef6b53ed23
AccessControl: Pass current org id to UsersTable (#49584)
* Pass current org id to UsersTable

* Mock contextSrv and update snapshot
2022-05-25 13:56:36 +02:00
Piotr Jamróz
f93ad85b08
Chore: Convert a test from enzyme to testing library (#49492) 2022-05-25 12:19:51 +02:00
Alex Khomenko
5557d2e666
TeamList: Convert test to RTL (#49567) 2022-05-25 13:01:40 +03:00
Joao Silva
71ffa5e5db
Chore: Converts SaveDashboardAsForm tests to RTL (#49436) 2022-05-24 10:17:40 +01:00
Joao Silva
51bc1bad1b
Chore: Converts SaveDashboardForm tests to RTL (#49434) 2022-05-23 18:17:25 +01:00
Alex Khomenko
18727f0bf5
TeamGroupSync: Refactor tests to use RTL (#49417) 2022-05-23 16:45:36 +02:00
Piotr Jamróz
060f0e5633
Query History: Results pagination (#49217)
* Load Rich History when the container is opened

* Store rich history for each pane separately

* Do not update currently opened query history when an item is added

It's impossible to figure out if the item should be added or not, because filters are applied in the backend. We don't want to replicate that filtering logic in frontend. One way to make it work could be by refreshing both panes.

* Test starring and deleting query history items when both panes are open

* Remove e2e dependency on ExploreId

* Fix unit test

* Assert exact queries

* Simplify test

* Fix e2e tests

* Fix toolbar a11y

* Reload the history after an item is added

* Fix unit test

* Remove references to Explore from generic PageToolbar component

* Update test name

* Fix test assertion

* Add issue item to TODO

* Improve test assertion

* Simplify test setup

* Move query history settings to persistence layer

* Fix test import

* Fix unit test

* Fix unit test

* Test local storage settings API

* Code formatting

* Fix linting errors

* Add an integration test

* Add missing aria role

* Fix a11y issues

* Fix a11y issues

* Use divs instead of ul/li

Otherwis,e pa11y-ci reports the error below claiming there are no children with role=tab:

Certain ARIA roles must contain particular children
   (https://dequeuniversity.com/rules/axe/4.3/aria-required-children?application=axeAPI)

   (#reactRoot > div > main > div:nth-child(3) > div > div:nth-child(1) > div >
   div:nth-child(1) > div > div > nav > div:nth-child(2) > ul)

   <ul class="css-af3vye" role="tablist"><li class="css-1ciwanz"><a href...</ul>

* Clean up settings tab

* Remove redundant aria label

* Remove redundant container

* Clean up test assertions

* Move filtering to persistence layer

* Move filtering to persistence layer

* Simplify applying filters

* Split applying filters and reloading the history

* Debounce updating filters

* Update tests

* Fix waiting for debounced results

* Clear results when switching tabs

* Improve test coverage

* Update docs

* Revert extra handling for uid (will be added when we introduce remote storage)

* Create basic plan

* Rename query history toggle

* Add list of supported features and add ds name to RichHistoryQuery object

* Clean up

Removed planned items will be addressed in upcoming prs (filtering and pagination)

* Handle data source filters

* Simplify DTO conversion

* Clean up

* Fix betterer conflicts

* Fix imports

* Fix imports

* Post-merge fixes

* Use config instead of a feature flag

* Use config instead of a feature flag

* Update converter tests

* Add tests for RichHistoryRemoteStorage

* Simplify test setup

* Simplify assertion

* Add e2e test for query history

* Remove duplicated entry

* Fix unit tests

* Improve readability

* Remove unnecessary casting

* Mock backend in integration tests

* Remove unnecessary casting

* Fix integration test

* Update betterer results

* Fix unit tests

* Simplify testing with DataSourceSrv

* Fix sorting and add to/from filtering

* Basic pagination

* Show load more only if there are items to load

* Post-merge fixes

* Change initial page limit to 100

* Fix unit tests

* Fix linting errors

* Test pagination

* Fix query migration

* Fix unit tests

* Fix prettier

* Remove full stop

* Do not show number of queries with partial results to avoid confusion

* Show number of displayed results when partial results are shown
2022-05-23 14:43:38 +02:00
svennergr
2949ebc264
Traces: Fixed missing CopyButton on KeyValueTables and overlapping of panels (#49271)
* rewrote `CopyIcon` to an functional component

- fixed missing `CopyIcon` on `KeyValuesTable`

* added fixed height of `30px` to `KeyValuesTable` to fix overlapping

* removed unused CopyIcon snapshot

* KeyValuesTable: moved `30px` height from `tr` to `td` to fix vertical alignment
2022-05-20 20:24:33 +02:00
Alex Khomenko
f1f5f01309
CreateTeam: Refactor test to RTL (#49306) 2022-05-20 13:28:59 +03:00
Chrysa Dikonimaki
7623f6ac64
Convert packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/AccordianText.test.js and packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/TextList.test.js to RTL (#49148)
* convert AccordianText and TestList tests to RTL

* convert AccordianText and TestList tests to RTL

* Update packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/AccordianText.test.js

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>

* Update packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/TextList.test.js

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>

* Update packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/AccordianText.test.js

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>

* fix TextList and AccordianText tests

* remove getrow function

* readd TextList props

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-20 11:02:43 +01:00
Ashley Harrison
b864442717
Gauge: convert tests to RTL (#49251)
* Move logic into utils file, add EXTREMELY basic RTL test

* initialise array with value
2022-05-20 10:51:11 +01:00
Chrysa Dikonimaki
a113fcaca3
Convert packages/jaeger-ui-components/src/TraceTimelineViewer/SpanBarRow.test.js to RTL (#49119)
* convert SpanBarRow tests to RTL

* remove comments

* Update packages/jaeger-ui-components/src/TraceTimelineViewer/SpanBarRow.test.js

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>

* Update packages/jaeger-ui-components/src/TraceTimelineViewer/SpanBarRow.test.js

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>

* fix and replace

* fix last test

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-18 17:18:24 +01:00
Chrysa Dikonimaki
6b4353f890
Convert packages/jaeger-ui-components/src/TraceTimelineViewer/SpanBar.test.js to RTL (#49107)
* convert SpanBar tests to RTL and add testing-library/react dependency

* Update packages/jaeger-ui-components/src/TraceTimelineViewer/SpanBar.test.js

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>

* Update packages/jaeger-ui-components/src/TraceTimelineViewer/SpanBar.test.js

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>

* fix

* use e2e selector everywhere

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-18 13:00:44 +01:00
Ashley Harrison
bddbed4e21
Convert FormField tests to RTL (#49068) 2022-05-17 13:26:48 +01:00
Piotr Jamróz
f252e89339
Query History: Implement RemoteStorage methods: get all, add new (#48330)
* Load Rich History when the container is opened

* Store rich history for each pane separately

* Do not update currently opened query history when an item is added

It's impossible to figure out if the item should be added or not, because filters are applied in the backend. We don't want to replicate that filtering logic in frontend. One way to make it work could be by refreshing both panes.

* Test starring and deleting query history items when both panes are open

* Remove e2e dependency on ExploreId

* Fix unit test

* Assert exact queries

* Simplify test

* Fix e2e tests

* Fix toolbar a11y

* Reload the history after an item is added

* Fix unit test

* Remove references to Explore from generic PageToolbar component

* Update test name

* Fix test assertion

* Add issue item to TODO

* Improve test assertion

* Simplify test setup

* Move query history settings to persistence layer

* Fix test import

* Fix unit test

* Fix unit test

* Test local storage settings API

* Code formatting

* Fix linting errors

* Add an integration test

* Add missing aria role

* Fix a11y issues

* Fix a11y issues

* Use divs instead of ul/li

Otherwis,e pa11y-ci reports the error below claiming there are no children with role=tab:

Certain ARIA roles must contain particular children
   (https://dequeuniversity.com/rules/axe/4.3/aria-required-children?application=axeAPI)

   (#reactRoot > div > main > div:nth-child(3) > div > div:nth-child(1) > div >
   div:nth-child(1) > div > div > nav > div:nth-child(2) > ul)

   <ul class="css-af3vye" role="tablist"><li class="css-1ciwanz"><a href...</ul>

* Clean up settings tab

* Remove redundant aria label

* Remove redundant container

* Clean up test assertions

* Move filtering to persistence layer

* Move filtering to persistence layer

* Simplify applying filters

* Split applying filters and reloading the history

* Debounce updating filters

* Update tests

* Fix waiting for debounced results

* Clear results when switching tabs

* Improve test coverage

* Update docs

* Revert extra handling for uid (will be added when we introduce remote storage)

* Create basic plan

* Rename query history toggle

* Add list of supported features and add ds name to RichHistoryQuery object

* Clean up

Removed planned items will be addressed in upcoming prs (filtering and pagination)

* Handle data source filters

* Simplify DTO conversion

* Clean up

* Fix betterer conflicts

* Fix imports

* Fix imports

* Post-merge fixes

* Use config instead of a feature flag

* Use config instead of a feature flag

* Update converter tests

* Add tests for RichHistoryRemoteStorage

* Simplify test setup

* Simplify assertion

* Add e2e test for query history

* Remove duplicated entry

* Fix unit tests

* Improve readability

* Remove unnecessary casting

* Mock backend in integration tests

* Remove unnecessary casting

* Fix integration test

* Update betterer results

* Fix unit tests

* Simplify testing with DataSourceSrv

* Fix sorting and add to/from filtering

* Simplify testing DataSourceSettings

* Update betterer results

* Ensure previous request is canceled when getting search results

* Add loading message when results are being loaded

* Show info message only if local storage is enabled

* Fix unit test

* Reuse sort order options

* Reuse sort order options

* Fix footer spacing
2022-05-17 12:59:16 +02:00
Ashley Harrison
3b0cd8b6f1
Convert NamedColorsPalette tests to RTL (#49064) 2022-05-17 11:34:15 +01:00
Chrysa Dikonimaki
b33c1bf4fd
Convert packages/grafana-ui/src/components/Logs/LogRows.test.tsx to RTL (#48982)
* convert LogLabels tests toRTL

* convert LogMessageAnsi tests to RTL

* convert LogMessageAnsi to RTL fix

* remove comment from LogMessageAnsi tests

* convert LogRows tests to RTL

* Delete LogRow import
2022-05-17 08:56:14 +01:00
tomxwang
a51c2774b8
convert UsersActionBar tests to RTL (#48737) 2022-05-12 13:16:22 -07:00
Chrysa Dikonimaki
ab91af202c
Convert packages/grafana-ui/src/components/Logs/LogMessageAnsi.test.tsx to RTL (#48918)
* convert LogLabels tests toRTL

* convert LogMessageAnsi tests to RTL

* convert LogMessageAnsi to RTL fix

* remove comment from LogMessageAnsi tests
2022-05-12 13:11:35 -07:00
Chrysa Dikonimaki
7e5ea3f5a0
convert LogLabels tests toRTL (#48887) 2022-05-10 15:53:14 -07:00
Connor Lindsey
c1b5ea3e54
Tracing: Add trace to metrics config behind feature toggle (#46298)
* Add trace to metrics behind feature flag
2022-05-05 14:46:18 -06:00
L-M-K-B
a98fae32fc
Laura/chore/refactor test of secondary actions (#48745)
* Chore: transfer three tests to testing-library

* Chore: transfer last test to testing-library

* chore: add suggestion from code review

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2022-05-05 15:55:59 +02:00
L-M-K-B
83a5ca95c7
Chore: transfer LiveLogs.test to testing-library (#48678)
* Chore: transfer LiveLogs.test to testing-library

* Chore: improve readability and third test

* Chore: improve test and component after code review
2022-05-05 08:40:21 +02:00
Joey Tawadrous
09634b518c
Traces Panel: Add new Traces Panel visualization (#47534)
* Panel

* Support tempo dash variables

* Support tempo explore variables

* Only show span links for explore

* Cleanup

* Added tests

* apply variables to search

* Tests for search variables

* Handling no data

* Interpolation and tests

* TracesPanel tests

* More tests

* Fix for backend test

* Manager integration test fix

* Traces doc and updated visualizations index doc

* Logs for this span

* Search, scrollToTop, other improvements

* Refactor to extract common code

* Removed TopOfViewRefType optional

* Remove topOfViewRef optional

* Removed another optional and fixed tests

* Test

* Only show search bar if trace

* Support traces panel in add to dashboard

* Self review

* Update betterer

* Linter fixes

* Updated traces doc

* Ahh, moved the for more info too

* Updated betterer.results

* Added new icon

* Updated expectedListResp.json
2022-05-03 17:42:36 +01:00
Ashley Harrison
806ea058ed
Chore: convert Slider tests to RTL (#48262)
* convert Slider tests to RTL

* slight update

* don't need to check they're in the document

* Update packages/grafana-ui/src/components/Slider/Slider.test.tsx

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

* check below minimum value as well

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2022-05-03 13:33:30 +01:00