fix e2e errors
This commit is contained in:
parent
c31825331d
commit
02c82f894a
|
@ -1,5 +0,0 @@
|
||||||
UPDATE `salix`.`ACL` SET `accessType`='WRITE' WHERE `id`='213';
|
|
||||||
UPDATE `salix`.`ACL` SET `property` = 'deleteSales' WHERE (`id` = '80');
|
|
||||||
|
|
||||||
INSERT IGNORE INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('CustomsAgent', '*', '*', 'ALLOW', 'ROLE', 'employee');
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -211,12 +211,16 @@ describe('Ticket Edit sale path', () => {
|
||||||
it('should search for a ticket then access to the sales section', async() => {
|
it('should search for a ticket then access to the sales section', async() => {
|
||||||
await page.accessToSearchResult('16');
|
await page.accessToSearchResult('16');
|
||||||
await page.accessToSection('ticket.card.sale');
|
await page.accessToSection('ticket.card.sale');
|
||||||
|
await page.wait(2000);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should select the third sale and delete it', async() => {
|
it('should select the third sale and delete it', async() => {
|
||||||
await page.waitToClick(selectors.ticketSales.thirdSaleCheckbox);
|
await page.waitToClick(selectors.ticketSales.thirdSaleCheckbox);
|
||||||
|
await page.wait(2000);
|
||||||
await page.waitToClick(selectors.ticketSales.deleteSaleButton);
|
await page.waitToClick(selectors.ticketSales.deleteSaleButton);
|
||||||
|
await page.wait(2000);
|
||||||
await page.waitToClick(selectors.ticketSales.acceptDeleteLineButton);
|
await page.waitToClick(selectors.ticketSales.acceptDeleteLineButton);
|
||||||
|
await page.wait(2000);
|
||||||
await page.waitForSpinnerLoad();
|
await page.waitForSpinnerLoad();
|
||||||
const message = await page.waitForSnackbar();
|
const message = await page.waitForSnackbar();
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,8 @@ module.exports = Self => {
|
||||||
async function claimIsEditable(ctx) {
|
async function claimIsEditable(ctx) {
|
||||||
const loopBackContext = LoopBackContext.getCurrentContext();
|
const loopBackContext = LoopBackContext.getCurrentContext();
|
||||||
const httpCtx = {req: loopBackContext.active};
|
const httpCtx = {req: loopBackContext.active};
|
||||||
|
console.log(ctx, 'ctx.where.id');
|
||||||
|
console.log(ctx.where, 'ctx.where.id');
|
||||||
const isEditable = await Self.app.models.Claim.isEditable(httpCtx, ctx.where.id);
|
const isEditable = await Self.app.models.Claim.isEditable(httpCtx, ctx.where.id);
|
||||||
|
|
||||||
if (!isEditable)
|
if (!isEditable)
|
||||||
|
|
Loading…
Reference in New Issue