Commit d05d4634 authored by Alexandre Goldstein's avatar Alexandre Goldstein
Browse files

serviceAccount tests done

parent 0485265e
Pipeline #10235 failed with stage
in 1 minute and 46 seconds
......@@ -15,7 +15,6 @@ describe('ACC_RC_UA', () => {
it('FAC1', () => {
cy.archive.goToArchiveList();
// TODO use ID used by test 'Deposit Archive'(not done yet)
// cy.archive.fillField('.name', cy.)
});
});
......@@ -15,6 +15,7 @@ describe('SEC_SAC_CR', () => {
cy.get('#addServiceAccount',{timeout:1000}).click();
cy.serviceAccount.fillField('#accountName', cy.serviceAccount.account[0].name);
fillService();
cy.get('.toggle').click();
cy.get('#submitServiceAccount').click();
cy.shouldHaveGritter(1, 'primary', 'Compte de service créé');
});
......
......@@ -6,7 +6,9 @@ describe('SEC_SAC_UP', () => {
it('NOMINAL', () => {
cy.serviceAccount.goToServiceAccountList();
cy.get('#list-serviceAccount_wrapper').find('tr').its('length').should('be.gte', 1);
cy.get('.disable').first().click();
let list = cy.get('#list-serviceAccount_wrapper',{timeout:1000});
let serviceAccount = list.contains(cy.serviceAccount.account[0].name);
serviceAccount.parent('tr').find('.disable').click();
cy.shouldHaveGritter(1, 'primary', 'Compte de service désactivé');
});
});
\ No newline at end of file
......@@ -5,7 +5,10 @@ describe('SEC_SAC_UP', () => {
it('NOMINAL', () => {
cy.serviceAccount.goToServiceAccountList();
cy.get('.edit').first().click();
let list = cy.get('#list-serviceAccount_wrapper');
let serviceAccount = list.contains(cy.serviceAccount.account[0].name);
serviceAccount.parent('tr').find('.edit').click();
cy.serviceAccount.fillField('#accountName', 'Tests');
cy.get('#submitServiceAccount').click();
cy.shouldHaveGritter(1, 'primary', 'Compte de service modifié');
});
......
describe('SEC_SAC_UP', () => {
describe('SEC_SAC_UP_KEY', () => {
beforeEach( () => {
cy.login(cy.admin_fonc.username, cy.admin_fonc.password);
}),
it('NOMINAL', () => {
cy.serviceAccount.goToServiceAccountList();
let $myRow = cy.get('#list-serviceAccount_wrapper').find(cy.serviceAccount.account[0].name);
$myRow.get('.edit').click();
cy.get('#generateTokenTab').click();
cy.get('#tokenRegenerateRequest').click();
cy.shouldHaveGritter(1, 'primary', 'jeton généré');
let list = cy.get('#list-serviceAccount_wrapper');
let serviceAccount = list.contains(cy.serviceAccount.account[2].name);
serviceAccount.parent('tr').find('.edit').click();
cy.get('#generateTokenTabBtn',{timeout:1000}).click();
cy.get('#tokenRegenerateRequest',{timeout:1000}).click();
cy.shouldHaveGritter(1, 'primary', 'Jeton généré');
cy.get('#submitServiceAccount').click();
cy.shouldHaveGritter(1, 'primary', 'Compte de service modifié');
//
});
});
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment