You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/01/19 09:16:04 UTC
[GitHub] [apisix-dashboard] guoqqqi opened a new pull request #1334: test: switch language
guoqqqi opened a new pull request #1334:
URL: https://github.com/apache/apisix-dashboard/pull/1334
Please answer these questions before submitting a pull request
- Why submit this pull request?
- [ ] Bugfix
- [x] New feature provided
- [ ] Improve performance
- [ ] Backport patches
- Related issues
___
### New feature or improvement
- Describe the details and related test reports.
add switch language test
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] juzhiyuan commented on pull request #1334: test: switch language
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on pull request #1334:
URL: https://github.com/apache/apisix-dashboard/pull/1334#issuecomment-764146583

Those commits are not related to Language Switcher, revert them.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] guoqqqi commented on a change in pull request #1334: test: switch language
Posted by GitBox <gi...@apache.org>.
guoqqqi commented on a change in pull request #1334:
URL: https://github.com/apache/apisix-dashboard/pull/1334#discussion_r560805845
##########
File path: web/cypress/integration/route/search-route.spec.js
##########
@@ -89,8 +89,8 @@ context('Create and Search Route', () => {
cy.contains('Route').click();
// search one label
- cy.get('[title=Labels]').click();
cy.wait(500);
Review comment:
yes, we need
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] juzhiyuan merged pull request #1334: test: switch language
Posted by GitBox <gi...@apache.org>.
juzhiyuan merged pull request #1334:
URL: https://github.com/apache/apisix-dashboard/pull/1334
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] juzhiyuan commented on pull request #1334: test: switch language
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on pull request #1334:
URL: https://github.com/apache/apisix-dashboard/pull/1334#issuecomment-764146583

Those commits are not related to Language Switcher, revert them.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] liuxiran commented on a change in pull request #1334: test: switch language
Posted by GitBox <gi...@apache.org>.
liuxiran commented on a change in pull request #1334:
URL: https://github.com/apache/apisix-dashboard/pull/1334#discussion_r560091428
##########
File path: web/cypress/integration/lang/switch-language.spec.js
##########
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/* eslint-disable no-undef */
+
+context('Switch language', () => {
+ const timeout = 1000;
+ const domSelector = {
+ switcher: '.ant-space-align-center',
+ };
+
+ beforeEach(() => {
+ cy.login();
+ });
+
+ it('should switch language', () => {
+ cy.visit('/');
+
+ cy.get(domSelector.switcher).click('right');
+ cy.contains('简体中文').click({
+ timeout,
+ });
+ cy.contains('服务').click();
+
+ cy.get(domSelector.switcher).click('right');
+ cy.contains('English').click({
+ timeout,
+ });
+ cy.contains('Create');
Review comment:
does it need `.should('exist')` here?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] juzhiyuan commented on a change in pull request #1334: test: switch language
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #1334:
URL: https://github.com/apache/apisix-dashboard/pull/1334#discussion_r560807289
##########
File path: web/cypress/integration/route/search-route.spec.js
##########
@@ -89,8 +89,8 @@ context('Create and Search Route', () => {
cy.contains('Route').click();
// search one label
- cy.get('[title=Labels]').click();
cy.wait(500);
+ cy.get('[title=Labels]').click();
Review comment:
not conflicted to add this to `domSelector`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #1334: test: switch language
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1334:
URL: https://github.com/apache/apisix-dashboard/pull/1334#issuecomment-762760524
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=h1) Report
> Merging [#1334](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=desc) (7d67d64) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/749eeb58651c03b1d387d81a1d6f636f7fee93ae?el=desc) (749eeb5) will **increase** coverage by `18.13%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1334 +/- ##
===========================================
+ Coverage 44.36% 62.50% +18.13%
===========================================
Files 31 41 +10
Lines 1961 2352 +391
===========================================
+ Hits 870 1470 +600
+ Misses 979 706 -273
- Partials 112 176 +64
```
| [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [api/internal/core/storage/storage\_mock.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmFnZS9zdG9yYWdlX21vY2suZ28=) | `0.00% <0.00%> (ø)` | |
| [...l/handler/route\_online\_debug/route\_online\_debug.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGVfb25saW5lX2RlYnVnL3JvdXRlX29ubGluZV9kZWJ1Zy5nbw==) | `73.80% <0.00%> (ø)` | |
| [api/internal/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL3JvdXRlLmdv) | `83.87% <0.00%> (ø)` | |
| [api/internal/log/zap.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2xvZy96YXAuZ28=) | `60.86% <0.00%> (ø)` | |
| [api/internal/core/storage/etcd.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmFnZS9ldGNkLmdv) | `42.69% <0.00%> (ø)` | |
| [api/cmd/manager/main.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2NtZC9tYW5hZ2VyL21haW4uZ28=) | `0.00% <0.00%> (ø)` | |
| [api/cmd/managerapi.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2NtZC9tYW5hZ2VyYXBpLmdv) | `77.08% <0.00%> (ø)` | |
| [api/internal/conf/conf.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvbmYvY29uZi5nbw==) | `67.85% <0.00%> (ø)` | |
| [api/internal/log/log.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2xvZy9sb2cuZ28=) | `50.00% <0.00%> (ø)` | |
| [api/internal/handler/healthz/healthz.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvaGVhbHRoei9oZWFsdGh6Lmdv) | `66.66% <0.00%> (ø)` | |
| ... and [23 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=footer). Last update [749eeb5...7d67d64](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #1334: test: switch language
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1334:
URL: https://github.com/apache/apisix-dashboard/pull/1334#issuecomment-762760524
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=h1) Report
> Merging [#1334](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=desc) (2ae9da2) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/749eeb58651c03b1d387d81a1d6f636f7fee93ae?el=desc) (749eeb5) will **not change** coverage.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1334 +/- ##
=======================================
Coverage 44.36% 44.36%
=======================================
Files 31 31
Lines 1961 1961
=======================================
Hits 870 870
Misses 979 979
Partials 112 112
```
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=footer). Last update [749eeb5...2ae9da2](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] liuxiran commented on a change in pull request #1334: test: switch language
Posted by GitBox <gi...@apache.org>.
liuxiran commented on a change in pull request #1334:
URL: https://github.com/apache/apisix-dashboard/pull/1334#discussion_r560091428
##########
File path: web/cypress/integration/lang/switch-language.spec.js
##########
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/* eslint-disable no-undef */
+
+context('Switch language', () => {
+ const timeout = 1000;
+ const domSelector = {
+ switcher: '.ant-space-align-center',
+ };
+
+ beforeEach(() => {
+ cy.login();
+ });
+
+ it('should switch language', () => {
+ cy.visit('/');
+
+ cy.get(domSelector.switcher).click('right');
+ cy.contains('简体中文').click({
+ timeout,
+ });
+ cy.contains('服务').click();
+
+ cy.get(domSelector.switcher).click('right');
+ cy.contains('English').click({
+ timeout,
+ });
+ cy.contains('Create');
Review comment:
~does it need `.should('exist')` here?~
https://docs.cypress.io/guides/getting-started/writing-your-first-test.html#Step-2-Query-for-an-element
sorry, it does not need extra `should` here. resolved
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-io commented on pull request #1334: test: switch language
Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #1334:
URL: https://github.com/apache/apisix-dashboard/pull/1334#issuecomment-762760524
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=h1) Report
> Merging [#1334](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=desc) (74387cc) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/749eeb58651c03b1d387d81a1d6f636f7fee93ae?el=desc) (749eeb5) will **not change** coverage.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1334 +/- ##
=======================================
Coverage 44.36% 44.36%
=======================================
Files 31 31
Lines 1961 1961
=======================================
Hits 870 870
Misses 979 979
Partials 112 112
```
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=footer). Last update [749eeb5...74387cc](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #1334: test: switch language
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1334:
URL: https://github.com/apache/apisix-dashboard/pull/1334#issuecomment-762760524
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=h1) Report
> Merging [#1334](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=desc) (c3c9aab) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/749eeb58651c03b1d387d81a1d6f636f7fee93ae?el=desc) (749eeb5) will **increase** coverage by `4.52%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1334 +/- ##
==========================================
+ Coverage 44.36% 48.89% +4.52%
==========================================
Files 31 41 +10
Lines 1961 2352 +391
==========================================
+ Hits 870 1150 +280
- Misses 979 1009 +30
- Partials 112 193 +81
```
| [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [api/internal/core/store/query.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvcXVlcnkuZ28=) | `0.00% <0.00%> (-88.10%)` | :arrow_down: |
| [api/internal/utils/consts/api\_error.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL2NvbnN0cy9hcGlfZXJyb3IuZ28=) | `17.39% <0.00%> (-78.27%)` | :arrow_down: |
| [api/internal/core/store/selector.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc2VsZWN0b3IuZ28=) | `0.00% <0.00%> (-75.93%)` | :arrow_down: |
| [api/internal/handler/plugin/plugin.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcGx1Z2luL3BsdWdpbi5nbw==) | `16.66% <0.00%> (-53.34%)` | :arrow_down: |
| [api/internal/core/store/validate\_mock.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvdmFsaWRhdGVfbW9jay5nbw==) | `0.00% <0.00%> (-50.00%)` | :arrow_down: |
| [api/internal/filter/authentication.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9hdXRoZW50aWNhdGlvbi5nbw==) | `44.11% <0.00%> (-32.36%)` | :arrow_down: |
| [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=) | `59.37% <0.00%> (-20.63%)` | :arrow_down: |
| [api/internal/handler/handler.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvaGFuZGxlci5nbw==) | `51.85% <0.00%> (-7.41%)` | :arrow_down: |
| [api/internal/core/store/validate.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvdmFsaWRhdGUuZ28=) | `55.36% <0.00%> (-2.26%)` | :arrow_down: |
| [api/cmd/manager/main.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2NtZC9tYW5hZ2VyL21haW4uZ28=) | `0.00% <0.00%> (ø)` | |
| ... and [28 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=footer). Last update [749eeb5...c3c9aab](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] juzhiyuan commented on a change in pull request #1334: test: switch language
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #1334:
URL: https://github.com/apache/apisix-dashboard/pull/1334#discussion_r560059390
##########
File path: web/cypress/integration/lang/switch-language.spec.js
##########
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/* eslint-disable no-undef */
+
+context('Switch language', () => {
+ const timeout = 1000;
+ const domSelectors = {
Review comment:
You have `domSelectors` and `domSelector` in different PRs, we use `domSelector` here.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] juzhiyuan merged pull request #1334: test: switch language
Posted by GitBox <gi...@apache.org>.
juzhiyuan merged pull request #1334:
URL: https://github.com/apache/apisix-dashboard/pull/1334
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] juzhiyuan commented on a change in pull request #1334: test: switch language
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #1334:
URL: https://github.com/apache/apisix-dashboard/pull/1334#discussion_r560059613
##########
File path: web/cypress/integration/lang/switch-language.spec.js
##########
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/* eslint-disable no-undef */
+
+context('Switch language', () => {
+ const timeout = 1000;
+ const domSelectors = {
+ switch: '.ant-space-align-center',
Review comment:
`switcher`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] juzhiyuan commented on a change in pull request #1334: test: switch language
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #1334:
URL: https://github.com/apache/apisix-dashboard/pull/1334#discussion_r560602383
##########
File path: web/cypress/integration/route/search-route.spec.js
##########
@@ -89,8 +89,8 @@ context('Create and Search Route', () => {
cy.contains('Route').click();
// search one label
- cy.get('[title=Labels]').click();
cy.wait(500);
+ cy.get('[title=Labels]').click();
Review comment:
`domeSelector`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #1334: test: switch language
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1334:
URL: https://github.com/apache/apisix-dashboard/pull/1334#issuecomment-762760524
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=h1) Report
> Merging [#1334](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=desc) (c3c9aab) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/749eeb58651c03b1d387d81a1d6f636f7fee93ae?el=desc) (749eeb5) will **increase** coverage by `4.52%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1334 +/- ##
==========================================
+ Coverage 44.36% 48.89% +4.52%
==========================================
Files 31 41 +10
Lines 1961 2352 +391
==========================================
+ Hits 870 1150 +280
- Misses 979 1009 +30
- Partials 112 193 +81
```
| [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [api/internal/core/store/query.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvcXVlcnkuZ28=) | `0.00% <0.00%> (-88.10%)` | :arrow_down: |
| [api/internal/utils/consts/api\_error.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL2NvbnN0cy9hcGlfZXJyb3IuZ28=) | `17.39% <0.00%> (-78.27%)` | :arrow_down: |
| [api/internal/core/store/selector.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc2VsZWN0b3IuZ28=) | `0.00% <0.00%> (-75.93%)` | :arrow_down: |
| [api/internal/handler/plugin/plugin.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcGx1Z2luL3BsdWdpbi5nbw==) | `16.66% <0.00%> (-53.34%)` | :arrow_down: |
| [api/internal/core/store/validate\_mock.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvdmFsaWRhdGVfbW9jay5nbw==) | `0.00% <0.00%> (-50.00%)` | :arrow_down: |
| [api/internal/filter/authentication.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9hdXRoZW50aWNhdGlvbi5nbw==) | `44.11% <0.00%> (-32.36%)` | :arrow_down: |
| [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=) | `59.37% <0.00%> (-20.63%)` | :arrow_down: |
| [api/internal/handler/handler.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvaGFuZGxlci5nbw==) | `51.85% <0.00%> (-7.41%)` | :arrow_down: |
| [api/internal/core/store/validate.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvdmFsaWRhdGUuZ28=) | `55.36% <0.00%> (-2.26%)` | :arrow_down: |
| [api/cmd/manager/main.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2NtZC9tYW5hZ2VyL21haW4uZ28=) | `0.00% <0.00%> (ø)` | |
| ... and [28 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=footer). Last update [749eeb5...c3c9aab](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #1334: test: switch language
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1334:
URL: https://github.com/apache/apisix-dashboard/pull/1334#issuecomment-762760524
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=h1) Report
> Merging [#1334](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=desc) (7d67d64) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/749eeb58651c03b1d387d81a1d6f636f7fee93ae?el=desc) (749eeb5) will **decrease** coverage by `0.09%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1334 +/- ##
==========================================
- Coverage 44.36% 44.26% -0.10%
==========================================
Files 31 32 +1
Lines 1961 1963 +2
==========================================
- Hits 870 869 -1
- Misses 979 982 +3
Partials 112 112
```
| [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=) | `79.37% <0.00%> (-0.63%)` | :arrow_down: |
| [api/cmd/manager/main.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2NtZC9tYW5hZ2VyL21haW4uZ28=) | `0.00% <0.00%> (ø)` | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=footer). Last update [749eeb5...7d67d64](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #1334: test: switch language
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1334:
URL: https://github.com/apache/apisix-dashboard/pull/1334#issuecomment-762760524
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=h1) Report
> Merging [#1334](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=desc) (752c9a6) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/749eeb58651c03b1d387d81a1d6f636f7fee93ae?el=desc) (749eeb5) will **decrease** coverage by `0.04%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1334 +/- ##
==========================================
- Coverage 44.36% 44.31% -0.05%
==========================================
Files 31 32 +1
Lines 1961 1963 +2
==========================================
Hits 870 870
- Misses 979 981 +2
Partials 112 112
```
| [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [api/cmd/manager/main.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2NtZC9tYW5hZ2VyL21haW4uZ28=) | `0.00% <0.00%> (ø)` | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=footer). Last update [749eeb5...752c9a6](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] guoqqqi commented on a change in pull request #1334: test: switch language
Posted by GitBox <gi...@apache.org>.
guoqqqi commented on a change in pull request #1334:
URL: https://github.com/apache/apisix-dashboard/pull/1334#discussion_r560767507
##########
File path: web/cypress/integration/route/search-route.spec.js
##########
@@ -89,8 +89,8 @@ context('Create and Search Route', () => {
cy.contains('Route').click();
// search one label
- cy.get('[title=Labels]').click();
cy.wait(500);
+ cy.get('[title=Labels]').click();
Review comment:
This is a test under route, we will change these specifications in the new PR.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] juzhiyuan commented on a change in pull request #1334: test: switch language
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #1334:
URL: https://github.com/apache/apisix-dashboard/pull/1334#discussion_r560170843
##########
File path: web/cypress/integration/lang/switch-language.spec.js
##########
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/* eslint-disable no-undef */
+
+context('Switch language', () => {
+ const timeout = 1000;
+ const domSelector = {
+ switcher: '.ant-space-align-center',
+ };
+
+ beforeEach(() => {
+ cy.login();
+ });
+
+ it('should switch language', () => {
+ cy.visit('/');
+
+ cy.get(domSelector.switcher).click('right');
+ cy.contains('简体中文').click({
+ timeout,
+ });
+ cy.contains('服务').click();
+
+ cy.get(domSelector.switcher).click('right');
+ cy.contains('English').click({
+ timeout,
+ });
+ cy.contains('Create');
Review comment:
`.should("contain", "TEXT")`?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] juzhiyuan commented on a change in pull request #1334: test: switch language
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #1334:
URL: https://github.com/apache/apisix-dashboard/pull/1334#discussion_r560806321
##########
File path: web/cypress/integration/route/search-route.spec.js
##########
@@ -89,8 +89,8 @@ context('Create and Search Route', () => {
cy.contains('Route').click();
// search one label
- cy.get('[title=Labels]').click();
cy.wait(500);
Review comment:
Why we need?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] juzhiyuan commented on a change in pull request #1334: test: switch language
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #1334:
URL: https://github.com/apache/apisix-dashboard/pull/1334#discussion_r560602544
##########
File path: web/cypress/integration/route/search-route.spec.js
##########
@@ -89,8 +89,8 @@ context('Create and Search Route', () => {
cy.contains('Route').click();
// search one label
- cy.get('[title=Labels]').click();
cy.wait(500);
Review comment:
Do we really need this wait?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] juzhiyuan commented on a change in pull request #1334: test: switch language
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #1334:
URL: https://github.com/apache/apisix-dashboard/pull/1334#discussion_r560171023
##########
File path: web/cypress/integration/lang/switch-language.spec.js
##########
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/* eslint-disable no-undef */
+
+context('Switch language', () => {
+ const timeout = 1000;
+ const domSelector = {
+ switcher: '.ant-space-align-center',
+ };
+
+ beforeEach(() => {
+ cy.login();
+ });
+
+ it('should switch language', () => {
+ cy.visit('/');
+
+ cy.get(domSelector.switcher).click('right');
+ cy.contains('简体中文').click({
+ timeout,
+ });
+ cy.contains('服务').click();
+
+ cy.get(domSelector.switcher).click('right');
+ cy.contains('English').click({
+ timeout,
+ });
+ cy.contains('Create');
Review comment:
@LiteSun Please take a look at here.
##########
File path: web/cypress/integration/lang/switch-language.spec.js
##########
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/* eslint-disable no-undef */
+
+context('Switch language', () => {
+ const timeout = 1000;
+ const domSelector = {
+ switcher: '.ant-space-align-center',
+ };
+
+ beforeEach(() => {
+ cy.login();
+ });
+
+ it('should switch language', () => {
+ cy.visit('/');
+
+ cy.get(domSelector.switcher).click('right');
+ cy.contains('简体中文').click({
+ timeout,
+ });
+ cy.contains('服务').click();
+
+ cy.get(domSelector.switcher).click('right');
+ cy.contains('English').click({
+ timeout,
+ });
+ cy.contains('Create');
Review comment:
~`.should("contain", "TEXT")`?~
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #1334: test: switch language
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1334:
URL: https://github.com/apache/apisix-dashboard/pull/1334#issuecomment-762760524
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=h1) Report
> Merging [#1334](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=desc) (752c9a6) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/749eeb58651c03b1d387d81a1d6f636f7fee93ae?el=desc) (749eeb5) will **increase** coverage by `18.17%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1334 +/- ##
===========================================
+ Coverage 44.36% 62.54% +18.17%
===========================================
Files 31 41 +10
Lines 1961 2352 +391
===========================================
+ Hits 870 1471 +601
+ Misses 979 705 -274
- Partials 112 176 +64
```
| [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [api/internal/log/zap.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2xvZy96YXAuZ28=) | `60.86% <0.00%> (ø)` | |
| [api/internal/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL3JvdXRlLmdv) | `83.87% <0.00%> (ø)` | |
| [api/internal/core/storage/storage\_mock.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmFnZS9zdG9yYWdlX21vY2suZ28=) | `0.00% <0.00%> (ø)` | |
| [api/cmd/managerapi.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2NtZC9tYW5hZ2VyYXBpLmdv) | `77.08% <0.00%> (ø)` | |
| [api/internal/handler/healthz/healthz.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvaGVhbHRoei9oZWFsdGh6Lmdv) | `66.66% <0.00%> (ø)` | |
| [...l/handler/route\_online\_debug/route\_online\_debug.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGVfb25saW5lX2RlYnVnL3JvdXRlX29ubGluZV9kZWJ1Zy5nbw==) | `73.80% <0.00%> (ø)` | |
| [api/internal/conf/conf.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvbmYvY29uZi5nbw==) | `67.85% <0.00%> (ø)` | |
| [api/internal/log/log.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2xvZy9sb2cuZ28=) | `50.00% <0.00%> (ø)` | |
| [api/cmd/manager/main.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2NtZC9tYW5hZ2VyL21haW4uZ28=) | `0.00% <0.00%> (ø)` | |
| [api/internal/core/storage/etcd.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmFnZS9ldGNkLmdv) | `42.69% <0.00%> (ø)` | |
| ... and [23 more](https://codecov.io/gh/apache/apisix-dashboard/pull/1334/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=footer). Last update [749eeb5...752c9a6](https://codecov.io/gh/apache/apisix-dashboard/pull/1334?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-dashboard] guoqqqi commented on a change in pull request #1334: test: switch language
Posted by GitBox <gi...@apache.org>.
guoqqqi commented on a change in pull request #1334:
URL: https://github.com/apache/apisix-dashboard/pull/1334#discussion_r560791838
##########
File path: web/cypress/integration/lang/switch-language.spec.js
##########
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/* eslint-disable no-undef */
+
+context('Switch language', () => {
+ const timeout = 1000;
+ const domSelector = {
+ switcher: '.ant-space-align-center',
+ };
+
+ beforeEach(() => {
+ cy.login();
+ });
+
+ it('should switch language', () => {
+ cy.visit('/');
+
+ cy.get(domSelector.switcher).click('right');
+ cy.contains('简体中文').click({
+ timeout,
+ });
+ cy.contains('服务').click();
+
+ cy.get(domSelector.switcher).click('right');
+ cy.contains('English').click({
+ timeout,
+ });
+ cy.contains('Create');
Review comment:
You cannot use .should() here, as shown in the figure:

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org