diff --git a/test/e2e/cypress/integration/rbac/docker-standalone.spec.js b/test/e2e/cypress/integration/rbac/docker-standalone.spec.js deleted file mode 100644 index 4536bd166..000000000 --- a/test/e2e/cypress/integration/rbac/docker-standalone.spec.js +++ /dev/null @@ -1,40 +0,0 @@ -context('Standard RBAC tests against docker standalone', () => { - before(() => { - cy.visit('/'); - }); - - after(() => {}); - - describe('Validate endpoint admin functionality', function () { - beforeEach(() => { - cy.visit('/'); - cy.auth('frontend', 'admin', 'portainer'); - }); - - afterEach(() => { - // Cleanup remaining users and teams - cy.deleteUsers(); - cy.deleteTeams(); - // Clean Tokens - cy.clearUserTokens(); - }); - - it('User assigned as endpoint-admin against an endpoint', function () { - // Create and assign user as the administrator - cy.createUser('frontend', 'adam', 'portainer'); - cy.assignAccess('local', 'adam', 'user'); - cy.clearBrowserToken(); - - // Login and create, read, update, delete resources as user - cy.visit('/'); - cy.auth('frontend', 'adam', 'portainer'); - cy.selectEndpoint('local'); - - // create resources - cy.modifyResources('frontend', 'create'); - // modify resources - // delete resources - cy.modifyResources('frontend', 'delete'); - }); - }); -}); diff --git a/test/e2e/cypress/integration/rbac/docker-swarm.spec.js b/test/e2e/cypress/integration/rbac/docker-swarm.spec.js deleted file mode 100644 index 7d8541e8a..000000000 --- a/test/e2e/cypress/integration/rbac/docker-swarm.spec.js +++ /dev/null @@ -1,40 +0,0 @@ -context('Standard RBAC tests against docker swarm', () => { - before(() => { - cy.visit('/'); - }); - - after(() => {}); - - describe('Validate endpoint admin functionality', function () { - beforeEach(() => { - cy.visit('/'); - cy.auth('frontend', 'admin', 'portainer'); - }); - - afterEach(() => { - // Cleanup remaining users and teams - cy.deleteUsers(); - cy.deleteTeams(); - // Clean Tokens - cy.clearUserTokens(); - }); - - it('User assigned as endpoint-admin against an endpoint', function () { - // Create and assign user as the administrator - cy.createUser('frontend', 'adam', 'portainer'); - cy.assignAccess('swarm', 'adam', 'user'); - cy.clearBrowserToken(); - - // Login and create, read, update, delete resources as user - cy.visit('/'); - cy.auth('frontend', 'adam', 'portainer'); - cy.selectEndpoint('swarm'); - - // create resources - cy.modifyResources('frontend', 'create'); - // modify resources - // delete resources - cy.modifyResources('frontend', 'delete'); - }); - }); -}); diff --git a/test/e2e/cypress/support/commands.js b/test/e2e/cypress/support/commands.js index 2f651a678..ac1fa819d 100644 --- a/test/e2e/cypress/support/commands.js +++ b/test/e2e/cypress/support/commands.js @@ -564,7 +564,7 @@ Cypress.Commands.add('modifyResources', (location, action) => { } }); -Cypress.Commands.add('clickLink', () => { +Cypress.Commands.add('clickLink', (label) => { cy.waitUntil(() => cy.contains('a', label)).click(); });