mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-03 14:52:38 +00:00
Add missing style.css
This commit is contained in:
@@ -255,7 +255,7 @@ const api = {
|
|||||||
res.set('Content-Type', 'text/css');
|
res.set('Content-Type', 'text/css');
|
||||||
}
|
}
|
||||||
const parentTheme = themeParent ? `@import /api/css/${req.params.engine}/${themeParent}\n` : '';
|
const parentTheme = themeParent ? `@import /api/css/${req.params.engine}/${themeParent}\n` : '';
|
||||||
return res.status(200).send(`${parentTheme}@import /themes/${req.params.engine}/${req.params.id}\n`);
|
return res.status(200).send(`${parentTheme}@import /themes/${req.params.engine}/${req.params.id}/style.css\n`);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updateBrew : async (req, res)=>{
|
updateBrew : async (req, res)=>{
|
||||||
|
|||||||
@@ -611,7 +611,7 @@ brew`);
|
|||||||
};
|
};
|
||||||
api.getStaticTheme(req, res);
|
api.getStaticTheme(req, res);
|
||||||
const sent = res.send.mock.calls[0][0];
|
const sent = res.send.mock.calls[0][0];
|
||||||
expect(sent).toBe('@import /themes/V3/5ePHB\n');
|
expect(sent).toBe('@import /themes/V3/5ePHB/style.css\n');
|
||||||
expect(res.status).toHaveBeenCalledWith(200);
|
expect(res.status).toHaveBeenCalledWith(200);
|
||||||
});
|
});
|
||||||
it('should return an import of the theme including a parent.', async ()=>{
|
it('should return an import of the theme including a parent.', async ()=>{
|
||||||
@@ -623,7 +623,7 @@ brew`);
|
|||||||
};
|
};
|
||||||
api.getStaticTheme(req, res);
|
api.getStaticTheme(req, res);
|
||||||
const sent = res.send.mock.calls[0][0];
|
const sent = res.send.mock.calls[0][0];
|
||||||
expect(sent).toBe('@import /api/css/V3/5ePHB\n@import /themes/V3/5eDMG\n');
|
expect(sent).toBe('@import /api/css/V3/5ePHB\n@import /themes/V3/5eDMG/style.css\n');
|
||||||
expect(res.status).toHaveBeenCalledWith(200);
|
expect(res.status).toHaveBeenCalledWith(200);
|
||||||
});
|
});
|
||||||
it('should fail for an invalid static theme.', async()=>{
|
it('should fail for an invalid static theme.', async()=>{
|
||||||
|
|||||||
Reference in New Issue
Block a user