diff --git a/e2e/content-services/notifications_component.e2e.ts b/e2e/content-services/notifications_component.e2e.ts index a4f6acbc1f..1747ad0276 100644 --- a/e2e/content-services/notifications_component.e2e.ts +++ b/e2e/content-services/notifications_component.e2e.ts @@ -16,14 +16,11 @@ */ import LoginPage = require('../pages/adf/loginPage'); - import AcsUserModel = require('../models/ACS/acsUserModel'); - import TestConfig = require('../test.config'); - import AlfrescoApi = require('alfresco-js-api-node'); - import NotificationPage = require('../pages/adf/notificationPage'); +import { browser } from 'protractor'; describe('Notifications Component', () => { @@ -45,6 +42,10 @@ describe('Notifications Component', () => { await this.alfrescoJsApi.login(acsUser.id, acsUser.password); + done(); + }); + + beforeEach(async(done) => { loginPage.loginToContentServicesUsingUserModel(acsUser); notificationPage.goToNotificationsPage(); @@ -59,7 +60,7 @@ describe('Notifications Component', () => { }); it('[C279979] Should not show notification when the message is empty and button is clicked', () => { - notificationPage.enterMessageField(''); + notificationPage.clearMessage(); notificationPage.clickDefaultNotificationButton(); notificationPage.checkNotificationSnackBarIsNotDisplayed(); }); diff --git a/e2e/pages/adf/notificationPage.js b/e2e/pages/adf/notificationPage.js index 61f08134ec..6ad351251d 100644 --- a/e2e/pages/adf/notificationPage.js +++ b/e2e/pages/adf/notificationPage.js @@ -123,6 +123,13 @@ var NotificationPage = function () { this.clickActionButton = function () { actionButton.click(); }; + + this.clearMessage = function () { + Util.waitUntilElementIsVisible(messageField); + messageField.clear(); + messageField.sendKeys('a'); + messageField.sendKeys(protractor.Key.BACK_SPACE); + } }; module.exports = NotificationPage;