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 2020/12/22 05:24:20 UTC
[GitHub] [apisix-dashboard] idbeta opened a new pull request #1093: test: add frontend e2e test (edit and search route)
idbeta opened a new pull request #1093:
URL: https://github.com/apache/apisix-dashboard/pull/1093
Please answer these questions before submitting a pull request
- Why submit this pull request?
- [x] E2E
- [ ] New feature provided
- [ ] Improve performance
- Related issues
resolve https://github.com/apache/apisix-dashboard/issues/640
----------------------------------------------------------------
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] LiteSun commented on a change in pull request #1093: test: add frontend e2e test (edit and search route)
Posted by GitBox <gi...@apache.org>.
LiteSun commented on a change in pull request #1093:
URL: https://github.com/apache/apisix-dashboard/pull/1093#discussion_r547106326
##########
File path: web/cypress/integration/route/search-route.spec.js
##########
@@ -0,0 +1,85 @@
+/*
+ * 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('Create and Search Route', () => {
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create route test1, test2, test3', () => {
+ // go to route create page
+ cy.visit('/');
+ cy.contains('Route').click();
+ for (var i = 0; i < 3; i++) {
+ cy.contains('Create').click();
+ cy.get('#name').type('test' + i);
+ cy.get('#desc').type('desc' + i);
+ cy.get('#hosts_0').type('11.11.11.11');
+ cy.contains('Next').click();
+ cy.wait(400);
+ cy.get('#nodes_0_host').type('12.12.12.12', {
+ timeout: 500
+ });
+ cy.contains('Next').click();
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.contains('SubmitSuccessfully');
+ // back to route list page
+ cy.contains('Return Route List').click();
+ cy.url().should('contains', 'routes/list');
Review comment:
> why check this?
after click the button with the text `Return Route List`, we need to ensure that the page jumps to the correct path.
----------------------------------------------------------------
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 #1093: test: add frontend e2e test (edit and search route)
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1093:
URL: https://github.com/apache/apisix-dashboard/pull/1093#issuecomment-749346372
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?src=pr&el=h1) Report
> Merging [#1093](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?src=pr&el=desc) (2cc0492) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/02a4702f53105f95eecc175f08d7bfb9de3ef6b2?el=desc) (02a4702) will **increase** coverage by `0.05%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1093 +/- ##
==========================================
+ Coverage 41.80% 41.86% +0.05%
==========================================
Files 29 29
Lines 1825 1825
==========================================
+ Hits 763 764 +1
+ Misses 954 953 -1
Partials 108 108
```
| [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1093/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=) | `80.12% <0.00%> (+0.62%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?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/1093?src=pr&el=footer). Last update [02a4702...2cc0492](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?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 #1093: test: add frontend e2e test (edit and search route)
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1093:
URL: https://github.com/apache/apisix-dashboard/pull/1093#issuecomment-749346372
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?src=pr&el=h1) Report
> Merging [#1093](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?src=pr&el=desc) (c05c7b3) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/47e5345d09926bb8d360a666265dadbeeeec7274?el=desc) (47e5345) will **decrease** coverage by `0.05%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1093 +/- ##
==========================================
- Coverage 42.07% 42.02% -0.06%
==========================================
Files 30 30
Lines 1856 1856
==========================================
- Hits 781 780 -1
- Misses 965 966 +1
Partials 110 110
```
| [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1093/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=) | `79.37% <0.00%> (-0.63%)` | :arrow_down: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?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/1093?src=pr&el=footer). Last update [47e5345...c05c7b3](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?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] LiteSun commented on a change in pull request #1093: test: add frontend e2e test (edit and search route)
Posted by GitBox <gi...@apache.org>.
LiteSun commented on a change in pull request #1093:
URL: https://github.com/apache/apisix-dashboard/pull/1093#discussion_r547104522
##########
File path: web/cypress/integration/route/create-edit-delete-route.spec.js
##########
@@ -80,11 +81,28 @@ context('Create and Delete Route', () => {
cy.url().should('contains', 'routes/list');
});
+ it('edit the route', () => {
+ cy.visit('/');
+ cy.contains('Route').click();
+ cy.contains('Edit').click();
+ // input new name and newdescription
+ cy.get('#name').clear().type(newname);
+ cy.get('#desc').clear().type('new desc');
+ cy.contains('Next').click();
+ cy.contains('Next').click();
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.contains('SubmitSuccessfully');
Review comment:
> no space after “submit”?
refer to cypress‘ documents: ` It’s automatically waiting and retrying because it expects the content to eventually be found in the DOM. It doesn’t immediately fail!`
https://docs.cypress.io/guides/getting-started/writing-your-first-test.html#Step-2-Query-for-an-element
----------------------------------------------------------------
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] LiteSun commented on a change in pull request #1093: test: add frontend e2e test (edit and search route)
Posted by GitBox <gi...@apache.org>.
LiteSun commented on a change in pull request #1093:
URL: https://github.com/apache/apisix-dashboard/pull/1093#discussion_r547104965
##########
File path: web/cypress/integration/route/create-edit-delete-route.spec.js
##########
@@ -18,6 +18,7 @@
context('Create and Delete Route', () => {
const name = `routeName${new Date().valueOf()}`;
+ const newname = `newName${new Date().valueOf()}`;
Review comment:
```suggestion
const newName = `newName${new Date().valueOf()}`;
```
----------------------------------------------------------------
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] LiteSun commented on a change in pull request #1093: test: add frontend e2e test (edit and search route)
Posted by GitBox <gi...@apache.org>.
LiteSun commented on a change in pull request #1093:
URL: https://github.com/apache/apisix-dashboard/pull/1093#discussion_r547105468
##########
File path: web/cypress/integration/route/search-route.spec.js
##########
@@ -0,0 +1,85 @@
+/*
+ * 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('Create and Search Route', () => {
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create route test1, test2, test3', () => {
+ // go to route create page
+ cy.visit('/');
+ cy.contains('Route').click();
+ for (var i = 0; i < 3; i++) {
Review comment:
```suggestion
for (let i = 0; i < 3; i++) {
```
----------------------------------------------------------------
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] idbeta commented on pull request #1093: test: add frontend e2e test (edit and search route)
Posted by GitBox <gi...@apache.org>.
idbeta commented on pull request #1093:
URL: https://github.com/apache/apisix-dashboard/pull/1093#issuecomment-751571316
> @idbeta please fix the conflict first
fixed.
----------------------------------------------------------------
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] idbeta commented on a change in pull request #1093: test: add frontend e2e test (edit and search route)
Posted by GitBox <gi...@apache.org>.
idbeta commented on a change in pull request #1093:
URL: https://github.com/apache/apisix-dashboard/pull/1093#discussion_r547128889
##########
File path: web/cypress/integration/route/search-route.spec.js
##########
@@ -0,0 +1,85 @@
+/*
+ * 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('Create and Search Route', () => {
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create route test1, test2, test3', () => {
+ // go to route create page
+ cy.visit('/');
+ cy.contains('Route').click();
+ for (var i = 0; i < 3; i++) {
Review comment:
thanks, fixed.
##########
File path: web/cypress/integration/route/create-edit-delete-route.spec.js
##########
@@ -18,6 +18,7 @@
context('Create and Delete Route', () => {
const name = `routeName${new Date().valueOf()}`;
+ const newname = `newName${new Date().valueOf()}`;
Review comment:
fixed.
##########
File path: web/cypress/integration/route/search-route.spec.js
##########
@@ -0,0 +1,85 @@
+/*
+ * 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('Create and Search Route', () => {
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create route test1, test2, test3', () => {
+ // go to route create page
+ cy.visit('/');
+ cy.contains('Route').click();
+ for (var i = 0; i < 3; i++) {
+ cy.contains('Create').click();
+ cy.get('#name').type('test' + i);
+ cy.get('#desc').type('desc' + i);
+ cy.get('#hosts_0').type('11.11.11.11');
+ cy.contains('Next').click();
+ cy.wait(400);
+ cy.get('#nodes_0_host').type('12.12.12.12', {
+ timeout: 500
+ });
+ cy.contains('Next').click();
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.contains('SubmitSuccessfully');
+ // back to route list page
+ cy.contains('Return Route List').click();
+ cy.url().should('contains', 'routes/list');
+ }
+
+ });
+
+ it('search the route', () => {
+ cy.visit('/');
+ cy.contains('Route').click();
+ // full match
+ cy.get('[title=Name]').type('test1');
+ cy.contains('查 询').click();
+ cy.contains('test1').siblings().should('contain', 'desc1')
+ cy.contains('test0').should('not.exist');
+ cy.contains('test2').should('not.exist');
+ // partial match
+ cy.reload()
+ cy.get('[title=Name]').type('test');
+ cy.contains('查 询').click();
+ cy.contains('test0').siblings().should('contain', 'desc0')
+ cy.contains('test1').siblings().should('contain', 'desc1')
+ cy.contains('test2').siblings().should('contain', 'desc2')
+ // no match
+ cy.reload()
+ cy.get('[title=Name]').type('testx');
+ cy.contains('查 询').click();
+ cy.contains('test0').should('not.exist');
+ cy.contains('test1').should('not.exist');
+ cy.contains('test2').should('not.exist');
+
+ });
+
+ it('delete the route', () => {
+ cy.visit('/routes/list');
+ for (var i = 0; i < 3; i++) {
Review comment:
fixed.
----------------------------------------------------------------
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 #1093: test: add frontend e2e test (edit and search route)
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1093:
URL: https://github.com/apache/apisix-dashboard/pull/1093#issuecomment-749346372
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?src=pr&el=h1) Report
> Merging [#1093](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?src=pr&el=desc) (8122890) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/1fa884a1fb6944c799cd7d9fb3ef943df52b820b?el=desc) (1fa884a) will **increase** coverage by `0.05%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1093 +/- ##
==========================================
+ Coverage 41.00% 41.06% +0.05%
==========================================
Files 28 28
Lines 1773 1773
==========================================
+ Hits 727 728 +1
+ Misses 940 939 -1
Partials 106 106
```
| [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1093/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=) | `79.22% <0.00%> (+0.64%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?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/1093?src=pr&el=footer). Last update [1fa884a...8122890](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?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 #1093: test: add frontend e2e test (edit and search route)
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1093:
URL: https://github.com/apache/apisix-dashboard/pull/1093#issuecomment-749346372
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?src=pr&el=h1) Report
> Merging [#1093](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?src=pr&el=desc) (d188448) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/f009244f06f4936be1c94d0c2745343577a245b8?el=desc) (f009244) will **not change** coverage.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1093 +/- ##
=======================================
Coverage 42.30% 42.30%
=======================================
Files 31 31
Lines 1924 1924
=======================================
Hits 814 814
Misses 1000 1000
Partials 110 110
```
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?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/1093?src=pr&el=footer). Last update [f009244...d188448](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?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] membphis commented on pull request #1093: test: add frontend e2e test (edit and search route)
Posted by GitBox <gi...@apache.org>.
membphis commented on pull request #1093:
URL: https://github.com/apache/apisix-dashboard/pull/1093#issuecomment-751471333
@idbeta please fix the conflict first
----------------------------------------------------------------
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] idbeta commented on pull request #1093: test: add frontend e2e test (edit and search route)
Posted by GitBox <gi...@apache.org>.
idbeta commented on pull request #1093:
URL: https://github.com/apache/apisix-dashboard/pull/1093#issuecomment-749960712
@nic-chen Help me run the backend E2E test again for this 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 pull request #1093: test: add frontend e2e test (edit and search route)
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on pull request #1093:
URL: https://github.com/apache/apisix-dashboard/pull/1093#issuecomment-751413472
ping
----------------------------------------------------------------
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] idbeta commented on a change in pull request #1093: test: add frontend e2e test (edit and search route)
Posted by GitBox <gi...@apache.org>.
idbeta commented on a change in pull request #1093:
URL: https://github.com/apache/apisix-dashboard/pull/1093#discussion_r547128658
##########
File path: web/cypress/integration/route/search-route.spec.js
##########
@@ -0,0 +1,85 @@
+/*
+ * 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('Create and Search Route', () => {
+ beforeEach(() => {
Review comment:
thanks for reminding, fixed.
----------------------------------------------------------------
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] moonming commented on a change in pull request #1093: test: add frontend e2e test (edit and search route)
Posted by GitBox <gi...@apache.org>.
moonming commented on a change in pull request #1093:
URL: https://github.com/apache/apisix-dashboard/pull/1093#discussion_r547094898
##########
File path: web/cypress/integration/route/search-route.spec.js
##########
@@ -0,0 +1,85 @@
+/*
+ * 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('Create and Search Route', () => {
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create route test1, test2, test3', () => {
+ // go to route create page
+ cy.visit('/');
+ cy.contains('Route').click();
+ for (var i = 0; i < 3; i++) {
+ cy.contains('Create').click();
+ cy.get('#name').type('test' + i);
+ cy.get('#desc').type('desc' + i);
+ cy.get('#hosts_0').type('11.11.11.11');
+ cy.contains('Next').click();
+ cy.wait(400);
+ cy.get('#nodes_0_host').type('12.12.12.12', {
+ timeout: 500
+ });
+ cy.contains('Next').click();
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.contains('SubmitSuccessfully');
+ // back to route list page
+ cy.contains('Return Route List').click();
+ cy.url().should('contains', 'routes/list');
Review comment:
why check this?
##########
File path: web/cypress/integration/route/create-edit-delete-route.spec.js
##########
@@ -80,11 +81,28 @@ context('Create and Delete Route', () => {
cy.url().should('contains', 'routes/list');
});
+ it('edit the route', () => {
+ cy.visit('/');
+ cy.contains('Route').click();
+ cy.contains('Edit').click();
+ // input new name and newdescription
+ cy.get('#name').clear().type(newname);
+ cy.get('#desc').clear().type('new desc');
+ cy.contains('Next').click();
+ cy.contains('Next').click();
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.contains('SubmitSuccessfully');
Review comment:
no space after “submit”?
##########
File path: web/cypress/integration/route/search-route.spec.js
##########
@@ -0,0 +1,85 @@
+/*
+ * 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('Create and Search Route', () => {
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create route test1, test2, test3', () => {
+ // go to route create page
+ cy.visit('/');
+ cy.contains('Route').click();
+ for (var i = 0; i < 3; i++) {
+ cy.contains('Create').click();
+ cy.get('#name').type('test' + i);
+ cy.get('#desc').type('desc' + i);
+ cy.get('#hosts_0').type('11.11.11.11');
+ cy.contains('Next').click();
+ cy.wait(400);
+ cy.get('#nodes_0_host').type('12.12.12.12', {
+ timeout: 500
+ });
+ cy.contains('Next').click();
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.contains('SubmitSuccessfully');
Review comment:
ditto
----------------------------------------------------------------
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 #1093: test: add frontend e2e test (edit and search route)
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #1093:
URL: https://github.com/apache/apisix-dashboard/pull/1093#discussion_r548835974
##########
File path: web/cypress/integration/route/search-route.spec.js
##########
@@ -0,0 +1,85 @@
+/*
+ * 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('Create and Search Route', () => {
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create route test1, test2, test3', () => {
+ // go to route create page
+ cy.visit('/');
+ cy.contains('Route').click();
+ for (let i = 0; i < 3; i++) {
+ cy.contains('Create').click();
+ cy.get('#name').type('test' + i);
+ cy.get('#desc').type('desc' + i);
+ cy.get('#hosts_0').type('11.11.11.11');
+ cy.contains('Next').click();
+ cy.wait(400);
+ cy.get('#nodes_0_host').type('12.12.12.12', {
+ timeout: 500
+ });
+ cy.contains('Next').click();
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.contains('SubmitSuccessfully');
+ // back to route list page
+ cy.contains('Return Route List').click();
+ cy.url().should('contains', 'routes/list');
+ }
+
+ });
+
+ it('search the route', () => {
+ cy.visit('/');
+ cy.contains('Route').click();
+ // full match
+ cy.get('[title=Name]').type('test1');
+ cy.contains('查 询').click();
+ cy.contains('test1').siblings().should('contain', 'desc1')
+ cy.contains('test0').should('not.exist');
+ cy.contains('test2').should('not.exist');
+ // partial match
+ cy.reload()
+ cy.get('[title=Name]').type('test');
+ cy.contains('查 询').click();
+ cy.contains('test0').siblings().should('contain', 'desc0')
+ cy.contains('test1').siblings().should('contain', 'desc1')
+ cy.contains('test2').siblings().should('contain', 'desc2')
+ // no match
+ cy.reload()
+ cy.get('[title=Name]').type('testx');
+ cy.contains('查 询').click();
+ cy.contains('test0').should('not.exist');
+ cy.contains('test1').should('not.exist');
+ cy.contains('test2').should('not.exist');
+
+ });
+
+ it('delete the route', () => {
Review comment:
- [ ] should
##########
File path: web/cypress/integration/route/search-route.spec.js
##########
@@ -0,0 +1,85 @@
+/*
+ * 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('Create and Search Route', () => {
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create route test1, test2, test3', () => {
+ // go to route create page
+ cy.visit('/');
+ cy.contains('Route').click();
+ for (let i = 0; i < 3; i++) {
+ cy.contains('Create').click();
+ cy.get('#name').type('test' + i);
+ cy.get('#desc').type('desc' + i);
+ cy.get('#hosts_0').type('11.11.11.11');
+ cy.contains('Next').click();
+ cy.wait(400);
+ cy.get('#nodes_0_host').type('12.12.12.12', {
+ timeout: 500
+ });
+ cy.contains('Next').click();
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.contains('SubmitSuccessfully');
+ // back to route list page
+ cy.contains('Return Route List').click();
+ cy.url().should('contains', 'routes/list');
+ }
+
+ });
+
+ it('search the route', () => {
+ cy.visit('/');
+ cy.contains('Route').click();
+ // full match
+ cy.get('[title=Name]').type('test1');
+ cy.contains('查 询').click();
Review comment:
- [ ] i18n
##########
File path: web/cypress/integration/route/create-edit-delete-route.spec.js
##########
@@ -80,11 +81,28 @@ context('Create and Delete Route', () => {
cy.url().should('contains', 'routes/list');
});
+ it('edit the route', () => {
+ cy.visit('/');
+ cy.contains('Route').click();
+ cy.contains('Edit').click();
+ // input new name and newdescription
+ cy.get('#name').clear().type(newname);
+ cy.get('#desc').clear().type('new desc');
+ cy.contains('Next').click();
+ cy.contains('Next').click();
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.contains('SubmitSuccessfully');
Review comment:
- [ ] Update this text with space;
----------------------------------------------------------------
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 #1093: test: add frontend e2e test (edit and search route)
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #1093:
URL: https://github.com/apache/apisix-dashboard/pull/1093#discussion_r547111930
##########
File path: web/cypress/integration/route/search-route.spec.js
##########
@@ -0,0 +1,85 @@
+/*
+ * 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('Create and Search Route', () => {
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create route test1, test2, test3', () => {
+ // go to route create page
+ cy.visit('/');
+ cy.contains('Route').click();
+ for (var i = 0; i < 3; i++) {
+ cy.contains('Create').click();
+ cy.get('#name').type('test' + i);
+ cy.get('#desc').type('desc' + i);
+ cy.get('#hosts_0').type('11.11.11.11');
+ cy.contains('Next').click();
+ cy.wait(400);
+ cy.get('#nodes_0_host').type('12.12.12.12', {
+ timeout: 500
+ });
+ cy.contains('Next').click();
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.contains('SubmitSuccessfully');
+ // back to route list page
+ cy.contains('Return Route List').click();
+ cy.url().should('contains', 'routes/list');
+ }
+
+ });
+
+ it('search the route', () => {
+ cy.visit('/');
+ cy.contains('Route').click();
+ // full match
+ cy.get('[title=Name]').type('test1');
+ cy.contains('查 询').click();
+ cy.contains('test1').siblings().should('contain', 'desc1')
+ cy.contains('test0').should('not.exist');
+ cy.contains('test2').should('not.exist');
+ // partial match
+ cy.reload()
+ cy.get('[title=Name]').type('test');
+ cy.contains('查 询').click();
+ cy.contains('test0').siblings().should('contain', 'desc0')
+ cy.contains('test1').siblings().should('contain', 'desc1')
+ cy.contains('test2').siblings().should('contain', 'desc2')
+ // no match
+ cy.reload()
+ cy.get('[title=Name]').type('testx');
+ cy.contains('查 询').click();
Review comment:
This is an i18n issue, just created 1 issue to track this
https://github.com/apache/apisix-dashboard/issues/1094
----------------------------------------------------------------
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 #1093: test: add frontend e2e test (edit and search route)
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #1093:
URL: https://github.com/apache/apisix-dashboard/pull/1093#discussion_r549603785
##########
File path: web/cypress/integration/route/create-edit-delete-route.spec.js
##########
@@ -18,23 +18,25 @@
context('Create and Delete Route', () => {
const name = `routeName${new Date().valueOf()}`;
+ const newName = `newName${new Date().valueOf()}`;
+ const sleepTime = 100;
beforeEach(() => {
// init login
cy.login();
});
- it('create route', () => {
+ it('should create route', () => {
Review comment:
refer to [mocha](https://mochajs.org/), [should.js](https://github.com/tj/should.js/)
----------------------------------------------------------------
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 #1093: test: add frontend e2e test (edit and search route)
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1093:
URL: https://github.com/apache/apisix-dashboard/pull/1093#issuecomment-749346372
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?src=pr&el=h1) Report
> Merging [#1093](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?src=pr&el=desc) (d3a9a17) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/47e5345d09926bb8d360a666265dadbeeeec7274?el=desc) (47e5345) will **not change** coverage.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1093 +/- ##
=======================================
Coverage 42.07% 42.07%
=======================================
Files 30 30
Lines 1856 1856
=======================================
Hits 781 781
Misses 965 965
Partials 110 110
```
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?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/1093?src=pr&el=footer). Last update [47e5345...d3a9a17](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?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 #1093: test: add frontend e2e test (edit and search route)
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1093:
URL: https://github.com/apache/apisix-dashboard/pull/1093#issuecomment-749346372
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?src=pr&el=h1) Report
> Merging [#1093](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?src=pr&el=desc) (39f0f19) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/43d541fba32783ca2467128ed5edba24377e44c6?el=desc) (43d541f) will **not change** coverage.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1093 +/- ##
=======================================
Coverage 42.30% 42.30%
=======================================
Files 31 31
Lines 1924 1924
=======================================
Hits 814 814
Misses 1000 1000
Partials 110 110
```
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?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/1093?src=pr&el=footer). Last update [43d541f...39f0f19](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?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] membphis commented on a change in pull request #1093: test: add frontend e2e test (edit and search route)
Posted by GitBox <gi...@apache.org>.
membphis commented on a change in pull request #1093:
URL: https://github.com/apache/apisix-dashboard/pull/1093#discussion_r549606188
##########
File path: web/cypress/integration/route/create-edit-delete-route.spec.js
##########
@@ -18,23 +18,25 @@
context('Create and Delete Route', () => {
const name = `routeName${new Date().valueOf()}`;
+ const newName = `newName${new Date().valueOf()}`;
+ const sleepTime = 100;
beforeEach(() => {
// init login
cy.login();
});
- it('create route', () => {
+ it('should create route', () => {
Review comment:
got it, many thx
----------------------------------------------------------------
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 #1093: test: add frontend e2e test (edit and search route)
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #1093:
URL: https://github.com/apache/apisix-dashboard/pull/1093#discussion_r547090327
##########
File path: web/cypress/integration/route/search-route.spec.js
##########
@@ -0,0 +1,85 @@
+/*
+ * 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('Create and Search Route', () => {
+ beforeEach(() => {
Review comment:
codes format, please
----------------------------------------------------------------
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 #1093: test: add frontend e2e test (edit and search route)
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #1093:
URL: https://github.com/apache/apisix-dashboard/pull/1093#discussion_r549535641
##########
File path: web/cypress/integration/route/create-edit-delete-route.spec.js
##########
@@ -80,11 +81,28 @@ context('Create and Delete Route', () => {
cy.url().should('contains', 'routes/list');
});
+ it('edit the route', () => {
+ cy.visit('/');
+ cy.contains('Route').click();
+ cy.contains('Edit').click();
+ // input new name and newdescription
+ cy.get('#name').clear().type(newname);
+ cy.get('#desc').clear().type('new desc');
+ cy.contains('Next').click();
+ cy.contains('Next').click();
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.contains('SubmitSuccessfully');
Review comment:
fixed
##########
File path: web/cypress/integration/route/search-route.spec.js
##########
@@ -0,0 +1,85 @@
+/*
+ * 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('Create and Search Route', () => {
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create route test1, test2, test3', () => {
+ // go to route create page
+ cy.visit('/');
+ cy.contains('Route').click();
+ for (var i = 0; i < 3; i++) {
+ cy.contains('Create').click();
+ cy.get('#name').type('test' + i);
+ cy.get('#desc').type('desc' + i);
+ cy.get('#hosts_0').type('11.11.11.11');
+ cy.contains('Next').click();
+ cy.wait(400);
+ cy.get('#nodes_0_host').type('12.12.12.12', {
+ timeout: 500
+ });
+ cy.contains('Next').click();
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.contains('SubmitSuccessfully');
+ // back to route list page
+ cy.contains('Return Route List').click();
+ cy.url().should('contains', 'routes/list');
+ }
+
+ });
+
+ it('search the route', () => {
+ cy.visit('/');
+ cy.contains('Route').click();
+ // full match
+ cy.get('[title=Name]').type('test1');
+ cy.contains('查 询').click();
+ cy.contains('test1').siblings().should('contain', 'desc1')
+ cy.contains('test0').should('not.exist');
+ cy.contains('test2').should('not.exist');
+ // partial match
+ cy.reload()
+ cy.get('[title=Name]').type('test');
+ cy.contains('查 询').click();
+ cy.contains('test0').siblings().should('contain', 'desc0')
+ cy.contains('test1').siblings().should('contain', 'desc1')
+ cy.contains('test2').siblings().should('contain', 'desc2')
+ // no match
+ cy.reload()
+ cy.get('[title=Name]').type('testx');
+ cy.contains('查 询').click();
Review comment:
fixed
##########
File path: web/cypress/integration/route/create-edit-delete-route.spec.js
##########
@@ -80,11 +81,28 @@ context('Create and Delete Route', () => {
cy.url().should('contains', 'routes/list');
});
+ it('edit the route', () => {
+ cy.visit('/');
+ cy.contains('Route').click();
+ cy.contains('Edit').click();
+ // input new name and newdescription
+ cy.get('#name').clear().type(newname);
+ cy.get('#desc').clear().type('new desc');
+ cy.contains('Next').click();
+ cy.contains('Next').click();
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.contains('SubmitSuccessfully');
Review comment:
- [x] Update this text with space;
##########
File path: web/cypress/integration/route/search-route.spec.js
##########
@@ -0,0 +1,85 @@
+/*
+ * 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('Create and Search Route', () => {
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create route test1, test2, test3', () => {
+ // go to route create page
+ cy.visit('/');
+ cy.contains('Route').click();
+ for (let i = 0; i < 3; i++) {
+ cy.contains('Create').click();
+ cy.get('#name').type('test' + i);
+ cy.get('#desc').type('desc' + i);
+ cy.get('#hosts_0').type('11.11.11.11');
+ cy.contains('Next').click();
+ cy.wait(400);
+ cy.get('#nodes_0_host').type('12.12.12.12', {
+ timeout: 500
+ });
+ cy.contains('Next').click();
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.contains('SubmitSuccessfully');
+ // back to route list page
+ cy.contains('Return Route List').click();
+ cy.url().should('contains', 'routes/list');
+ }
+
+ });
+
+ it('search the route', () => {
+ cy.visit('/');
+ cy.contains('Route').click();
+ // full match
+ cy.get('[title=Name]').type('test1');
+ cy.contains('查 询').click();
Review comment:
just fixed
----------------------------------------------------------------
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 #1093: test: add frontend e2e test (edit and search route)
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on pull request #1093:
URL: https://github.com/apache/apisix-dashboard/pull/1093#issuecomment-751619401
ping @moonming
----------------------------------------------------------------
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] LiteSun commented on a change in pull request #1093: test: add frontend e2e test (edit and search route)
Posted by GitBox <gi...@apache.org>.
LiteSun commented on a change in pull request #1093:
URL: https://github.com/apache/apisix-dashboard/pull/1093#discussion_r549563983
##########
File path: web/src/pages/Route/List.tsx
##########
@@ -22,13 +22,16 @@ import { history, useIntl } from 'umi';
import { PlusOutlined, BugOutlined } from '@ant-design/icons';
import { timestampToLocaleString } from '@/helpers';
+import useForceIntl from '@/hooks/useForceIntl';
import { fetchList, remove, fetchLabelList, updateRouteStatus } from './service';
import { DebugDrawView } from './components/DebugViews';
const { OptGroup, Option } = Select;
const Page: React.FC = () => {
+ useForceIntl()
Review comment:
```suggestion
useForceIntl();
```
----------------------------------------------------------------
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 #1093: test: add frontend e2e test (edit and search route)
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1093:
URL: https://github.com/apache/apisix-dashboard/pull/1093#issuecomment-749346372
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?src=pr&el=h1) Report
> Merging [#1093](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?src=pr&el=desc) (d0e89c4) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/b194c6181c5c2be4d12b5d3e9648b68217c146f4?el=desc) (b194c61) will **decrease** coverage by `0.05%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1093 +/- ##
==========================================
- Coverage 42.07% 42.02% -0.06%
==========================================
Files 30 30
Lines 1856 1856
==========================================
- Hits 781 780 -1
- Misses 965 966 +1
Partials 110 110
```
| [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1093/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=) | `79.37% <0.00%> (-0.63%)` | :arrow_down: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?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/1093?src=pr&el=footer). Last update [b194c61...d0e89c4](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?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 #1093: test: add frontend e2e test (edit and search route)
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #1093:
URL: https://github.com/apache/apisix-dashboard/pull/1093#discussion_r549603665
##########
File path: web/cypress/integration/route/create-edit-delete-route.spec.js
##########
@@ -18,23 +18,25 @@
context('Create and Delete Route', () => {
const name = `routeName${new Date().valueOf()}`;
+ const newName = `newName${new Date().valueOf()}`;
+ const sleepTime = 100;
beforeEach(() => {
// init login
cy.login();
});
- it('create route', () => {
+ it('should create route', () => {
Review comment:
`it should create a route`
----------------------------------------------------------------
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] membphis commented on a change in pull request #1093: test: add frontend e2e test (edit and search route)
Posted by GitBox <gi...@apache.org>.
membphis commented on a change in pull request #1093:
URL: https://github.com/apache/apisix-dashboard/pull/1093#discussion_r549600176
##########
File path: web/cypress/integration/route/create-edit-delete-route.spec.js
##########
@@ -74,18 +77,40 @@ context('Create and Delete Route', () => {
// go to step4
cy.contains('Next').click();
cy.contains('Submit').click();
- cy.contains('SubmitSuccessfully');
+ cy.contains('Submit Successfully');
// back to route list page
- cy.contains('Return Route List').click();
+ cy.contains('Goto List').click();
cy.url().should('contains', 'routes/list');
});
- it('delete the route', () => {
- cy.visit('/routes/list');
+ it('should edit the route', () => {
Review comment:
same issue
##########
File path: web/cypress/integration/route/create-edit-delete-route.spec.js
##########
@@ -18,23 +18,25 @@
context('Create and Delete Route', () => {
const name = `routeName${new Date().valueOf()}`;
+ const newName = `newName${new Date().valueOf()}`;
+ const sleepTime = 100;
beforeEach(() => {
// init login
cy.login();
});
- it('create route', () => {
+ it('should create route', () => {
Review comment:
Why do we need "should" 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 #1093: test: add frontend e2e test (edit and search route)
Posted by GitBox <gi...@apache.org>.
juzhiyuan merged pull request #1093:
URL: https://github.com/apache/apisix-dashboard/pull/1093
----------------------------------------------------------------
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] LiteSun commented on a change in pull request #1093: test: add frontend e2e test (edit and search route)
Posted by GitBox <gi...@apache.org>.
LiteSun commented on a change in pull request #1093:
URL: https://github.com/apache/apisix-dashboard/pull/1093#discussion_r547106459
##########
File path: web/cypress/integration/route/search-route.spec.js
##########
@@ -0,0 +1,85 @@
+/*
+ * 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('Create and Search Route', () => {
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create route test1, test2, test3', () => {
+ // go to route create page
+ cy.visit('/');
+ cy.contains('Route').click();
+ for (var i = 0; i < 3; i++) {
+ cy.contains('Create').click();
+ cy.get('#name').type('test' + i);
+ cy.get('#desc').type('desc' + i);
+ cy.get('#hosts_0').type('11.11.11.11');
+ cy.contains('Next').click();
+ cy.wait(400);
+ cy.get('#nodes_0_host').type('12.12.12.12', {
+ timeout: 500
+ });
+ cy.contains('Next').click();
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.contains('SubmitSuccessfully');
+ // back to route list page
+ cy.contains('Return Route List').click();
+ cy.url().should('contains', 'routes/list');
+ }
+
+ });
+
+ it('search the route', () => {
+ cy.visit('/');
+ cy.contains('Route').click();
+ // full match
+ cy.get('[title=Name]').type('test1');
+ cy.contains('查 询').click();
+ cy.contains('test1').siblings().should('contain', 'desc1')
+ cy.contains('test0').should('not.exist');
+ cy.contains('test2').should('not.exist');
+ // partial match
+ cy.reload()
+ cy.get('[title=Name]').type('test');
+ cy.contains('查 询').click();
+ cy.contains('test0').siblings().should('contain', 'desc0')
+ cy.contains('test1').siblings().should('contain', 'desc1')
+ cy.contains('test2').siblings().should('contain', 'desc2')
+ // no match
+ cy.reload()
+ cy.get('[title=Name]').type('testx');
+ cy.contains('查 询').click();
+ cy.contains('test0').should('not.exist');
+ cy.contains('test1').should('not.exist');
+ cy.contains('test2').should('not.exist');
+
+ });
+
+ it('delete the route', () => {
+ cy.visit('/routes/list');
+ for (var i = 0; i < 3; i++) {
Review comment:
ditto
----------------------------------------------------------------
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 #1093: test: add frontend e2e test (edit and search route)
Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #1093:
URL: https://github.com/apache/apisix-dashboard/pull/1093#issuecomment-749346372
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?src=pr&el=h1) Report
> Merging [#1093](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?src=pr&el=desc) (7fe0531) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/1fa884a1fb6944c799cd7d9fb3ef943df52b820b?el=desc) (1fa884a) will **increase** coverage by `0.05%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1093 +/- ##
==========================================
+ Coverage 41.00% 41.06% +0.05%
==========================================
Files 28 28
Lines 1773 1773
==========================================
+ Hits 727 728 +1
+ Misses 940 939 -1
Partials 106 106
```
| [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1093/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=) | `79.22% <0.00%> (+0.64%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?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/1093?src=pr&el=footer). Last update [1fa884a...7fe0531](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?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] moonming commented on a change in pull request #1093: test: add frontend e2e test (edit and search route)
Posted by GitBox <gi...@apache.org>.
moonming commented on a change in pull request #1093:
URL: https://github.com/apache/apisix-dashboard/pull/1093#discussion_r547093536
##########
File path: web/cypress/integration/route/search-route.spec.js
##########
@@ -0,0 +1,85 @@
+/*
+ * 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('Create and Search Route', () => {
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create route test1, test2, test3', () => {
+ // go to route create page
+ cy.visit('/');
+ cy.contains('Route').click();
+ for (var i = 0; i < 3; i++) {
+ cy.contains('Create').click();
+ cy.get('#name').type('test' + i);
+ cy.get('#desc').type('desc' + i);
+ cy.get('#hosts_0').type('11.11.11.11');
+ cy.contains('Next').click();
+ cy.wait(400);
+ cy.get('#nodes_0_host').type('12.12.12.12', {
+ timeout: 500
+ });
+ cy.contains('Next').click();
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.contains('SubmitSuccessfully');
+ // back to route list page
+ cy.contains('Return Route List').click();
+ cy.url().should('contains', 'routes/list');
+ }
+
+ });
+
+ it('search the route', () => {
+ cy.visit('/');
+ cy.contains('Route').click();
+ // full match
+ cy.get('[title=Name]').type('test1');
+ cy.contains('查 询').click();
+ cy.contains('test1').siblings().should('contain', 'desc1')
+ cy.contains('test0').should('not.exist');
+ cy.contains('test2').should('not.exist');
+ // partial match
+ cy.reload()
+ cy.get('[title=Name]').type('test');
+ cy.contains('查 询').click();
+ cy.contains('test0').siblings().should('contain', 'desc0')
+ cy.contains('test1').siblings().should('contain', 'desc1')
+ cy.contains('test2').siblings().should('contain', 'desc2')
+ // no match
+ cy.reload()
+ cy.get('[title=Name]').type('testx');
+ cy.contains('查 询').click();
Review comment:
why contains Chinese?
----------------------------------------------------------------
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 #1093: test: add frontend e2e test (edit and search route)
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1093:
URL: https://github.com/apache/apisix-dashboard/pull/1093#issuecomment-749346372
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?src=pr&el=h1) Report
> Merging [#1093](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?src=pr&el=desc) (87b63ec) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/f009244f06f4936be1c94d0c2745343577a245b8?el=desc) (f009244) will **not change** coverage.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1093 +/- ##
=======================================
Coverage 42.30% 42.30%
=======================================
Files 31 31
Lines 1924 1924
=======================================
Hits 814 814
Misses 1000 1000
Partials 110 110
```
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?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/1093?src=pr&el=footer). Last update [f009244...87b63ec](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?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] moonming commented on a change in pull request #1093: test: add frontend e2e test (edit and search route)
Posted by GitBox <gi...@apache.org>.
moonming commented on a change in pull request #1093:
URL: https://github.com/apache/apisix-dashboard/pull/1093#discussion_r549251272
##########
File path: web/cypress/integration/route/search-route.spec.js
##########
@@ -0,0 +1,85 @@
+/*
+ * 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('Create and Search Route', () => {
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create route test1, test2, test3', () => {
+ // go to route create page
+ cy.visit('/');
+ cy.contains('Route').click();
+ for (let i = 0; i < 3; i++) {
+ cy.contains('Create').click();
+ cy.get('#name').type('test' + i);
+ cy.get('#desc').type('desc' + i);
+ cy.get('#hosts_0').type('11.11.11.11');
+ cy.contains('Next').click();
+ cy.wait(400);
+ cy.get('#nodes_0_host').type('12.12.12.12', {
+ timeout: 500
+ });
+ cy.contains('Next').click();
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.contains('SubmitSuccessfully');
+ // back to route list page
+ cy.contains('Return Route List').click();
+ cy.url().should('contains', 'routes/list');
+ }
+
+ });
+
+ it('search the route', () => {
+ cy.visit('/');
+ cy.contains('Route').click();
+ // full match
+ cy.get('[title=Name]').type('test1');
+ cy.contains('查 询').click();
Review comment:
not fix
----------------------------------------------------------------
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 #1093: test: add frontend e2e test (edit and search route)
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1093:
URL: https://github.com/apache/apisix-dashboard/pull/1093#issuecomment-749346372
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?src=pr&el=h1) Report
> Merging [#1093](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?src=pr&el=desc) (f8db650) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/f009244f06f4936be1c94d0c2745343577a245b8?el=desc) (f009244) will **not change** coverage.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1093 +/- ##
=======================================
Coverage 42.30% 42.30%
=======================================
Files 31 31
Lines 1924 1924
=======================================
Hits 814 814
Misses 1000 1000
Partials 110 110
```
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?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/1093?src=pr&el=footer). Last update [f009244...f8db650](https://codecov.io/gh/apache/apisix-dashboard/pull/1093?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 #1093: test: add frontend e2e test (edit and search route)
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #1093:
URL: https://github.com/apache/apisix-dashboard/pull/1093#discussion_r549263769
##########
File path: web/cypress/integration/route/search-route.spec.js
##########
@@ -0,0 +1,85 @@
+/*
+ * 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('Create and Search Route', () => {
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create route test1, test2, test3', () => {
+ // go to route create page
+ cy.visit('/');
+ cy.contains('Route').click();
+ for (let i = 0; i < 3; i++) {
+ cy.contains('Create').click();
+ cy.get('#name').type('test' + i);
+ cy.get('#desc').type('desc' + i);
+ cy.get('#hosts_0').type('11.11.11.11');
+ cy.contains('Next').click();
+ cy.wait(400);
+ cy.get('#nodes_0_host').type('12.12.12.12', {
+ timeout: 500
+ });
+ cy.contains('Next').click();
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.contains('SubmitSuccessfully');
+ // back to route list page
+ cy.contains('Return Route List').click();
+ cy.url().should('contains', 'routes/list');
+ }
+
+ });
+
+ it('search the route', () => {
+ cy.visit('/');
+ cy.contains('Route').click();
+ // full match
+ cy.get('[title=Name]').type('test1');
+ cy.contains('查 询').click();
Review comment:
ok, I just found the APIs, refer to
https://procomponents.ant.design/components/table#%E5%9B%BD%E9%99%85%E5%8C%96%E7%9B%B8%E5%85%B3%E7%9A%84%E9%85%8D%E7%BD%AE
----------------------------------------------------------------
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