2575-image_download #448

Merged
joan merged 14 commits from 2575-image_download into dev 2020-11-18 10:36:17 +00:00
4 changed files with 8 additions and 5 deletions
Showing only changes of commit a060ac5c70 - Show all commits

View File

@ -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
Review

expect(contentType).toEqual....

expect(contentType).toEqual....
expect(image[1]).toEqual('image/png');
expect(contentType).toEqual('image/png');
});
bernat marked this conversation as resolved Outdated

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);

View File

@ -2,7 +2,7 @@
export default {
globalItems: {
applicationsMenuButton: '#apps',
userMenuButton: 'div.side.end img',
userMenuButton: '#user',
bernat marked this conversation as resolved Outdated

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"]',

View File

@ -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');

View File

@ -33,6 +33,7 @@
</vn-icon-button>
<button class="buttonAccount">
<img
bernat marked this conversation as resolved
Review

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'}"