fix e2e
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
e4e4f37609
commit
c673f2130a
|
@ -65,7 +65,7 @@ module.exports = Self => {
|
|||
}
|
||||
};
|
||||
const image = await Self.app.models.Image.findOne(filter);
|
||||
if (!image) return;
|
||||
if (!image) return false;
|
||||
|
||||
const imageRole = image.collection().readRole().name;
|
||||
const hasRole = await Self.app.models.Account.hasRole(id, imageRole);
|
||||
|
|
|
@ -11,10 +11,10 @@ describe('image download()', () => {
|
|||
expect(image[1]).toEqual('image/png');
|
||||
});
|
||||
|
||||
it(`should don't return an image if the user don't have it`, async() => {
|
||||
it(`should return false if the user don't have image`, async() => {
|
||||
const userId = 8;
|
||||
const image = await app.models.Image.download(collection, size, userId);
|
||||
|
||||
expect(image).toBeUndefined();
|
||||
expect(image).toBeFalse();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
export default {
|
||||
globalItems: {
|
||||
applicationsMenuButton: '#apps',
|
||||
userMenuButton: '#user',
|
||||
userMenuButton: 'div.side.end img',
|
||||
logoutButton: '#logout',
|
||||
applicationsMenuVisible: '.modules-menu',
|
||||
clientsButton: '.modules-menu [ui-sref="client.index"]',
|
||||
|
|
|
@ -62,7 +62,7 @@ describe('Salix', () => {
|
|||
it('should return de url image', () => {
|
||||
const url = controller.getImageUrl();
|
||||
|
||||
expect(url).not.toBeDefined();
|
||||
expect(url).toBeDefined();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue