Skip to content
Snippets Groups Projects
Commit d3d8933f authored by OZGCloud's avatar OZGCloud
Browse files

OZG-6780 add attribute tests to users

parent 3a2ce61c
No related branches found
No related tags found
No related merge requests found
import { exist } from '../../support/cypress.util';
export class BenutzerE2EComponent {
private readonly benutzerHinzufuegenButton: string = 'add-user-button';
private readonly userEntry: string = 'user-entry-';
......@@ -15,5 +17,9 @@ export class BenutzerE2EComponent {
return cy.getTestElement(user);
}
public tableContains(compare: string): void {}
public stringExistsInUserEntry(phrase: string, user: string): void {
this.getUserEntry(user).within(() => {
exist(cy.contains(phrase));
});
}
}
......@@ -5,6 +5,14 @@ import { loginAsAriane } from '../../support/user-util';
const mainPage: MainPage = new MainPage();
const benutzerPage: BenutzerE2EComponent = new BenutzerE2EComponent();
const role1: string = 'VERWALTUNG_USER';
const role2: string = 'VERWALTUNG_LOESCHEN';
const role3: string = 'VERWALTUNG_POSTSTELLE';
const orga1: string = 'Ordnungsamt';
const orga2: string = 'Landesamt für Denkmalpflege';
const orga3: string = 'Wirtschaftsförderung';
const orga_none: string = 'keine zuständige Stelle zugewiesen';
const mail1: string = 'peter.von.der.post@ozg-sh.de';
describe('Benutzer und Rollen', () => {
before(() => {
......@@ -17,7 +25,16 @@ describe('Benutzer und Rollen', () => {
exist(benutzerPage.getHinzufuegenButton());
});
it('should show user Ariane in table', () => {
it('should show users and attributes in table', () => {
exist(benutzerPage.getUserEntry('ariane'));
benutzerPage.stringExistsInUserEntry(role1, 'dorothea');
benutzerPage.stringExistsInUserEntry(orga1, 'ludwig');
benutzerPage.stringExistsInUserEntry(role1, 'zelda');
benutzerPage.stringExistsInUserEntry(role2, 'zelda');
benutzerPage.stringExistsInUserEntry(orga2, 'zelda');
benutzerPage.stringExistsInUserEntry(orga3, 'zelda');
benutzerPage.stringExistsInUserEntry(orga_none, 'adelheit');
benutzerPage.stringExistsInUserEntry(mail1, 'peter');
benutzerPage.stringExistsInUserEntry(role3, 'peter');
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment