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

OZG-3539 Add e2e test

parent 11c53c3c
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,7 @@ import { TOGGLE_ELEMENT } from '../../support/angular.util';
export class UserSettingsE2EComponent {
private readonly rootLocator: string = 'user-settings';
private readonly emailBenachrichtigungLocator: string = 'email-benachrichtigung';
private readonly emailBenachrichtigungNewVorgangLocator: string = 'email-benachrichtigung-neuer-Vorgang';
private readonly darkModeLocator: string = 'dark-mode';
private readonly buttonLocator: string = 'user-settings-button';
......@@ -33,8 +33,8 @@ export class UserSettingsE2EComponent {
return cy.getTestElementWithOid(this.rootLocator);
}
public getEmailBenachrichtigung(): ToggleE2EComponent {
return new ToggleE2EComponent(this.emailBenachrichtigungLocator);
public getEmailBenachrichtigungForNewVorgang(): ToggleE2EComponent {
return new ToggleE2EComponent(this.emailBenachrichtigungNewVorgangLocator);
}
public getDarkMode(): ToggleE2EComponent {
......
......@@ -59,7 +59,7 @@ describe('User Settings', () => {
});
it('should show notificationsSendsFor toggle', () => {
exist(userSettings.getEmailBenachrichtigung().getRoot());
exist(userSettings.getEmailBenachrichtigungForNewVorgang().getRoot());
});
it('should show darkMode toggle', () => {
......@@ -69,20 +69,20 @@ describe('User Settings', () => {
describe('click on notificationSendsFor toggle', () => {
it('should have initial unchecked toggle', () => {
isNotChecked(userSettings.getEmailBenachrichtigung().getToggle());
isNotChecked(userSettings.getEmailBenachrichtigungForNewVorgang().getToggle());
});
it('should switch toggle status', () => {
userSettings.getEmailBenachrichtigung().getToggle().click();
userSettings.getEmailBenachrichtigungForNewVorgang().getToggle().click();
isChecked(userSettings.getEmailBenachrichtigung().getToggle());
isChecked(userSettings.getEmailBenachrichtigungForNewVorgang().getToggle());
});
it('should be loaded after page reload', () => {
reload();
userSettings.getRoot().click();
isChecked(userSettings.getEmailBenachrichtigung().getToggle());
isChecked(userSettings.getEmailBenachrichtigungForNewVorgang().getToggle());
});
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment