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

Search: Add e2e tests #3727

Merged
merged 3 commits into from
Oct 5, 2022
Merged

Search: Add e2e tests #3727

merged 3 commits into from
Oct 5, 2022

Conversation

rebeccahum
Copy link
Contributor

@rebeccahum rebeccahum commented Oct 4, 2022

Description

This PR adds the e2e tests via Cypress from upstream. However, there has been several modifications to make it work with vip-go-mu-plugins + VIP Search, so it will definitely not be 1:1.

Next step is to add it to our ci/cd pipeline.

Steps to Test

  1. npm i
  2. npm run search-build
  3. npm run search-env:start
  4. npm run cypress:setup
  5. npm run cypress:run:
  (Run Finished)


       Spec                                              Tests  Passing  Failing  Pending  Skipped
  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ ✔  features/custom-results.spec.js          01:21        2        2        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  features/facets.spec.js                  01:49        2        2        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  features/protected-content.spec.js       01:49        3        3        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  features/related-posts.spec.js           01:32        1        1        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  features/search/search.spec.js           01:14        4        4        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  features/search/synonyms.spec.js         01:39        4        4        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  features/search/weighting.spec.js        01:03        2        2        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  features/terms.spec.js                   02:23        4        4        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  features/woocommerce.spec.js             02:26        5        5        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  general.spec.js                          00:35        2        2        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  indexables/user.spec.js                  02:38        3        3        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  wp-basic.spec.js                         00:40        5        5        -        -        - │
  ├────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ ✔  wp-cli.spec.js                           03:08       19       19        -        -        - │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘
    ✔  All specs passed!                        22:22       56       56        -        -        -

@sjinks
Copy link
Member

sjinks commented Oct 4, 2022

@rebeccahum do we want to run these tests as a part of our CI process?

@rebeccahum
Copy link
Contributor Author

@sjinks Yes, I just wanted to get it in the repo first and then I'll open a PR for the CI process.

@codecov
Copy link

codecov bot commented Oct 5, 2022

Codecov Report

Merging #3727 (e2191a8) into develop (836cbed) will increase coverage by 0.01%.
The diff coverage is n/a.

@@              Coverage Diff              @@
##             develop    #3727      +/-   ##
=============================================
+ Coverage      34.62%   34.64%   +0.01%     
  Complexity      3602     3602              
=============================================
  Files            216      216              
  Lines          13908    13908              
=============================================
+ Hits            4816     4818       +2     
+ Misses          9092     9090       -2     
Impacted Files Coverage Δ
lib/statsd/class-statsd.php 31.37% <0.00%> (+3.92%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

sjinks
sjinks previously approved these changes Oct 5, 2022
sjinks
sjinks previously approved these changes Oct 5, 2022
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 5, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@rebeccahum rebeccahum merged commit 50f4889 into develop Oct 5, 2022
@rebeccahum rebeccahum deleted the search-e2e-tests branch October 5, 2022 15:23
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.

2 participants