-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: [TERR-361] E2E tests for map edge coloration #44
Merged
jkafader-esnet
merged 37 commits into
end-to-end-tests
from
feat/TERR-361-e2e-tests-for-map-edge-coloration
Aug 23, 2024
Merged
test: [TERR-361] E2E tests for map edge coloration #44
jkafader-esnet
merged 37 commits into
end-to-end-tests
from
feat/TERR-361-e2e-tests-for-map-edge-coloration
Aug 23, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- added marcusolsson-csv-datasource to services.grafana.environment in docker-compose.yaml - updated auth.setup and plugin.spec to test in two diffent cases: before and after Grafana 10 - updated config.info.getHostInfo to detect version of grafana via Health API and to be async function - updated usage of above globally to use await/async - added fileId to e2e.config for google file - removed some unused assigned variables - added interfaces for Topology.interface, TopologyEdge.interface, and TopologyNode.interface
- removed deprecated version line from docker-compose.yaml - added sleep line to test target in Makefile to allow for container spin-up - simplified config.info.getGoogleSheetInfo fn to only fetch data flows URL - added topologySheetUrl to e2e.config - refactored folderDashboardInit to defer to existing dashboard if found - added code to add in topology via API in folderDashboardInit.getFolderDashboardTargets - added interfaces to help better match against Dashboard and DataSource JSON schema - added mock.panel.json for mock panel - added makeDashboard fn to create a default dashboard - added fetches to get topology from e2e.config specified URL - removed Panel.interface
- removed unneeded import for IDataSource - refactored initCSVDatasource fn out of folderDashboardInit module into grafana-api module as fn createDatasource - fixed population of panel data into dashboard object structure to agree with requirements of Grafana API updateDashboard - updated mock.panel.json to contain layer options in order to agree with NetworkMapPanel schema requirements - fixed missing title ref in plugin.spec test for load plugin edit page - view options
…workmap-panel into feat/TERR-362-e2e-upon-empty-grafana-instance
…workMapPanelUrl in plugin.spec module
…b.com:esnet/grafana-esnet-networkmap-panel into feat/TERR-364-ci-github-actions-integration
- updated YAML docker-compose to use infinity datasource grafana plugin - reconfigured config.info.getGoogleSheetInfo fn to delegate all URL computation to e2e config - refactored e2e.config fileId out and replaced with flowSheetUrl prop - refactored folderDashboardInit.getFolderDashboardTargets to utilize infinity datasource plugin and reconfigure type to TSV and data flow URL. - simplified use of getGoogleSheetInfo in grafana-api.createDatasource - updated mock.panel and networkMapPanel JSON to use infinity plugin instead of CSV data source. - added ITarget interface to plugin-def - updated INetworkMapPanel interface to use a Partial<IDataSource> interface for datasource prop - added props url and queryType in object parameter when invoking getFolderDashboardTargets. - added props url and queryType to INetworkPanelParams
- added env artifacts under .config to gitignore - added network information, mitmproxy as transparent proxy and gateway - mitmproxy response header injection for CORS - updated makefile for clean and compose targets - refactored config.info.getHostInfo fn module to simplfy port finding - updated endpoints in e2e.config to use Google provided published URLs for topology and traffic flow in TSV format - refactored response processsing in options.targets param to pluginTest.use - added IHostPost interface - refactored response processing in of MapCanvas.component's maybeFetchOptions fn to support forwarding via location response header.
- added vscode files *.code-workspace to git ignore - added ui:compose target to Makefile - refactored default dashboard.json - fixed missing await keyword use in auth.setup - fixed credentials calculation by utilizing Buffer - added flowSheets definition to the e2e.config - updated folderDashboardInit to use Infinity data source by default - refactored getFolderDashboardTargets fn in module folderDashboardInit to process thorugh flow sheets specified in e2eConfig - added removeExistingDatasources fn in module folderDashboardInit to help maintain clear slate state when resetting tests - refactored createDatasource fn in grafana-api module to allow specify of datasource name. - added deleteDatasource fn in grafana-api module - added deleteDashboard fn in grafana-api module - refactored mock.panel to better align with default dashboard values when set from grafana UI. - added IQuery interface to plugin-def module - refactored ITarget and IPanel interfaces, PluginTest and PluginTestOptions types in plugin-def module - refactored DEFAULT_DATASOURCE_NAME into plugin-def module, away from grafana-api - added field type specifier constants in plugin-def module - extended test edge coloration on default load tests, to support reading of default color of SVG strokes, utilizing elements to fetch config remote URL with 'normal' topology, enable partial flows, and tests drivien by flow sheet configuration in e2econfig.config.json - added IFixtures and refactored PanelParams interfaces - added Threshold interface to help support future threshold color detection - added untypedFn module to allow invoking page.waitForEvent using custom name - added BasicColorMatcher object for RegEx matching - refactored MapPanel to export mapPanelWithTheme and enable access to v18n - expanded MapPanelProps interface to add theme to MapPanel as React component props - added IColumn and IFlowSheet interfaces to types.ts - fixed typo in jsonResponseHandler in MapCanvas.maybeFetchOptions class fn - some code formatting in MapCanvas - added check for thresholds in MapCanvas.updateMapOptions to dispatch threshold change event (to help support future emit callback for edge color coloration changes via Grafana color picker component. - removed some uneeded extra spacing - added withTheme wrapper function to support use of component with access to theme via HOC - added vizTheme as parseData fn argument - removed fixColor helper function in parseData exported fn from dataParser module. - replaced invocations of fixColor with vizTheme.getColorByName in dataParser module - fixed formatting of dataFrames.forEach call in dataParser module - added checks on matchAZData and matchZAData lengths in mapJson.edges.forEach calls in parseData fn in dataParser module - added reverseStr helper function to utils module for tests (not src)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds E2E tests for testing Map Edge Coloration. It is limited to testing coloration for the default color upon panel loading as well as enabling or disabling any one or enabling all of the queries.
Implementation Notes
thresholdsChanged
that is not being detected by code within Playwright'spage.waitForFunction
callback. (That test is implemented, but skipped).updateMapOptions
.Checklist
type: [TERR-XXX] Short description
type
is one of: 'build', 'ci', 'chore', 'docs', 'feat', 'fix', 'perf', 'refactor', 'revert', 'style', 'test'MYESP-XXX
refers to a Jira issue.