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/18 06:25:32 UTC
[GitHub] [apisix-dashboard] idbeta opened a new pull request #1066: test: add frontend e2e test (create_and_delete_upstream)
idbeta opened a new pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066
Please answer these questions before submitting a pull request
- Why submit this pull request?
- [x] E2E
- [ ] New feature provided
- [ ] Improve performance
- Related issues
----------------------------------------------------------------
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 #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#discussion_r548815779
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,110 @@
+/*
+ * 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 Delete Upstream', () => {
+ const name = `upstreamName${new Date().valueOf()}`;
+ const sleepTime = 100; // the unit is milliseconds
+ const domSelectors = {
+ notification: '.ant-notification-notice-message'
Review comment:
Why not use a global file to contain those selector mappers?
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,110 @@
+/*
+ * 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 Delete Upstream', () => {
+ const name = `upstreamName${new Date().valueOf()}`;
+ const sleepTime = 100; // the unit is milliseconds
+ const domSelectors = {
+ notification: '.ant-notification-notice-message'
+ };
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create upstream with default type (roundrobin)', () => {
+ // go to upstream create page
+ cy.visit('/');
+ cy.contains('Upstream').click();
+ cy.wait(sleepTime * 5);
+ cy.contains('Create').click();
+
+ // input name and description
+ cy.get('#name').type(name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // input information
+ cy.get('#nodes_0_host').type('127.0.0.1');
+ cy.get('#nodes_0_port').clear().type('7000');
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.get(domSelectors.notification).should('contain', 'Create upstream successfully');
Review comment:
we could use a global file to contain those public text.
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,110 @@
+/*
+ * 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 Delete Upstream', () => {
+ const name = `upstreamName${new Date().valueOf()}`;
+ const sleepTime = 100; // the unit is milliseconds
+ const domSelectors = {
+ notification: '.ant-notification-notice-message'
+ };
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create upstream with default type (roundrobin)', () => {
+ // go to upstream create page
+ cy.visit('/');
+ cy.contains('Upstream').click();
+ cy.wait(sleepTime * 5);
+ cy.contains('Create').click();
+
+ // input name and description
+ cy.get('#name').type(name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // input information
+ cy.get('#nodes_0_host').type('127.0.0.1');
+ cy.get('#nodes_0_port').clear().type('7000');
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.get(domSelectors.notification).should('contain', 'Create upstream successfully');
+ cy.contains('Create upstream successfully');
+ cy.wait(sleepTime * 5);
+ cy.url().should('contains', 'upstream/list');
+ });
+
+ it('delete the upstream', () => {
+ cy.visit('/');
+ cy.contains('Upstream').click();
+ cy.wait(sleepTime * 5)
+ cy.contains(name).siblings().contains('Delete').click();
+ cy.contains('button', 'Confirm').click();
+ cy.get(domSelectors.notification).should('contain', 'Delete successfully');
+ });
+
+ it('create chash upstream', () => {
Review comment:
should
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,110 @@
+/*
+ * 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 Delete Upstream', () => {
+ const name = `upstreamName${new Date().valueOf()}`;
+ const sleepTime = 100; // the unit is milliseconds
+ const domSelectors = {
+ notification: '.ant-notification-notice-message'
+ };
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create upstream with default type (roundrobin)', () => {
Review comment:
should
----------------------------------------------------------------
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 #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
idbeta commented on a change in pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#discussion_r547696315
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,108 @@
+/*
+ * 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 Delete Upstream', () => {
+ const name = `upstreamName${new Date().valueOf()}`;
+ const sleepTime = 100;
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] idbeta commented on a change in pull request #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
idbeta commented on a change in pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#discussion_r547075548
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,101 @@
+/*
+ * 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 Delete Upstream', () => {
+ const root_name = `root_${new Date().valueOf()}`;
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create roundrobin upstream', () => {
+ // go to upstream create page
+ cy.visit('/upstream/create');
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 #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#issuecomment-747915461
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=h1) Report
> Merging [#1066](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=desc) (4e9ff24) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/46bf1ef9cfe4f4c659752176424151bb4fc4952f?el=desc) (46bf1ef) will **not change** coverage.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1066/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1066 +/- ##
=======================================
Coverage 41.06% 41.06%
=======================================
Files 28 28
Lines 1773 1773
=======================================
Hits 728 728
Misses 939 939
Partials 106 106
```
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?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/1066?src=pr&el=footer). Last update [46bf1ef...4e9ff24](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?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 #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#issuecomment-747915461
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=h1) Report
> Merging [#1066](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=desc) (50b1c78) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/46bf1ef9cfe4f4c659752176424151bb4fc4952f?el=desc) (46bf1ef) will **not change** coverage.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1066/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1066 +/- ##
=======================================
Coverage 41.06% 41.06%
=======================================
Files 28 28
Lines 1773 1773
=======================================
Hits 728 728
Misses 939 939
Partials 106 106
```
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?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/1066?src=pr&el=footer). Last update [46bf1ef...50b1c78](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?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 #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#issuecomment-747915461
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=h1) Report
> Merging [#1066](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=desc) (3d36e5e) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/c341e2e1ae0bf4a5d5479703365c12774b99eb75?el=desc) (c341e2e) will **not change** coverage.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1066/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1066 +/- ##
=======================================
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/1066?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/1066?src=pr&el=footer). Last update [c341e2e...3d36e5e](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?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] idbeta commented on a change in pull request #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
idbeta commented on a change in pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#discussion_r545661225
##########
File path: web/cypress/integration/route/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,102 @@
+/*
+ * 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 Delete Upstream', () => {
+ const root_name = `root_${new Date().valueOf()}`;
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create roundrobin upstream', () => {
+ // go to upstream create page
+ cy.visit('/upstream/create');
+ cy.contains('Upstream').click();
+ cy.contains('Create').click();
+
+ // input Name And Description
+ cy.get('#name').type('autotest_'+root_name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // input information
+ cy.get('#nodes_0_host').type('127.0.0.1');
+ cy.get('#nodes_0_port').clear().type('7000');
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.get('.ant-notification-notice-message').should('contain', 'Create upstream successfully');
+ cy.contains('Create upstream successfully');
+ cy.wait(1000)
+ cy.url().should('contains', 'upstream/list');
+
Review comment:
fixed.
##########
File path: web/cypress/integration/route/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,102 @@
+/*
+ * 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 Delete Upstream', () => {
+ const root_name = `root_${new Date().valueOf()}`;
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create roundrobin upstream', () => {
+ // go to upstream create page
+ cy.visit('/upstream/create');
+ cy.contains('Upstream').click();
+ cy.contains('Create').click();
+
+ // input Name And Description
+ cy.get('#name').type('autotest_'+root_name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // input information
+ cy.get('#nodes_0_host').type('127.0.0.1');
+ cy.get('#nodes_0_port').clear().type('7000');
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.get('.ant-notification-notice-message').should('contain', 'Create upstream successfully');
+ cy.contains('Create upstream successfully');
+ cy.wait(1000)
+ cy.url().should('contains', 'upstream/list');
+
+ });
+
+ it('delete the upstream', () => {
+ cy.visit('/upstream/list');
+ cy.contains(root_name).siblings().contains('Delete').click();
+ cy.contains('button', 'Confirm').click();
+ cy.get('.ant-notification-notice-message').should('contain', 'Delete successfully');
+ });
+
+ it('create chash upstream', () => {
+ // go to upstream create page
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] idbeta commented on a change in pull request #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
idbeta commented on a change in pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#discussion_r548029063
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,109 @@
+/*
+ * 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 Delete Upstream', () => {
+ const name = `upstreamName${new Date().valueOf()}`;
+ const sleepTime = 100;
+ const domSelectors = {
+ notification: '.ant-notification-notice-message'
+ };
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create roundrobin upstream', () => {
+ // go to upstream create page
+ cy.visit('/');
+ cy.contains('Upstream').click();
+ cy.wait(sleepTime*5);
+ cy.contains('Create').click();
+
+ // input Name And Description
+ cy.get('#name').type(name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // input information
+ cy.get('#nodes_0_host').type('127.0.0.1');
+ cy.get('#nodes_0_port').clear().type('7000');
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.get(domSelectors.notification).should('contain', 'Create upstream successfully');
+ cy.contains('Create upstream successfully');
+ cy.wait(sleepTime*5);
+ cy.url().should('contains', 'upstream/list');
+ });
+
+ it('delete the upstream', () => {
+ cy.visit('/');
+ cy.contains('Upstream').click();
+ cy.wait(sleepTime*5)
+ cy.contains(name).siblings().contains('Delete').click();
+ cy.contains('button', 'Confirm').click();
+ cy.get(domSelectors.notification).should('contain', 'Delete successfully');
+ });
+
+ it('create chash upstream', () => {
+ // go to upstream create page
+ cy.visit('/');
+ cy.contains('Upstream').click();
+ cy.wait(sleepTime*5);
+ cy.contains('Create').click();
+
+ // input `Name And Description`
+ cy.get('#name').type(name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // change upstream type to chash, todo: optimize the search method
Review comment:
yes, #1113 @membphis
----------------------------------------------------------------
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 #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
idbeta commented on a change in pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#discussion_r547077244
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,109 @@
+/*
+ * 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 Delete Upstream', () => {
+ const name = `upstreamName${new Date().valueOf()}`;
+ const sleepTime = 100;
+ const domSelectors = {
+ notification: '.ant-notification-notice-message'
+ };
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create roundrobin upstream', () => {
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] idbeta commented on a change in pull request #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
idbeta commented on a change in pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#discussion_r546138629
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,101 @@
+/*
+ * 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 Delete Upstream', () => {
+ const root_name = `root_${new Date().valueOf()}`;
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create roundrobin upstream', () => {
+ // go to upstream create page
+ cy.visit('/upstream/create');
+ cy.contains('Upstream').click();
+ cy.contains('Create').click();
+
+ // input Name And Description
+ cy.get('#name').type('autotest_'+root_name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // input information
+ cy.get('#nodes_0_host').type('127.0.0.1');
+ cy.get('#nodes_0_port').clear().type('7000');
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.get('.ant-notification-notice-message').should('contain', 'Create upstream successfully');
+ cy.contains('Create upstream successfully');
+ cy.wait(1000)
+ cy.url().should('contains', 'upstream/list');
+ });
+
+ it('delete the upstream', () => {
+ cy.visit('/upstream/list');
+ cy.contains(root_name).siblings().contains('Delete').click();
+ cy.contains('button', 'Confirm').click();
+ cy.get('.ant-notification-notice-message').should('contain', 'Delete successfully');
+ });
+
+ it('create chash upstream', () => {
+ // go to upstream create page
+ cy.visit('/upstream/create');
+ cy.contains('Upstream').click();
+ cy.wait(500)
+ cy.contains('Create').click();
+
+ // input `Name And Description`
+ cy.get('#name').type('autotest_'+root_name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // change upstream type to chash, todo: optimize the search method
+ cy.get('.ant-select-selection-item').click();
+ cy.wait(100)
+ cy.get('.ant-select-item:nth-child(2)').click();
+ cy.get('#hash_on').click();
+ cy.wait(100)
+ cy.get('.ant-select-item-option-active:nth-child(1) > .ant-select-item-option-content').click();
+ cy.get('#key').click();
+ cy.wait(100)
+ cy.get('div:nth-child(8) .ant-select-item:nth-child(1) > .ant-select-item-option-content:nth-child(1)').click();
+
Review comment:
ok,I have marked `todo: optimize the search method`, @LiteSun you can help me, if you are free.
----------------------------------------------------------------
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 #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
idbeta commented on a change in pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#discussion_r547075484
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,101 @@
+/*
+ * 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 Delete Upstream', () => {
+ const root_name = `root_${new Date().valueOf()}`;
Review comment:
This `name` is used to define a unique mark for identifying the `Upstream` below.
----------------------------------------------------------------
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 #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
membphis commented on a change in pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#discussion_r547993790
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,109 @@
+/*
+ * 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 Delete Upstream', () => {
+ const name = `upstreamName${new Date().valueOf()}`;
+ const sleepTime = 100;
+ const domSelectors = {
+ notification: '.ant-notification-notice-message'
+ };
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create roundrobin upstream', () => {
+ // go to upstream create page
+ cy.visit('/');
+ cy.contains('Upstream').click();
+ cy.wait(sleepTime*5);
+ cy.contains('Create').click();
+
+ // input Name And Description
+ cy.get('#name').type(name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // input information
+ cy.get('#nodes_0_host').type('127.0.0.1');
+ cy.get('#nodes_0_port').clear().type('7000');
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.get(domSelectors.notification).should('contain', 'Create upstream successfully');
+ cy.contains('Create upstream successfully');
+ cy.wait(sleepTime*5);
+ cy.url().should('contains', 'upstream/list');
+ });
+
+ it('delete the upstream', () => {
+ cy.visit('/');
+ cy.contains('Upstream').click();
+ cy.wait(sleepTime*5)
+ cy.contains(name).siblings().contains('Delete').click();
+ cy.contains('button', 'Confirm').click();
+ cy.get(domSelectors.notification).should('contain', 'Delete successfully');
+ });
+
+ it('create chash upstream', () => {
+ // go to upstream create page
+ cy.visit('/');
+ cy.contains('Upstream').click();
+ cy.wait(sleepTime*5);
+ cy.contains('Create').click();
+
+ // input `Name And Description`
+ cy.get('#name').type(name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // change upstream type to chash, todo: optimize the search method
Review comment:
@idbeta do you have created a todo issue for this comment?
we can fix it in a 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 pull request #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#issuecomment-751212011
Please resolve those todos in another PR.
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] membphis commented on a change in pull request #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
membphis commented on a change in pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#discussion_r545599851
##########
File path: web/cypress/integration/route/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,102 @@
+/*
+ * 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 Delete Upstream', () => {
+ const root_name = `root_${new Date().valueOf()}`;
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create roundrobin upstream', () => {
+ // go to upstream create page
+ cy.visit('/upstream/create');
+ cy.contains('Upstream').click();
+ cy.contains('Create').click();
+
+ // input Name And Description
+ cy.get('#name').type('autotest_'+root_name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // input information
+ cy.get('#nodes_0_host').type('127.0.0.1');
+ cy.get('#nodes_0_port').clear().type('7000');
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.get('.ant-notification-notice-message').should('contain', 'Create upstream successfully');
+ cy.contains('Create upstream successfully');
+ cy.wait(1000)
+ cy.url().should('contains', 'upstream/list');
+
Review comment:
style: remove this blank line
##########
File path: web/cypress/integration/route/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,102 @@
+/*
+ * 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 Delete Upstream', () => {
+ const root_name = `root_${new Date().valueOf()}`;
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create roundrobin upstream', () => {
+ // go to upstream create page
+ cy.visit('/upstream/create');
+ cy.contains('Upstream').click();
+ cy.contains('Create').click();
+
+ // input Name And Description
+ cy.get('#name').type('autotest_'+root_name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // input information
+ cy.get('#nodes_0_host').type('127.0.0.1');
+ cy.get('#nodes_0_port').clear().type('7000');
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.get('.ant-notification-notice-message').should('contain', 'Create upstream successfully');
+ cy.contains('Create upstream successfully');
+ cy.wait(1000)
+ cy.url().should('contains', 'upstream/list');
+
+ });
+
+ it('delete the upstream', () => {
+ cy.visit('/upstream/list');
+ cy.contains(root_name).siblings().contains('Delete').click();
+ cy.contains('button', 'Confirm').click();
+ cy.get('.ant-notification-notice-message').should('contain', 'Delete successfully');
+ });
+
+ it('create chash upstream', () => {
+ // go to upstream create page
+ cy.visit('/upstream/create');
+ cy.contains('Upstream').click();
+ cy.wait(500)
+ cy.contains('Create').click();
+
+ // input Name And Description
Review comment:
please use one style
##########
File path: web/cypress/integration/route/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,102 @@
+/*
+ * 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 Delete Upstream', () => {
+ const root_name = `root_${new Date().valueOf()}`;
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create roundrobin upstream', () => {
+ // go to upstream create page
+ cy.visit('/upstream/create');
+ cy.contains('Upstream').click();
+ cy.contains('Create').click();
+
+ // input Name And Description
+ cy.get('#name').type('autotest_'+root_name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // input information
+ cy.get('#nodes_0_host').type('127.0.0.1');
+ cy.get('#nodes_0_port').clear().type('7000');
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.get('.ant-notification-notice-message').should('contain', 'Create upstream successfully');
+ cy.contains('Create upstream successfully');
+ cy.wait(1000)
+ cy.url().should('contains', 'upstream/list');
+
+ });
+
+ it('delete the upstream', () => {
+ cy.visit('/upstream/list');
+ cy.contains(root_name).siblings().contains('Delete').click();
+ cy.contains('button', 'Confirm').click();
+ cy.get('.ant-notification-notice-message').should('contain', 'Delete successfully');
+ });
+
+ it('create chash upstream', () => {
+ // go to upstream create page
+ cy.visit('/upstream/create');
+ cy.contains('Upstream').click();
+ cy.wait(500)
+ cy.contains('Create').click();
+
+ // input Name And Description
+ cy.get('#name').type('autotest_'+root_name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // change type, todo: optimize the search method
+ cy.get('.ant-select-selection-item').click();
+ cy.wait(100)
+ cy.get('.ant-select-item:nth-child(2)').click();
+ cy.get('#hash_on').click();
+ cy.wait(100)
+ cy.get('.ant-select-item-option-active:nth-child(1) > .ant-select-item-option-content').click();
+ cy.get('#key').click();
+ cy.wait(100)
+ cy.get('div:nth-child(8) .ant-select-item:nth-child(1) > .ant-select-item-option-content:nth-child(1)').click();
+
+ // input information
Review comment:
need a clear title
##########
File path: web/cypress/integration/route/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,102 @@
+/*
+ * 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 Delete Upstream', () => {
+ const root_name = `root_${new Date().valueOf()}`;
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create roundrobin upstream', () => {
+ // go to upstream create page
+ cy.visit('/upstream/create');
+ cy.contains('Upstream').click();
+ cy.contains('Create').click();
+
+ // input Name And Description
+ cy.get('#name').type('autotest_'+root_name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // input information
+ cy.get('#nodes_0_host').type('127.0.0.1');
+ cy.get('#nodes_0_port').clear().type('7000');
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.get('.ant-notification-notice-message').should('contain', 'Create upstream successfully');
+ cy.contains('Create upstream successfully');
+ cy.wait(1000)
+ cy.url().should('contains', 'upstream/list');
+
+ });
+
+ it('delete the upstream', () => {
+ cy.visit('/upstream/list');
+ cy.contains(root_name).siblings().contains('Delete').click();
+ cy.contains('button', 'Confirm').click();
+ cy.get('.ant-notification-notice-message').should('contain', 'Delete successfully');
+ });
+
+ it('create chash upstream', () => {
+ // go to upstream create page
+ cy.visit('/upstream/create');
+ cy.contains('Upstream').click();
+ cy.wait(500)
+ cy.contains('Create').click();
+
+ // input Name And Description
+ cy.get('#name').type('autotest_'+root_name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // change type, todo: optimize the search method
Review comment:
`change type`? not clear
##########
File path: web/cypress/integration/route/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,102 @@
+/*
+ * 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 Delete Upstream', () => {
+ const root_name = `root_${new Date().valueOf()}`;
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create roundrobin upstream', () => {
+ // go to upstream create page
+ cy.visit('/upstream/create');
+ cy.contains('Upstream').click();
+ cy.contains('Create').click();
+
+ // input Name And Description
+ cy.get('#name').type('autotest_'+root_name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // input information
+ cy.get('#nodes_0_host').type('127.0.0.1');
+ cy.get('#nodes_0_port').clear().type('7000');
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.get('.ant-notification-notice-message').should('contain', 'Create upstream successfully');
+ cy.contains('Create upstream successfully');
+ cy.wait(1000)
+ cy.url().should('contains', 'upstream/list');
+
+ });
+
+ it('delete the upstream', () => {
+ cy.visit('/upstream/list');
+ cy.contains(root_name).siblings().contains('Delete').click();
+ cy.contains('button', 'Confirm').click();
+ cy.get('.ant-notification-notice-message').should('contain', 'Delete successfully');
+ });
+
+ it('create chash upstream', () => {
+ // go to upstream create page
Review comment:
style: one space
##########
File path: web/cypress/integration/route/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,102 @@
+/*
+ * 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 Delete Upstream', () => {
+ const root_name = `root_${new Date().valueOf()}`;
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create roundrobin upstream', () => {
+ // go to upstream create page
+ cy.visit('/upstream/create');
+ cy.contains('Upstream').click();
+ cy.contains('Create').click();
+
+ // input Name And Description
+ cy.get('#name').type('autotest_'+root_name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // input information
+ cy.get('#nodes_0_host').type('127.0.0.1');
+ cy.get('#nodes_0_port').clear().type('7000');
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.get('.ant-notification-notice-message').should('contain', 'Create upstream successfully');
+ cy.contains('Create upstream successfully');
+ cy.wait(1000)
+ cy.url().should('contains', 'upstream/list');
+
+ });
+
+ it('delete the upstream', () => {
+ cy.visit('/upstream/list');
+ cy.contains(root_name).siblings().contains('Delete').click();
+ cy.contains('button', 'Confirm').click();
+ cy.get('.ant-notification-notice-message').should('contain', 'Delete successfully');
+ });
+
+ it('create chash upstream', () => {
+ // go to upstream create page
+ cy.visit('/upstream/create');
+ cy.contains('Upstream').click();
+ cy.wait(500)
+ cy.contains('Create').click();
+
+ // input Name And Description
+ cy.get('#name').type('autotest_'+root_name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // change type, todo: optimize the search method
+ cy.get('.ant-select-selection-item').click();
+ cy.wait(100)
+ cy.get('.ant-select-item:nth-child(2)').click();
+ cy.get('#hash_on').click();
+ cy.wait(100)
+ cy.get('.ant-select-item-option-active:nth-child(1) > .ant-select-item-option-content').click();
+ cy.get('#key').click();
+ cy.wait(100)
+ cy.get('div:nth-child(8) .ant-select-item:nth-child(1) > .ant-select-item-option-content:nth-child(1)').click();
+
+ // input information
+ // add 1 node
Review comment:
how about `add first upstream node`?
need a clear title for each step
----------------------------------------------------------------
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 #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
idbeta commented on a change in pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#discussion_r546137086
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,101 @@
+/*
+ * 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 Delete Upstream', () => {
+ const root_name = `root_${new Date().valueOf()}`;
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create roundrobin upstream', () => {
+ // go to upstream create page
+ cy.visit('/upstream/create');
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] idbeta commented on a change in pull request #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
idbeta commented on a change in pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#discussion_r545662543
##########
File path: web/cypress/integration/route/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,102 @@
+/*
+ * 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 Delete Upstream', () => {
+ const root_name = `root_${new Date().valueOf()}`;
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create roundrobin upstream', () => {
+ // go to upstream create page
+ cy.visit('/upstream/create');
+ cy.contains('Upstream').click();
+ cy.contains('Create').click();
+
+ // input Name And Description
+ cy.get('#name').type('autotest_'+root_name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // input information
+ cy.get('#nodes_0_host').type('127.0.0.1');
+ cy.get('#nodes_0_port').clear().type('7000');
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.get('.ant-notification-notice-message').should('contain', 'Create upstream successfully');
+ cy.contains('Create upstream successfully');
+ cy.wait(1000)
+ cy.url().should('contains', 'upstream/list');
+
+ });
+
+ it('delete the upstream', () => {
+ cy.visit('/upstream/list');
+ cy.contains(root_name).siblings().contains('Delete').click();
+ cy.contains('button', 'Confirm').click();
+ cy.get('.ant-notification-notice-message').should('contain', 'Delete successfully');
+ });
+
+ it('create chash upstream', () => {
+ // go to upstream create page
+ cy.visit('/upstream/create');
+ cy.contains('Upstream').click();
+ cy.wait(500)
+ cy.contains('Create').click();
+
+ // input Name And Description
+ cy.get('#name').type('autotest_'+root_name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // change type, todo: optimize the search method
Review comment:
fixed.
##########
File path: web/cypress/integration/route/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,102 @@
+/*
+ * 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 Delete Upstream', () => {
+ const root_name = `root_${new Date().valueOf()}`;
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create roundrobin upstream', () => {
+ // go to upstream create page
+ cy.visit('/upstream/create');
+ cy.contains('Upstream').click();
+ cy.contains('Create').click();
+
+ // input Name And Description
+ cy.get('#name').type('autotest_'+root_name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // input information
+ cy.get('#nodes_0_host').type('127.0.0.1');
+ cy.get('#nodes_0_port').clear().type('7000');
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.get('.ant-notification-notice-message').should('contain', 'Create upstream successfully');
+ cy.contains('Create upstream successfully');
+ cy.wait(1000)
+ cy.url().should('contains', 'upstream/list');
+
+ });
+
+ it('delete the upstream', () => {
+ cy.visit('/upstream/list');
+ cy.contains(root_name).siblings().contains('Delete').click();
+ cy.contains('button', 'Confirm').click();
+ cy.get('.ant-notification-notice-message').should('contain', 'Delete successfully');
+ });
+
+ it('create chash upstream', () => {
+ // go to upstream create page
+ cy.visit('/upstream/create');
+ cy.contains('Upstream').click();
+ cy.wait(500)
+ cy.contains('Create').click();
+
+ // input Name And Description
+ cy.get('#name').type('autotest_'+root_name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // change type, todo: optimize the search method
+ cy.get('.ant-select-selection-item').click();
+ cy.wait(100)
+ cy.get('.ant-select-item:nth-child(2)').click();
+ cy.get('#hash_on').click();
+ cy.wait(100)
+ cy.get('.ant-select-item-option-active:nth-child(1) > .ant-select-item-option-content').click();
+ cy.get('#key').click();
+ cy.wait(100)
+ cy.get('div:nth-child(8) .ant-select-item:nth-child(1) > .ant-select-item-option-content:nth-child(1)').click();
+
+ // input information
+ // add 1 node
Review comment:
fixed.
##########
File path: web/cypress/integration/route/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,102 @@
+/*
+ * 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 Delete Upstream', () => {
+ const root_name = `root_${new Date().valueOf()}`;
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create roundrobin upstream', () => {
+ // go to upstream create page
+ cy.visit('/upstream/create');
+ cy.contains('Upstream').click();
+ cy.contains('Create').click();
+
+ // input Name And Description
+ cy.get('#name').type('autotest_'+root_name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // input information
+ cy.get('#nodes_0_host').type('127.0.0.1');
+ cy.get('#nodes_0_port').clear().type('7000');
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.get('.ant-notification-notice-message').should('contain', 'Create upstream successfully');
+ cy.contains('Create upstream successfully');
+ cy.wait(1000)
+ cy.url().should('contains', 'upstream/list');
+
+ });
+
+ it('delete the upstream', () => {
+ cy.visit('/upstream/list');
+ cy.contains(root_name).siblings().contains('Delete').click();
+ cy.contains('button', 'Confirm').click();
+ cy.get('.ant-notification-notice-message').should('contain', 'Delete successfully');
+ });
+
+ it('create chash upstream', () => {
+ // go to upstream create page
+ cy.visit('/upstream/create');
+ cy.contains('Upstream').click();
+ cy.wait(500)
+ cy.contains('Create').click();
+
+ // input Name And Description
+ cy.get('#name').type('autotest_'+root_name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // change type, todo: optimize the search method
+ cy.get('.ant-select-selection-item').click();
+ cy.wait(100)
+ cy.get('.ant-select-item:nth-child(2)').click();
+ cy.get('#hash_on').click();
+ cy.wait(100)
+ cy.get('.ant-select-item-option-active:nth-child(1) > .ant-select-item-option-content').click();
+ cy.get('#key').click();
+ cy.wait(100)
+ cy.get('div:nth-child(8) .ant-select-item:nth-child(1) > .ant-select-item-option-content:nth-child(1)').click();
+
+ // input information
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] idbeta commented on a change in pull request #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
idbeta commented on a change in pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#discussion_r548829791
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,110 @@
+/*
+ * 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 Delete Upstream', () => {
+ const name = `upstreamName${new Date().valueOf()}`;
+ const sleepTime = 100; // the unit is milliseconds
+ const domSelectors = {
+ notification: '.ant-notification-notice-message'
+ };
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create upstream with default type (roundrobin)', () => {
+ // go to upstream create page
+ cy.visit('/');
+ cy.contains('Upstream').click();
+ cy.wait(sleepTime * 5);
+ cy.contains('Create').click();
+
+ // input name and description
+ cy.get('#name').type(name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // input information
+ cy.get('#nodes_0_host').type('127.0.0.1');
+ cy.get('#nodes_0_port').clear().type('7000');
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.get(domSelectors.notification).should('contain', 'Create upstream successfully');
Review comment:
agree, this will be carried out in another 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] moonming commented on a change in pull request #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
moonming commented on a change in pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#discussion_r545961566
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,101 @@
+/*
+ * 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 Delete Upstream', () => {
+ const root_name = `root_${new Date().valueOf()}`;
Review comment:
what is `root_name`?
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,101 @@
+/*
+ * 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 Delete Upstream', () => {
+ const root_name = `root_${new Date().valueOf()}`;
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create roundrobin upstream', () => {
+ // go to upstream create page
+ cy.visit('/upstream/create');
+ cy.contains('Upstream').click();
+ cy.contains('Create').click();
+
+ // input Name And Description
+ cy.get('#name').type('autotest_'+root_name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // input information
+ cy.get('#nodes_0_host').type('127.0.0.1');
+ cy.get('#nodes_0_port').clear().type('7000');
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.get('.ant-notification-notice-message').should('contain', 'Create upstream successfully');
+ cy.contains('Create upstream successfully');
+ cy.wait(1000)
+ cy.url().should('contains', 'upstream/list');
+ });
+
+ it('delete the upstream', () => {
+ cy.visit('/upstream/list');
+ cy.contains(root_name).siblings().contains('Delete').click();
+ cy.contains('button', 'Confirm').click();
+ cy.get('.ant-notification-notice-message').should('contain', 'Delete successfully');
+ });
+
+ it('create chash upstream', () => {
+ // go to upstream create page
+ cy.visit('/upstream/create');
+ cy.contains('Upstream').click();
+ cy.wait(500)
+ cy.contains('Create').click();
+
+ // input `Name And Description`
+ cy.get('#name').type('autotest_'+root_name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // change upstream type to chash, todo: optimize the search method
+ cy.get('.ant-select-selection-item').click();
+ cy.wait(100)
+ cy.get('.ant-select-item:nth-child(2)').click();
+ cy.get('#hash_on').click();
+ cy.wait(100)
+ cy.get('.ant-select-item-option-active:nth-child(1) > .ant-select-item-option-content').click();
+ cy.get('#key').click();
+ cy.wait(100)
+ cy.get('div:nth-child(8) .ant-select-item:nth-child(1) > .ant-select-item-option-content:nth-child(1)').click();
+
Review comment:
Can't understand
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,101 @@
+/*
+ * 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 Delete Upstream', () => {
+ const root_name = `root_${new Date().valueOf()}`;
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create roundrobin upstream', () => {
+ // go to upstream create page
+ cy.visit('/upstream/create');
Review comment:
No, we should click button to visit upstream page.
----------------------------------------------------------------
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 #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
idbeta commented on a change in pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#discussion_r547724259
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,108 @@
+/*
+ * 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 Delete Upstream', () => {
+ const name = `upstreamName${new Date().valueOf()}`;
+ const sleepTime = 100;
+ const domSelectors = {
+ notification: '.ant-notification-notice-message'
+ };
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create roundrobin upstream', () => {
+ // go to upstream create page
+ cy.visit('/');
+ cy.contains('Upstream').click();
+ cy.wait(sleepTime * 5);
+ cy.contains('Create').click();
+
+ // input name and description
+ cy.get('#name').type(name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // input information
+ cy.get('#nodes_0_host').type('127.0.0.1');
+ cy.get('#nodes_0_port').clear().type('7000');
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.get(domSelectors.notification).should('contain', 'Create upstream successfully');
+ cy.contains('Create upstream successfully');
+ cy.wait(sleepTime * 5);
+ cy.url().should('contains', 'upstream/list');
+ });
+
+ it('delete the upstream', () => {
+ cy.visit('/');
+ cy.contains('Upstream').click();
+ cy.wait(sleepTime * 5)
+ cy.contains(name).siblings().contains('Delete').click();
+ cy.contains('button', 'Confirm').click();
+ cy.get(domSelectors.notification).should('contain', 'Delete successfully');
+ });
+
+ it('create chash upstream', () => {
+ // go to upstream create page
+ cy.visit('/');
+ cy.contains('Upstream').click();
+ cy.wait(sleepTime * 5);
+ cy.contains('Create').click();
+
+ // input name and description
+ cy.get('#name').type(name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // change upstream type to chash, todo: optimize the search method
+ cy.get('[title=roundrobin]').click();
+ cy.wait(sleepTime);
+ cy.get('.ant-select-item:nth-child(2)').click();
+ cy.get('#hash_on').click();
+ cy.wait(sleepTime);
+ cy.get('.ant-select-item-option-active:nth-child(1) > .ant-select-item-option-content').click();
+ cy.get('#key').click();
+ cy.wait(sleepTime);
+ cy.get('div:nth-child(8) .ant-select-item:nth-child(1) > .ant-select-item-option-content:nth-child(1)').click();
+
+ // add first upstream node
+ cy.get('#nodes_0_host').type('127.0.0.1');
+ cy.get('#nodes_0_port').clear().type('7000');
+ // add second upstream node
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 #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#issuecomment-747915461
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=h1) Report
> Merging [#1066](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=desc) (31c4bdf) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/b3819c5ae939c9c0b0e55958718c9292eb895555?el=desc) (b3819c5) will **not change** coverage.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1066/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1066 +/- ##
=======================================
Coverage 41.72% 41.72%
=======================================
Files 29 29
Lines 1819 1819
=======================================
Hits 759 759
Misses 951 951
Partials 109 109
```
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?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/1066?src=pr&el=footer). Last update [b3819c5...31c4bdf](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?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 #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#issuecomment-747915461
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=h1) Report
> Merging [#1066](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=desc) (10df523) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/46bf1ef9cfe4f4c659752176424151bb4fc4952f?el=desc) (46bf1ef) will **not change** coverage.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1066/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1066 +/- ##
=======================================
Coverage 41.06% 41.06%
=======================================
Files 28 28
Lines 1773 1773
=======================================
Hits 728 728
Misses 939 939
Partials 106 106
```
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?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/1066?src=pr&el=footer). Last update [46bf1ef...10df523](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?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 #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#issuecomment-747915461
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=h1) Report
> Merging [#1066](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=desc) (2ea5c6d) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/565de4d0b7b87b4b33b7cb914a91db18bbb49ced?el=desc) (565de4d) will **not change** coverage.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1066/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1066 +/- ##
=======================================
Coverage 40.13% 40.13%
=======================================
Files 27 27
Lines 1637 1637
=======================================
Hits 657 657
Misses 880 880
Partials 100 100
```
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?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/1066?src=pr&el=footer). Last update [565de4d...2ea5c6d](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?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] idbeta commented on a change in pull request #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
idbeta commented on a change in pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#discussion_r547725745
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,108 @@
+/*
+ * 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 Delete Upstream', () => {
+ const name = `upstreamName${new Date().valueOf()}`;
+ const sleepTime = 100;
+ const domSelectors = {
+ notification: '.ant-notification-notice-message'
+ };
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create roundrobin upstream', () => {
Review comment:
The default value is `roundrobin`, when real users use `roundrobin`, they will not click and select again.
----------------------------------------------------------------
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 #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
idbeta commented on a change in pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#discussion_r548831019
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,110 @@
+/*
+ * 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 Delete Upstream', () => {
+ const name = `upstreamName${new Date().valueOf()}`;
+ const sleepTime = 100; // the unit is milliseconds
+ const domSelectors = {
+ notification: '.ant-notification-notice-message'
+ };
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create upstream with default type (roundrobin)', () => {
+ // go to upstream create page
+ cy.visit('/');
+ cy.contains('Upstream').click();
+ cy.wait(sleepTime * 5);
+ cy.contains('Create').click();
+
+ // input name and description
+ cy.get('#name').type(name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // input information
+ cy.get('#nodes_0_host').type('127.0.0.1');
+ cy.get('#nodes_0_port').clear().type('7000');
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.get(domSelectors.notification).should('contain', 'Create upstream successfully');
+ cy.contains('Create upstream successfully');
+ cy.wait(sleepTime * 5);
+ cy.url().should('contains', 'upstream/list');
+ });
+
+ it('delete the upstream', () => {
+ cy.visit('/');
+ cy.contains('Upstream').click();
+ cy.wait(sleepTime * 5)
+ cy.contains(name).siblings().contains('Delete').click();
+ cy.contains('button', 'Confirm').click();
+ cy.get(domSelectors.notification).should('contain', 'Delete successfully');
+ });
+
+ it('create chash upstream', () => {
Review comment:
fixed.
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,110 @@
+/*
+ * 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 Delete Upstream', () => {
+ const name = `upstreamName${new Date().valueOf()}`;
+ const sleepTime = 100; // the unit is milliseconds
+ const domSelectors = {
+ notification: '.ant-notification-notice-message'
+ };
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create upstream with default type (roundrobin)', () => {
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] juzhiyuan merged pull request #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
juzhiyuan merged pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066
----------------------------------------------------------------
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 #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#issuecomment-747915461
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=h1) Report
> Merging [#1066](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=desc) (372a11c) 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`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1066/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1066 +/- ##
==========================================
+ 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/1066?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1066/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/1066?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/1066?src=pr&el=footer). Last update [1fa884a...372a11c](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?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] idbeta commented on a change in pull request #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
idbeta commented on a change in pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#discussion_r546136782
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,101 @@
+/*
+ * 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 Delete Upstream', () => {
+ const root_name = `root_${new Date().valueOf()}`;
Review comment:
please check the first e2e example, it is written like this, since it was approved, I think the following e2e can be written like this.
----------------------------------------------------------------
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 #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
idbeta commented on a change in pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#discussion_r547727677
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,108 @@
+/*
+ * 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 Delete Upstream', () => {
+ const name = `upstreamName${new Date().valueOf()}`;
+ const sleepTime = 100;
+ const domSelectors = {
+ notification: '.ant-notification-notice-message'
+ };
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create roundrobin upstream', () => {
Review comment:
it's not default setting, i have change name, desc, node ip, node port.
----------------------------------------------------------------
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 #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#issuecomment-747915461
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=h1) Report
> Merging [#1066](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=desc) (e6fa8be) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/4b894cfd3fb7280b500249b9f6457d04867c42d9?el=desc) (4b894cf) will **decrease** coverage by `0.05%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1066/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1066 +/- ##
==========================================
- Coverage 41.06% 41.00% -0.06%
==========================================
Files 28 28
Lines 1773 1773
==========================================
- Hits 728 727 -1
- Misses 939 940 +1
Partials 106 106
```
| [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1066/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=) | `78.57% <0.00%> (-0.65%)` | :arrow_down: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?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/1066?src=pr&el=footer). Last update [4b894cf...e6fa8be](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?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 #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#issuecomment-747915461
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=h1) Report
> Merging [#1066](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=desc) (25b5487) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/e0af89e7df02de137aeac3d4bad53cf2efde41c6?el=desc) (e0af89e) will **increase** coverage by `0.05%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1066/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1066 +/- ##
==========================================
+ Coverage 41.67% 41.72% +0.05%
==========================================
Files 29 29
Lines 1819 1819
==========================================
+ Hits 758 759 +1
+ Misses 952 951 -1
Partials 109 109
```
| [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1066/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/1066?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/1066?src=pr&el=footer). Last update [e0af89e...25b5487](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?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 edited a comment on pull request #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
juzhiyuan edited a comment on pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#issuecomment-751212011
Please resolve those todos in another PR.
---
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] membphis commented on a change in pull request #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
membphis commented on a change in pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#discussion_r547639576
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,101 @@
+/*
+ * 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 Delete Upstream', () => {
+ const root_name = `root_${new Date().valueOf()}`;
Review comment:
@idbeta your answer is not enough.
why we need a unique mark for this case?
----------------------------------------------------------------
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 #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
idbeta commented on a change in pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#discussion_r545662349
##########
File path: web/cypress/integration/route/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,102 @@
+/*
+ * 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 Delete Upstream', () => {
+ const root_name = `root_${new Date().valueOf()}`;
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create roundrobin upstream', () => {
+ // go to upstream create page
+ cy.visit('/upstream/create');
+ cy.contains('Upstream').click();
+ cy.contains('Create').click();
+
+ // input Name And Description
+ cy.get('#name').type('autotest_'+root_name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // input information
+ cy.get('#nodes_0_host').type('127.0.0.1');
+ cy.get('#nodes_0_port').clear().type('7000');
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.get('.ant-notification-notice-message').should('contain', 'Create upstream successfully');
+ cy.contains('Create upstream successfully');
+ cy.wait(1000)
+ cy.url().should('contains', 'upstream/list');
+
+ });
+
+ it('delete the upstream', () => {
+ cy.visit('/upstream/list');
+ cy.contains(root_name).siblings().contains('Delete').click();
+ cy.contains('button', 'Confirm').click();
+ cy.get('.ant-notification-notice-message').should('contain', 'Delete successfully');
+ });
+
+ it('create chash upstream', () => {
+ // go to upstream create page
+ cy.visit('/upstream/create');
+ cy.contains('Upstream').click();
+ cy.wait(500)
+ cy.contains('Create').click();
+
+ // input Name And Description
Review comment:
fixed. `Name And Description` is the title of the page, I think it's clear?
----------------------------------------------------------------
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 #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#issuecomment-747915461
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=h1) Report
> Merging [#1066](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=desc) (aa2be78) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/2b1a19ecc93acb8fcfedb8455392f4e6a6c6edcb?el=desc) (2b1a19e) will **not change** coverage.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1066/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1066 +/- ##
=======================================
Coverage 40.13% 40.13%
=======================================
Files 26 26
Lines 1572 1572
=======================================
Hits 631 631
Misses 850 850
Partials 91 91
```
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?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/1066?src=pr&el=footer). Last update [2b1a19e...aa2be78](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?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 #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#issuecomment-747915461
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=h1) Report
> Merging [#1066](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=desc) (a99940a) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/565de4d0b7b87b4b33b7cb914a91db18bbb49ced?el=desc) (565de4d) will **decrease** coverage by `0.86%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1066/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1066 +/- ##
==========================================
- Coverage 40.13% 39.27% -0.87%
==========================================
Files 27 27
Lines 1637 1673 +36
==========================================
Hits 657 657
- Misses 880 916 +36
Partials 100 100
```
| [Impacted Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [api/internal/handler/route/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1066/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGUvcm91dGUuZ28=) | `41.81% <0.00%> (-3.96%)` | :arrow_down: |
| [api/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1066/diff?src=pr&el=tree#diff-YXBpL2ZpbHRlci9zY2hlbWEuZ28=) | `0.00% <0.00%> (ø)` | |
| [api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1066/diff?src=pr&el=tree#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==) | `0.00% <0.00%> (ø)` | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?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/1066?src=pr&el=footer). Last update [565de4d...a99940a](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?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 #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#issuecomment-747915461
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=h1) Report
> Merging [#1066](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=desc) (ed8dd83) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/46bf1ef9cfe4f4c659752176424151bb4fc4952f?el=desc) (46bf1ef) will **not change** coverage.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1066/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1066 +/- ##
=======================================
Coverage 41.06% 41.06%
=======================================
Files 28 28
Lines 1773 1773
=======================================
Hits 728 728
Misses 939 939
Partials 106 106
```
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?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/1066?src=pr&el=footer). Last update [46bf1ef...ed8dd83](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?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] idbeta commented on a change in pull request #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
idbeta commented on a change in pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#discussion_r547985346
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,108 @@
+/*
+ * 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 Delete Upstream', () => {
+ const name = `upstreamName${new Date().valueOf()}`;
+ const sleepTime = 100;
+ const domSelectors = {
+ notification: '.ant-notification-notice-message'
+ };
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create roundrobin upstream', () => {
Review comment:
I got your point, 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 #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#issuecomment-747915461
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=h1) Report
> Merging [#1066](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=desc) (a518452) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/4b894cfd3fb7280b500249b9f6457d04867c42d9?el=desc) (4b894cf) will **not change** coverage.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1066/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1066 +/- ##
=======================================
Coverage 41.06% 41.06%
=======================================
Files 28 28
Lines 1773 1773
=======================================
Hits 728 728
Misses 939 939
Partials 106 106
```
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?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/1066?src=pr&el=footer). Last update [4b894cf...a518452](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?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 pull request #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#issuecomment-751190129
After those PRs were merged, we need to:
- [ ] Use a global file to contain global variables;
- [ ] We should use `it should xxx` instead of `it creates xxx`;
----------------------------------------------------------------
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 #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#issuecomment-747915461
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=h1) Report
> Merging [#1066](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=desc) (85be9c8) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/4b894cfd3fb7280b500249b9f6457d04867c42d9?el=desc) (4b894cf) will **not change** coverage.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1066/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1066 +/- ##
=======================================
Coverage 41.06% 41.06%
=======================================
Files 28 28
Lines 1773 1773
=======================================
Hits 728 728
Misses 939 939
Partials 106 106
```
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?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/1066?src=pr&el=footer). Last update [4b894cf...85be9c8](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?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 #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#issuecomment-747915461
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=h1) Report
> Merging [#1066](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=desc) (afbc645) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/e0af89e7df02de137aeac3d4bad53cf2efde41c6?el=desc) (e0af89e) will **not change** coverage.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1066/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1066 +/- ##
=======================================
Coverage 41.67% 41.67%
=======================================
Files 29 29
Lines 1819 1819
=======================================
Hits 758 758
Misses 952 952
Partials 109 109
```
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?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/1066?src=pr&el=footer). Last update [e0af89e...afbc645](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?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 #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#issuecomment-747915461
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=h1) Report
> Merging [#1066](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=desc) (983dfbb) 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`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1066/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1066 +/- ##
==========================================
- 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/1066?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1066/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/1066?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/1066?src=pr&el=footer). Last update [47e5345...983dfbb](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?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 #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#issuecomment-747915461
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=h1) Report
> Merging [#1066](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=desc) (942dace) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/e594fc076f076d92b427cfef6004400a9ada301c?el=desc) (e594fc0) will **not change** coverage.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1066/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1066 +/- ##
=======================================
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/1066?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/1066?src=pr&el=footer). Last update [e594fc0...942dace](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?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 #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
membphis commented on a change in pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#discussion_r547643536
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,108 @@
+/*
+ * 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 Delete Upstream', () => {
+ const name = `upstreamName${new Date().valueOf()}`;
+ const sleepTime = 100;
Review comment:
need a comment, what is the unit? `sec` or `ms`?
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,108 @@
+/*
+ * 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 Delete Upstream', () => {
+ const name = `upstreamName${new Date().valueOf()}`;
+ const sleepTime = 100;
+ const domSelectors = {
+ notification: '.ant-notification-notice-message'
+ };
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create roundrobin upstream', () => {
+ // go to upstream create page
+ cy.visit('/');
+ cy.contains('Upstream').click();
+ cy.wait(sleepTime * 5);
+ cy.contains('Create').click();
+
+ // input name and description
+ cy.get('#name').type(name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // input information
+ cy.get('#nodes_0_host').type('127.0.0.1');
+ cy.get('#nodes_0_port').clear().type('7000');
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.get(domSelectors.notification).should('contain', 'Create upstream successfully');
+ cy.contains('Create upstream successfully');
+ cy.wait(sleepTime * 5);
+ cy.url().should('contains', 'upstream/list');
+ });
+
+ it('delete the upstream', () => {
+ cy.visit('/');
+ cy.contains('Upstream').click();
+ cy.wait(sleepTime * 5)
+ cy.contains(name).siblings().contains('Delete').click();
+ cy.contains('button', 'Confirm').click();
+ cy.get(domSelectors.notification).should('contain', 'Delete successfully');
+ });
+
+ it('create chash upstream', () => {
+ // go to upstream create page
+ cy.visit('/');
+ cy.contains('Upstream').click();
+ cy.wait(sleepTime * 5);
+ cy.contains('Create').click();
+
+ // input name and description
+ cy.get('#name').type(name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // change upstream type to chash, todo: optimize the search method
+ cy.get('[title=roundrobin]').click();
+ cy.wait(sleepTime);
+ cy.get('.ant-select-item:nth-child(2)').click();
+ cy.get('#hash_on').click();
+ cy.wait(sleepTime);
+ cy.get('.ant-select-item-option-active:nth-child(1) > .ant-select-item-option-content').click();
+ cy.get('#key').click();
+ cy.wait(sleepTime);
+ cy.get('div:nth-child(8) .ant-select-item:nth-child(1) > .ant-select-item-option-content:nth-child(1)').click();
+
+ // add first upstream node
+ cy.get('#nodes_0_host').type('127.0.0.1');
+ cy.get('#nodes_0_port').clear().type('7000');
+ // add second upstream node
Review comment:
need a blank line, please fix similar points
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,108 @@
+/*
+ * 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 Delete Upstream', () => {
+ const name = `upstreamName${new Date().valueOf()}`;
+ const sleepTime = 100;
+ const domSelectors = {
+ notification: '.ant-notification-notice-message'
+ };
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create roundrobin upstream', () => {
Review comment:
for `roundrobin`, we need add a step "choose `roundrobin `"
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,108 @@
+/*
+ * 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 Delete Upstream', () => {
+ const name = `upstreamName${new Date().valueOf()}`;
+ const sleepTime = 100;
+ const domSelectors = {
+ notification: '.ant-notification-notice-message'
+ };
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create roundrobin upstream', () => {
Review comment:
bad title: "create upstream with the default setting"
----------------------------------------------------------------
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 #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
moonming commented on a change in pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#discussion_r546539544
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,101 @@
+/*
+ * 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 Delete Upstream', () => {
+ const root_name = `root_${new Date().valueOf()}`;
Review comment:
you did not answer my question.
What is this? Why need it?
----------------------------------------------------------------
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 #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
idbeta commented on pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#issuecomment-751204527
> After those PRs were merged, we need to:
>
> * [ ] Use a global file to contain global variables;
> * [ ] We should use `it should xxx` instead of `it creates xxx`;
good point, this will be carried out in another issue and 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 #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#issuecomment-751413495
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] moonming commented on pull request #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
moonming commented on pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#issuecomment-748204780
@membphis please check the code strust first. you are not the code linter.
----------------------------------------------------------------
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 #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#discussion_r546601861
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,109 @@
+/*
+ * 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 Delete Upstream', () => {
+ const name = `upstreamName${new Date().valueOf()}`;
+ const sleepTime = 100;
+ const domSelectors = {
+ notification: '.ant-notification-notice-message'
+ };
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create roundrobin upstream', () => {
Review comment:
```suggestion
it('should create roundrobin upstream', () => {
```
or
```suggestion
it('creates roundrobin upstream', () => {
```
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,109 @@
+/*
+ * 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 Delete Upstream', () => {
+ const name = `upstreamName${new Date().valueOf()}`;
+ const sleepTime = 100;
+ const domSelectors = {
+ notification: '.ant-notification-notice-message'
+ };
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create roundrobin upstream', () => {
+ // go to upstream create page
+ cy.visit('/');
+ cy.contains('Upstream').click();
+ cy.wait(sleepTime*5);
Review comment:
codes format
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,109 @@
+/*
+ * 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 Delete Upstream', () => {
+ const name = `upstreamName${new Date().valueOf()}`;
+ const sleepTime = 100;
+ const domSelectors = {
+ notification: '.ant-notification-notice-message'
+ };
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create roundrobin upstream', () => {
+ // go to upstream create page
+ cy.visit('/');
+ cy.contains('Upstream').click();
+ cy.wait(sleepTime*5);
+ cy.contains('Create').click();
+
+ // input Name And Description
+ cy.get('#name').type(name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // input information
+ cy.get('#nodes_0_host').type('127.0.0.1');
+ cy.get('#nodes_0_port').clear().type('7000');
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.get(domSelectors.notification).should('contain', 'Create upstream successfully');
Review comment:
good catch
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,109 @@
+/*
+ * 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 Delete Upstream', () => {
+ const name = `upstreamName${new Date().valueOf()}`;
+ const sleepTime = 100;
+ const domSelectors = {
+ notification: '.ant-notification-notice-message'
+ };
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create roundrobin upstream', () => {
+ // go to upstream create page
+ cy.visit('/');
+ cy.contains('Upstream').click();
+ cy.wait(sleepTime*5);
+ cy.contains('Create').click();
+
+ // input Name And Description
+ cy.get('#name').type(name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // input information
+ cy.get('#nodes_0_host').type('127.0.0.1');
+ cy.get('#nodes_0_port').clear().type('7000');
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.get(domSelectors.notification).should('contain', 'Create upstream successfully');
+ cy.contains('Create upstream successfully');
+ cy.wait(sleepTime*5);
+ cy.url().should('contains', 'upstream/list');
+ });
+
+ it('delete the upstream', () => {
+ cy.visit('/');
+ cy.contains('Upstream').click();
+ cy.wait(sleepTime*5)
+ cy.contains(name).siblings().contains('Delete').click();
+ cy.contains('button', 'Confirm').click();
+ cy.get(domSelectors.notification).should('contain', 'Delete successfully');
+ });
+
+ it('create chash upstream', () => {
+ // go to upstream create page
+ cy.visit('/');
+ cy.contains('Upstream').click();
+ cy.wait(sleepTime*5);
+ cy.contains('Create').click();
+
+ // input `Name And Description`
+ cy.get('#name').type(name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // change upstream type to chash, todo: optimize the search method
Review comment:
ye, need a selector mapper or optimize those search paths.
----------------------------------------------------------------
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 #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
membphis commented on a change in pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#discussion_r547640769
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,109 @@
+/*
+ * 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 Delete Upstream', () => {
+ const name = `upstreamName${new Date().valueOf()}`;
+ const sleepTime = 100;
+ const domSelectors = {
+ notification: '.ant-notification-notice-message'
+ };
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create roundrobin upstream', () => {
+ // go to upstream create page
+ cy.visit('/');
+ cy.contains('Upstream').click();
+ cy.wait(sleepTime*5);
+ cy.contains('Create').click();
+
+ // input Name And Description
+ cy.get('#name').type(name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // input information
+ cy.get('#nodes_0_host').type('127.0.0.1');
+ cy.get('#nodes_0_port').clear().type('7000');
+ cy.contains('Next').click();
+ cy.contains('Submit').click();
+ cy.get(domSelectors.notification).should('contain', 'Create upstream successfully');
+ cy.contains('Create upstream successfully');
+ cy.wait(sleepTime*5);
+ cy.url().should('contains', 'upstream/list');
+ });
+
+ it('delete the upstream', () => {
+ cy.visit('/');
+ cy.contains('Upstream').click();
+ cy.wait(sleepTime*5)
+ cy.contains(name).siblings().contains('Delete').click();
+ cy.contains('button', 'Confirm').click();
+ cy.get(domSelectors.notification).should('contain', 'Delete successfully');
+ });
+
+ it('create chash upstream', () => {
+ // go to upstream create page
+ cy.visit('/');
+ cy.contains('Upstream').click();
+ cy.wait(sleepTime*5);
+ cy.contains('Create').click();
+
+ // input `Name And Description`
+ cy.get('#name').type(name);
+ cy.get('#desc').type('desc_by_autotest');
+
+ // change upstream type to chash, todo: optimize the search method
Review comment:
@LiteSun please confirm if we have a good way for those steps now. if not, we can create a todo issue and update it later in a new PR @idbeta
----------------------------------------------------------------
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 #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#issuecomment-747915461
# [Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=h1) Report
> Merging [#1066](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=desc) (5b7e9f1) into [master](https://codecov.io/gh/apache/apisix-dashboard/commit/aca192c4f352aa7bcc9b88ac52da9ff3cc498271?el=desc) (aca192c) will **not change** coverage.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1066/graphs/tree.svg?width=650&height=150&src=pr&token=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1066 +/- ##
=======================================
Coverage 41.06% 41.06%
=======================================
Files 28 28
Lines 1773 1773
=======================================
Hits 728 728
Misses 939 939
Partials 106 106
```
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?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/1066?src=pr&el=footer). Last update [aca192c...5b7e9f1](https://codecov.io/gh/apache/apisix-dashboard/pull/1066?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 #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
membphis commented on a change in pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#discussion_r547776679
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,108 @@
+/*
+ * 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 Delete Upstream', () => {
+ const name = `upstreamName${new Date().valueOf()}`;
+ const sleepTime = 100;
+ const domSelectors = {
+ notification: '.ant-notification-notice-message'
+ };
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create roundrobin upstream', () => {
Review comment:
`roundrobin` is the default value, so we need a better title
----------------------------------------------------------------
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 #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
moonming commented on a change in pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#discussion_r546163960
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,101 @@
+/*
+ * 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 Delete Upstream', () => {
+ const root_name = `root_${new Date().valueOf()}`;
+
+ beforeEach(() => {
+ // init login
+ cy.login();
+ })
+
+ it('create roundrobin upstream', () => {
+ // go to upstream create page
+ cy.visit('/upstream/create');
Review comment:
This method is not suitable, we need to modify the previous test case too
----------------------------------------------------------------
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 #1066: test: add frontend e2e test (create_and_delete_upstream)
Posted by GitBox <gi...@apache.org>.
idbeta commented on a change in pull request #1066:
URL: https://github.com/apache/apisix-dashboard/pull/1066#discussion_r547687019
##########
File path: web/cypress/integration/upstream/create_and_delete_upstream.spec.js
##########
@@ -0,0 +1,101 @@
+/*
+ * 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 Delete Upstream', () => {
+ const root_name = `root_${new Date().valueOf()}`;
Review comment:
Just for the case of `delete the upstream` to locate this `Upstream` more convenient, if it is not unique, the operation will be complicated.
----------------------------------------------------------------
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