Skip to content

Commit

Permalink
Remove burgerMenuOpenIfClosed function
Browse files Browse the repository at this point in the history
  • Loading branch information
juadk committed Oct 25, 2023
1 parent 54cf101 commit bb093e2
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export function accesMenu(menu) {
* @param repositoryBranch : Branch of the repository
*/
export function addRepository(repositoryName, repositoryURL, repositoryType, repositoryBranch) {
this.burgerMenuOpenIfClosed();
cy.contains('local')
.click();
cy.clickNavMenu(['Apps', 'Repositories'])
Expand Down Expand Up @@ -68,7 +67,6 @@ export function addRepository(repositoryName, repositoryURL, repositoryType, rep
* @param repositoryName : Name of the repository to delete
*/
export function deleteRepository(repositoryName) {
this.burgerMenuOpenIfClosed();
cy.contains('local')
.click();
cy.clickNavMenu(['Apps', 'Repositories'])
Expand All @@ -86,20 +84,8 @@ export function deleteRepository(repositoryName) {
.should('not.exist');
};

/**
* Check if the burger menu is open and open it if it's closed
*/
export function burgerMenuOpenIfClosed() {
cy.get('body').then((body) => {
if (body.find('.menu.raised').length === 0) {
this.burgerMenuToggle();
};
});
};

/**
* Click on the burger menu on the top left of the screen
* @remarks : Used in burgerMenuOpenIfClosed()
*/
export function burgerMenuToggle() {
cy.getBySel('top-level-menu', {timeout: 12000})
Expand All @@ -114,7 +100,6 @@ export function burgerMenuToggle() {
* @param timeout : Timeout for the check
*/
export function checkClusterStatus(clusterName, clusterStatus, timeout) {
this.burgerMenuOpenIfClosed();
cy.contains('Home')
.click();
// The new cluster must be in active state
Expand Down Expand Up @@ -148,7 +133,6 @@ export function confirmDelete() {
*/
// TODO: Add the possibility to add multiple roles
export function createUser(username, password, role) {
this.burgerMenuOpenIfClosed();
cy.contains('Users & Authentication')
.click();
cy.contains('.title', 'Users')
Expand All @@ -174,7 +158,6 @@ export function createUser(username, password, role) {
export function deleteUser(username) {
// Screen has to be big enough to display the 'Delete' button
cy.viewport(1920, 1080);
this.burgerMenuOpenIfClosed();
cy.contains('Users & Authentication')
.click();
cy.contains('.title', 'Users')
Expand Down

0 comments on commit bb093e2

Please sign in to comment.