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

feat: rewrite e2e test(rewrite-e2e-test-route-with-scripte-luacode-test) with ginkgo #1570

Conversation

Jaycean
Copy link
Member

@Jaycean Jaycean commented Mar 10, 2021

Please answer these questions before submitting a pull request


New feature or improvement

  • Rewrite e2e test( route-with-scripte-luacode ) with ginkgo

@nic-chen
Copy link
Member

cli test failed.. @Jaycean

@codecov-io
Copy link

codecov-io commented Mar 10, 2021

Codecov Report

Merging #1570 (be0fd2b) into master (afa05e7) will decrease coverage by 1.35%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1570      +/-   ##
==========================================
- Coverage   71.54%   70.18%   -1.36%     
==========================================
  Files         132       46      -86     
  Lines        5341     3019    -2322     
  Branches      584        0     -584     
==========================================
- Hits         3821     2119    -1702     
+ Misses       1275      655     -620     
  Partials      245      245              
Flag Coverage Δ
backend-e2e-test 60.74% <ø> (-0.07%) ⬇️
backend-e2e-test-ginkgo 46.27% <ø> (+1.85%) ⬆️
backend-unit-test 51.54% <ø> (ø)
frontend-e2e-test ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
api/internal/core/storage/etcd.go 43.63% <0.00%> (-1.82%) ⬇️
...c/pages/Route/components/ResultView/ResultView.tsx
.../components/PluginOrchestration/DrawPluginStyle.ts
web/src/pages/Setting/Setting.tsx
web/src/pages/Service/components/Preview.tsx
web/src/components/IconFont/IconFont.tsx
web/src/pages/User/Login.tsx
web/src/pages/Upstream/Create.tsx
web/src/components/Upstream/UpstreamForm.tsx
web/src/pages/PluginTemplate/service.ts
... and 77 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update afa05e7...be0fd2b. Read the comment docs.

@Jaycean Jaycean force-pushed the rewrite-e2e-test-route-with-scripte-luacoe-test-with-ginkgo branch from be6ac94 to 55fd1a4 Compare March 10, 2021 14:11
@Jaycean
Copy link
Member Author

Jaycean commented Mar 10, 2021

cc @juzhiyuan @guoqqqi FE CI failed. PTAL
https://github.com/apache/apisix-dashboard/pull/1570/checks?check_run_id=2077434026

@guoqqqi
Copy link
Member

guoqqqi commented Mar 10, 2021

cc @juzhiyuan @guoqqqi FE CI failed. PTAL
https://github.com/apache/apisix-dashboard/pull/1570/checks?check_run_id=2077434026

The error is due to the element being fetched before the data has finished loading, creating a separation from the element after the data has finished loading.
You can add cy.contains('Custom').should('be.visible');after line 43 of web/cypress/integration/pluginTemplate/create-plugin-template-with-route.spec.js Resolve the error.
If I have something wrong, please help me to point out the correction. 😊

@nic-chen nic-chen requested review from starsz and nic-chen March 11, 2021 04:42
@nic-chen
Copy link
Member

wait for CI

}),
)
ginkgo.It("verify the log generated by script set in Step-4 above", func() {
t := ginkgo.GinkgoT()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can reuse the ginkgo.GinkgoT().
So we can put it in front.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Jaycean could we put ginkgo.GinkgoT() in front, all test cases use a t ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nic-chen
Not all test cases use t, which is usually used table.entry we don't need to use t.
But at present, t is used in many places.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean you can put it in front.
So line 142 and line 327 can merge into one.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done. Thks.

@Jaycean Jaycean mentioned this pull request Mar 11, 2021
4 tasks
@Jaycean Jaycean force-pushed the rewrite-e2e-test-route-with-scripte-luacoe-test-with-ginkgo branch from f2221d5 to 6d54f94 Compare March 12, 2021 03:26
@nic-chen nic-chen merged commit 48e66cd into apache:master Mar 12, 2021
@nic-chen
Copy link
Member

Thanks! @Jaycean

@Jaycean Jaycean deleted the rewrite-e2e-test-route-with-scripte-luacoe-test-with-ginkgo branch March 18, 2021 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants