mirror of
https://github.com/portainer/portainer.git
synced 2025-07-29 18:29:44 +02:00
feat(project): refactor e2e testing (#4341)
* feat(project): refactor e2e testing * feat(project): remove example text * feat(project): add missing newlines Co-authored-by: owner <owner@pop-os.localdomain>
This commit is contained in:
parent
466bd24648
commit
d4c4c4e895
18 changed files with 1442 additions and 130 deletions
40
test/e2e/cypress/integration/rbac/docker-swarm.spec.js
Normal file
40
test/e2e/cypress/integration/rbac/docker-swarm.spec.js
Normal file
|
@ -0,0 +1,40 @@
|
|||
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');
|
||||
});
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue