Skip to content

Commit

Permalink
Improve addRepository with regex
Browse files Browse the repository at this point in the history
Signed-off-by: Julien ADAMEK <julien.adamek@suse.com>
  • Loading branch information
juadk committed Nov 8, 2024
1 parent cf9c0c5 commit ce9cced
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export function addRepository(repositoryName, repositoryURL, repositoryType, rep
}
cy.clickButton('Create');
// Make sure the repo is active before leaving
cy.contains('Active '+ repositoryName)
cy.contains(new RegExp('Active.*'+repositoryName))
};

/**
Expand All @@ -77,12 +77,12 @@ export function deleteRepository(repositoryName) {
.should('be.visible');
cy.contains('Create')
.should('be.visible');
cy.contains('Active '+ repositoryName)
cy.contains(new RegExp('Active.*'+repositoryName))
.click();
cy.clickButton('Delete');
cypressLib.confirmDelete();
// Make sure the repo is removed before leaving
cy.contains('Active '+ repositoryName)
cy.contains(new RegExp('Active.*'+repositoryName))
.should('not.exist');
};

Expand Down

0 comments on commit ce9cced

Please sign in to comment.