Skip to content
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

Add basic test cases for dev tool console #1204

Merged
merged 2 commits into from
Apr 5, 2024

Conversation

zhongnansu
Copy link
Member

@zhongnansu zhongnansu commented Apr 5, 2024

Description

Migrate from existing Selenium test cases in OSD core to functional test repo.

See below for the success results of running console test suites.

yarn cypress run --spec "cypress/integration/core-opensearch-dashboards/opensearch-dashboards/console-plugin/*.js"
yarn run v1.22.19
$ /Users/szhongna/Projects/opensearch-dashboards-functional-test/node_modules/.bin/cypress run --spec 'cypress/integration/core-opensearch-dashboards/opensearch-dashboards/console-plugin/*.js'
[41168:0404/174845.137004:ERROR:node_bindings.cc(276)] Most NODE_OPTIONs are not supported in packaged apps. See documentation for more details.
Couldn't determine Mocha version

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

  (Run Starting)

  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ Cypress:        9.5.4                                                                          │
  │ Browser:        Electron 94 (headless)                                                         │
  │ Node Version:   v14.19.1 (/Users/szhongna/.nvm/versions/node/v14.19.1/bin/node)                │
  │ Specs:          1 found (core-opensearch-dashboards/opensearch-dashboards/console-plugin/conso │
  │                 le.spec.js)                                                                    │
  │ Searched:       cypress/integration/core-opensearch-dashboards/opensearch-dashboards/console-p │
  │                 lugin/*.js                                                                     │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘


────────────────────────────────────────────────────────────────────────────────────────────────────
                                                                                                    
  Running:  core-opensearch-dashboards/opensearch-dashboards/console-plugin/cons            (1 of 1)
            ole.spec.js                                                                             
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db

Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
Couldn't determine Mocha version


  console app
    ✓ should show the default request (8116ms)
    ✓ default request response should include `"timed_out" : false`
    ✓ settings should allow changing the text size
    ✓ should resize the editor


  4 passing (18s)


  (Results)

  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ Tests:        4                                                                                │
  │ Passing:      4                                                                                │
  │ Failing:      0                                                                                │
  │ Pending:      0                                                                                │
  │ Skipped:      0                                                                                │
  │ Screenshots:  0                                                                                │
  │ Video:        true                                                                             │
  │ Duration:     18 seconds                                                                       │
  │ Spec Ran:     core-opensearch-dashboards/opensearch-dashboards/console-plugin/console.spec.js  │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘


  (Video)

  -  Started processing:  Compressing to 32 CRF                                                     
  -  Finished processing: /Users/szhongna/Projects/opensearch-dashboards-functional-t    (2 seconds)
                          est/cypress/videos/core-opensearch-dashboards/opensearch-da               
                          shboards/console-plugin/console.spec.js.mp4                               


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

  (Run Finished)


       Spec                                              Tests  Passing  Failing  Pending  Skipped  
  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ ✔  core-opensearch-dashboards/opensear      00:18        4        4        -        -        - │
  │    ch-dashboards/console-plugin/consol                                                         │
  │    e.spec.js                                                                                   │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘
    ✔  All specs passed!                        00:18        4        4        -        -        -  

···

Issues Resolved

partially resolve https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/test/functional/apps/console/_console.ts

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Zhongnan Su <szhongna@amazon.com>
@zhongnansu zhongnansu changed the title Add basic test cases for console plugin Add basic test cases for dev tool console Apr 5, 2024
@zhongnansu zhongnansu marked this pull request as ready for review April 5, 2024 00:58
Signed-off-by: Zhongnan Su <szhongna@amazon.com>
@CCongWang CCongWang merged commit aa41ad4 into opensearch-project:main Apr 5, 2024
38 of 41 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 5, 2024
* Add basic test cases for console plugin

Signed-off-by: Zhongnan Su <szhongna@amazon.com>

* fix typo

Signed-off-by: Zhongnan Su <szhongna@amazon.com>

---------

Signed-off-by: Zhongnan Su <szhongna@amazon.com>
(cherry picked from commit aa41ad4)
kavilla pushed a commit that referenced this pull request Apr 8, 2024
* Add basic test cases for console plugin

Signed-off-by: Zhongnan Su <szhongna@amazon.com>

* fix typo

Signed-off-by: Zhongnan Su <szhongna@amazon.com>

---------

Signed-off-by: Zhongnan Su <szhongna@amazon.com>
(cherry picked from commit aa41ad4)

Co-authored-by: Zhongnan Su <szhongna@amazon.com>
LDrago27 pushed a commit to LDrago27/opensearch-dashboards-functional-test that referenced this pull request May 3, 2024
* Add basic test cases for console plugin

Signed-off-by: Zhongnan Su <szhongna@amazon.com>

* fix typo

Signed-off-by: Zhongnan Su <szhongna@amazon.com>

---------

Signed-off-by: Zhongnan Su <szhongna@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants