Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Adds Cypress E2E tests and GitHub Action Cypress workflow (from a fork repo) #158

Closed
wants to merge 11 commits into from

Conversation

ftianli-amzn
Copy link

Issue #, if available:

Description of changes:

  1. Adds Cypress E2E tests, which contains the following test cases:
  • Monitor:
    • Create a monitor
    • Update a monitor by changing the name
    • Delete a monitor
    • Search a monitor
    • Add a trigger to the monitor
    • Add an action to the trigger
  • Destination:
    • Create a destination
    • Update a destination by changing the name
    • Delete a destination
    • Search a destination
  • Alert:
    • Alert can be in Active state
    • Alert can be in Acknowledged state
    • Alert can be in Completed state
    • Alert can be in Error state
    • Alert can be in Deleted state
  1. Adds GitHub Action workflow to run E2E tests on pull requests

References of the code changes:

  1. Adds cypress e2e tests and github action cypress workflow index-management-kibana-plugin#80
  2. https://github.com/opendistro-for-elasticsearch/security-kibana-plugin/pull/172

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ftianli-amzn
Copy link
Author

Cypress tests running result:

# ftianli @ MacBook-Pro in ~/Github/kibana-oss/plugins/alerting-kibana-plugin on git:cypress_od1.8 o [20:28:26] 
$ yarn run cypress run                   
yarn run v1.22.4
$ /Users/ftianli/Github/kibana-oss/plugins/alerting-kibana-plugin/node_modules/.bin/cypress run

====================================================================================================

  (Run Starting)

  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ Cypress:    4.8.0                                                                              │
  │ Browser:    Electron 80 (headless)                                                             │
  │ Specs:      3 found (alert_spec.js, destination_spec.js, monitor_spec.js)                      │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘



====================================================================================================

  (Run Finished)


       Spec                                              Tests  Passing  Failing  Pending  Skipped  
  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ ✔  alert_spec.js                            02:36        5        5        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  destination_spec.js                      00:28        4        4        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  monitor_spec.js                          00:45        6        6        -        -        - │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘
    ✔  All specs passed!                        03:49       15       15        -        -        -  

✨  Done in 257.48s.

@ftianli-amzn
Copy link
Author

The workflow failed at Checkout Kibana might be because:

Secrets aren't available to fork PRs.

(actions/checkout#221)

@dbbaughe
Copy link
Contributor

@ftianli-amzn you should be able to create the PR from a temporary branch in the repo itself so it can use the secrets in the repo. Will not work from a fork as of now until the Kibana repo goes public.

@ftianli-amzn
Copy link
Author

@ftianli-amzn you should be able to create the PR from a temporary branch in the repo itself so it can use the secrets in the repo. Will not work from a fork as of now until the Kibana repo goes public.

Thank you for your advice and confirmation! I will test the workflow in this way.

@ftianli-amzn ftianli-amzn changed the title Adds Cypress E2E tests and GitHub Action Cypress workflow Adds Cypress E2E tests and GitHub Action Cypress workflow (from a fork repo) Jun 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants