2575-image_download #448
|
@ -1,17 +1,18 @@
|
|||
const app = require('vn-loopback/server/server');
|
||||
|
||||
fdescribe('image download()', () => {
|
||||
describe('image download()', () => {
|
||||
const collection = 'user';
|
||||
const size = '160x160';
|
||||
|
||||
it('should return the image content-type of the user', async() => {
|
||||
const userId = 9;
|
||||
const image = await app.models.Image.download(collection, size, userId);
|
||||
const contentType = image[1];
|
||||
|
||||
bernat marked this conversation as resolved
|
||||
expect(image[1]).toEqual('image/png');
|
||||
expect(contentType).toEqual('image/png');
|
||||
});
|
||||
|
||||
bernat marked this conversation as resolved
Outdated
carlosjr
commented
doesn't doesn't
|
||||
it(`should return false if the user don't have image`, async() => {
|
||||
it(`should return false if the user doesn't have image`, async() => {
|
||||
const userId = 110;
|
||||
const image = await app.models.Image.download(collection, size, userId);
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
export default {
|
||||
globalItems: {
|
||||
applicationsMenuButton: '#apps',
|
||||
userMenuButton: 'div.side.end img',
|
||||
userMenuButton: '#user',
|
||||
bernat marked this conversation as resolved
Outdated
carlosjr
commented
please add the id to the element. please add the id to the element.
|
||||
logoutButton: '#logout',
|
||||
applicationsMenuVisible: '.modules-menu',
|
||||
clientsButton: '.modules-menu [ui-sref="client.index"]',
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import selectors from '../../helpers/selectors.js';
|
||||
import getBrowser from '../../helpers/puppeteer';
|
||||
|
||||
describe('Order catalog', () => {
|
||||
fdescribe('Order catalog', () => {
|
||||
let browser;
|
||||
let page;
|
||||
|
||||
|
@ -40,6 +40,7 @@ describe('Order catalog', () => {
|
|||
it('should perfom an "OR" search for the item tag colors silver and brown', async() => {
|
||||
await page.waitToClick(selectors.orderCatalog.openTagSearch);
|
||||
await page.autocompleteSearch(selectors.orderCatalog.tag, 'Color');
|
||||
await page.wait(2999);
|
||||
await page.autocompleteSearch(selectors.orderCatalog.firstTagAutocomplete, 'silver');
|
||||
await page.waitToClick(selectors.orderCatalog.addTagButton);
|
||||
await page.autocompleteSearch(selectors.orderCatalog.secondTagAutocomplete, 'brown');
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
</vn-icon-button>
|
||||
<button class="buttonAccount">
|
||||
<img
|
||||
bernat marked this conversation as resolved
carlosjr
commented
please add the id to the element. please add the id to the element.
|
||||
id="user"
|
||||
ng-src="{{$ctrl.getImageUrl()}}"
|
||||
ng-click="userPopover.show($event)"
|
||||
translate-attr="{title: 'Account'}"
|
||||
|
|
Loading…
Reference in New Issue
expect(contentType).toEqual....