Skip to content

Commit

Permalink
refine code
Browse files Browse the repository at this point in the history
  • Loading branch information
icelandld committed Jun 18, 2024
1 parent b9ba32b commit 58bb8b7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions cypress/pages/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ export class Routes extends BasePage {
}

add() {
ke.fromTAId(RoutesPage["New Route"][0]).click();

//FIXME: How to handle there's routes already exist
//FIXME: How to handle there's routes already exist without waiting
cy.wait(1000);
ke.fromTAId(RoutesPage["New Route"]).click();
// cy.get('body').then($el => {
// let $element = $el.find(`[data-testid="${RoutesPage["New Route"][1]}"]`);
// if ($element.length > 0 && $element.css('display')!=='none') {
Expand Down
6 changes: 4 additions & 2 deletions cypress/pages/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ export class Services extends BasePage {
}

add() {
ke.fromTAId(ServicesPage["New Gateway Service"][1]).click();
//FIXME: How to handle there's services already exist
//FIXME: How to handle there's services already exist without waiting
cy.wait(1000);
ke.fromTAId(ServicesPage["New Gateway Service"]).click();

// cy.get('body').then($el => {
// let $element = $el.find(`[data-testid="${ServicesPage["New Gateway Service"][1]}"]`);
// if ($element.length >0 && $element.css('display')!=='none') {
Expand Down

0 comments on commit 58bb8b7

Please sign in to comment.