mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +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 LoginPage = require('../pages/adf/loginPage');
|
||||||
|
|
||||||
import AcsUserModel = require('../models/ACS/acsUserModel');
|
import AcsUserModel = require('../models/ACS/acsUserModel');
|
||||||
|
|
||||||
import TestConfig = require('../test.config');
|
import TestConfig = require('../test.config');
|
||||||
|
|
||||||
import AlfrescoApi = require('alfresco-js-api-node');
|
import AlfrescoApi = require('alfresco-js-api-node');
|
||||||
|
|
||||||
import NotificationPage = require('../pages/adf/notificationPage');
|
import NotificationPage = require('../pages/adf/notificationPage');
|
||||||
|
import { browser } from 'protractor';
|
||||||
|
|
||||||
describe('Notifications Component', () => {
|
describe('Notifications Component', () => {
|
||||||
|
|
||||||
@@ -45,6 +42,10 @@ describe('Notifications Component', () => {
|
|||||||
|
|
||||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||||
|
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
|
beforeEach(async(done) => {
|
||||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||||
|
|
||||||
notificationPage.goToNotificationsPage();
|
notificationPage.goToNotificationsPage();
|
||||||
@@ -59,7 +60,7 @@ describe('Notifications Component', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('[C279979] Should not show notification when the message is empty and button is clicked', () => {
|
it('[C279979] Should not show notification when the message is empty and button is clicked', () => {
|
||||||
notificationPage.enterMessageField('');
|
notificationPage.clearMessage();
|
||||||
notificationPage.clickDefaultNotificationButton();
|
notificationPage.clickDefaultNotificationButton();
|
||||||
notificationPage.checkNotificationSnackBarIsNotDisplayed();
|
notificationPage.checkNotificationSnackBarIsNotDisplayed();
|
||||||
});
|
});
|
||||||
|
@@ -123,6 +123,13 @@ var NotificationPage = function () {
|
|||||||
this.clickActionButton = function () {
|
this.clickActionButton = function () {
|
||||||
actionButton.click();
|
actionButton.click();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.clearMessage = function () {
|
||||||
|
Util.waitUntilElementIsVisible(messageField);
|
||||||
|
messageField.clear();
|
||||||
|
messageField.sendKeys('a');
|
||||||
|
messageField.sendKeys(protractor.Key.BACK_SPACE);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = NotificationPage;
|
module.exports = NotificationPage;
|
||||||
|
Reference in New Issue
Block a user