Skip to content

Commit

Permalink
Adding code summary to the repo (opensearch-project#287)
Browse files Browse the repository at this point in the history
* adding panel tests in workflows

Signed-off-by: Shenoy Pratik <[email protected]>

* adding cypress tests doc

Signed-off-by: Shenoy Pratik <[email protected]>

* added table in readme, changed doc link

Signed-off-by: Shenoy Pratik <[email protected]>

* added more doc and changed BWC link

Signed-off-by: Shenoy Pratik <[email protected]>

* added variables for hyperlinks

Signed-off-by: Shenoy Pratik <[email protected]>

* added badge for plugin IT tests

Signed-off-by: Shenoy Pratik <[email protected]>

* fixing typos, removed duplicate lines

Signed-off-by: Shenoy Pratik <[email protected]>

* moved TA up similar to side nav

Signed-off-by: Shenoy Pratik <[email protected]>

* alt text name change

Signed-off-by: Shenoy Pratik <[email protected]>
  • Loading branch information
ps48 authored Dec 6, 2021
1 parent 849be7c commit 66fae8c
Show file tree
Hide file tree
Showing 2 changed files with 156 additions and 11 deletions.
145 changes: 145 additions & 0 deletions .cypress/CYPRESS_TESTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
# Observability Cypress Test Cases
The observability plugin currently has 4 modules in it. Each of the modules have their own cypress tests [here](./integration).

## 1. Event Analytics

### Home

* Query Search
* Type query in search bar then click ‘refresh’ button on date range picker to search would redirect user to explorer page, and display searching results in that page
* Click ‘refresh’ button directly without having a query in search bar would redirect user to explorer page with a new empty tab
* Actions - Event Explorer
* Click ‘Event explorer’ in the dropdown list of actions would redirect user to explorer page
* Actions - Delete
* Check saved queries and(or) saved visualizations then click delete in dropdown list of actions is expected to delete selected saved objects’
* Actions - Add Samples
* Click ‘add samples’ in the dropdown list of actions is expected to add 9 sample saved queries and visualizations, the newly added samples is expected to shop up in Queries and Visualizations table

### Explorer

* Add new tabs

* Click ’add new‘ button is expected to add top level tabs
* Redirections from clicking history links is expected to
* create new tab if there’s already tab with searched data
* populate the the first empty tab
* Redirections from clicking ‘new query’ in home page would always create new tab

* Close tabs

* Close unselected tab should close that tab only, and not change the current selected tab
* Click ‘add new’ to add new tabs and click on any tab before the last created tab, then close that tab. It is expected to close the current tab properly, and newly selected tab is expected to be one tab before it if there’s any existing tabs or the immediate tab comes after the deleted one
* It is expected to be not able to close a tab when there’s only one tab left, and user will be prompt with a toast message

* Query Saving

* Saves a query on event tab of explorer page is expected to create a new saved query. The user should see this new saved query in Queries and Visualizations table.
* Saves a visualization on visualization tab of explorer page is expected to create a new saved visualization. The user should see this new saved Visualization Queries and Visualizations table on event home should display this new saved visualization
* Saves a visualization to existing panels
* Sidebar
* Search fields
* Toggle fields between selected and available fields categories
* Override timestamp
* Click on a timestamp field to override timestamp is expected to create a new saved, default timestamp for this index
* Count distribution
* Change time interval
* Display event counts
* Visualization tab
* Switch visualizations from dropdown list
* Data Grid
* Expand/collapse a data entry

## 2. Custom panels

### Home Table

* Check panel name validity
* Create and open a new panel
* Duplicate and rename a panel
* Search an existing panel
* Delete panels

### Create Visualization

* Create two visualizations in events explorer

### Panel View

* Move to test panel
* Duplicate using panel action
* Rename using panel action
* Change date filter
* Add existing visualizations
* Add ppl filter to the panel
* Drag and Drop Visualization in edit mode
* Resize a Visualization in edit mode
* Delete a Visualization in edit mode
* Duplicate a Visualization
* Replace a Visualization
* Create a new Visualization and directly add to an existing panel
* Edit a Visualization and check the change in panels

### Clean Up

* Add Samples
* Verify sample visualization names in sample panel
* Delete All Visualization from event analytics
* Delete all Panels

## 3. Notebooks

* Displays error toast for invalid notebook name
* Creates a notebook and redirects to the notebook
* Duplicates and renames a notebook
* Searches existing notebooks
* Deletes notebooks
* Create in-context PDF report from notebook
* Create in-context PNG report from notebook
* Create on-demand report definition from context menu
* Goes into a notebook and creates paragraphs
* Renders markdown
* Shows output message
* Renders input only mode
* Renders output only mode
* Duplicates paragraphs
* Adds a visualization paragraph
* Adds a SQL query paragraph
* Adds a PPL query paragraph
* Clears outputs
* Runs all paragraphs
* Adds paragraph to top and bottom
* Moves paragraphs
* Duplicates and renames the notebook
* Deletes paragraphs
* Deletes notebook

## 4. Trace analytics

### Dashboard

* Indexes test data
* Renders empty state
* Renders the dashboard table
* Adds the percentile filters
* Opens latency trend popover
* Redirects to traces table with filter
* Renders service map
* Renders plots

### Service

* Renders empty state
* Renders the services table
* Searches correctly
* Renders service view empty state
* Renders service view
* Renders spans data grid, flyout, filters

### Trace

* Renders empty state
* Renders the traces table
* Searches correctly
* Renders the trace view
* Renders data grid, flyout and filters

Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,17 @@ jobs:
yarn osd bootstrap
# TODO enable unit tests when ready
# - name: Test
# run: |
# cd OpenSearch-Dashboards/plugins/observability
# yarn test --coverage

# - name: Upload coverage
# uses: codecov/codecov-action@v1
# with:
# flags: dashboards-observability
# directory: ./OpenSearch-Dashboards/plugins/dashboards-observability
# token: ${{ secrets.CODECOV_TOKEN }}
- name: Test Panels
run: |
cd OpenSearch-Dashboards/plugins/dashboards-observability
yarn test ./public/components/custom_panels/ --coverage
- name: Upload coverage
uses: codecov/codecov-action@v1
with:
flags: dashboards-observability
directory: ./OpenSearch-Dashboards/plugins/dashboards-observability
token: ${{ secrets.CODECOV_TOKEN }}

# TODO remove hard coded version when observability is ready
- name: Build Artifact
Expand Down

0 comments on commit 66fae8c

Please sign in to comment.