mirror of https://github.com/portainer/portainer
chore(testing): cleanup e2e for CE (#4349)
parent
e479e41aee
commit
a4fa44f831
|
@ -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');
|
||||
});
|
||||
});
|
||||
});
|
|
@ -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');
|
||||
});
|
||||
});
|
||||
});
|
|
@ -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();
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue