mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Fixing tests for Notifications component (#3758)
This commit is contained in:
committed by
Eugenio Romano
parent
7fd3ffcf3f
commit
49a3749167
@@ -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();
|
||||
});
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user