-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
user.e2e-spec.ts
34 lines (28 loc) · 959 Bytes
/
user.e2e-spec.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/**
* @license
* Copyright Akveo. All Rights Reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*/
import { browser, element, by } from 'protractor';
import badgeTests from './badge.e2e-spec';
describe('nb-user', () => {
beforeEach((done) => {
browser.get('#/user/user-test.component').then(() => done());
});
describe('badge', () => {
const elementsOffset = 10;
const badgeText = '29';
const badgesConf = {
selector: (i) => `.test-row:nth-child(${elementsOffset + i + 1}) nb-badge`,
badges: [
{ position: 'top right', status: 'primary', text: badgeText },
],
};
badgeTests(badgesConf);
});
it('background image should have base64 image', () => {
element(by.css('#base64-image .user-picture.image')).getCssValue('background-image').then(value => {
expect(value).toEqual('url("data:image/png;base64,aaa")');
});
});
});