Updated 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
62d27e45e2
commit
e51341102b
|
@ -613,7 +613,8 @@ export default {
|
||||||
firstLineDestination: 'vn-claim-action vn-tr:nth-child(1) vn-autocomplete[ng-model="saleClaimed.claimDestinationFk"]',
|
firstLineDestination: 'vn-claim-action vn-tr:nth-child(1) vn-autocomplete[ng-model="saleClaimed.claimDestinationFk"]',
|
||||||
secondLineDestination: 'vn-claim-action vn-tr:nth-child(2) vn-autocomplete[ng-model="saleClaimed.claimDestinationFk"]',
|
secondLineDestination: 'vn-claim-action vn-tr:nth-child(2) vn-autocomplete[ng-model="saleClaimed.claimDestinationFk"]',
|
||||||
firstDeleteLine: 'vn-claim-action vn-tr:nth-child(1) vn-icon-button[icon="delete"]',
|
firstDeleteLine: 'vn-claim-action vn-tr:nth-child(1) vn-icon-button[icon="delete"]',
|
||||||
isPaidWithManaCheckbox: 'vn-check[ng-model="$ctrl.claim.isChargedToMana"]'
|
isPaidWithManaCheckbox: 'vn-claim-action vn-check[ng-model="$ctrl.claim.isChargedToMana"]',
|
||||||
|
hasToPickUpCheckbox: 'vn-claim-action vn-check[ng-model="$ctrl.claim.hasToPickUp"]'
|
||||||
},
|
},
|
||||||
ordersIndex: {
|
ordersIndex: {
|
||||||
searchResult: 'vn-order-index vn-card > vn-table > div > vn-tbody > a.vn-tr',
|
searchResult: 'vn-order-index vn-card > vn-table > div > vn-tbody > a.vn-tr',
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import selectors from '../../helpers/selectors.js';
|
import selectors from '../../helpers/selectors.js';
|
||||||
import getBrowser from '../../helpers/puppeteer';
|
import getBrowser from '../../helpers/puppeteer';
|
||||||
|
|
||||||
describe('Claim action path', () => {
|
fdescribe('Claim action path', () => {
|
||||||
let browser;
|
let browser;
|
||||||
let page;
|
let page;
|
||||||
|
|
||||||
|
@ -66,17 +66,26 @@ describe('Claim action path', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should check the "is paid with mana" checkbox', async() => {
|
it('should check the "is paid with mana" checkbox', async() => {
|
||||||
page.waitFor(3000); // can't use waitForNavigation here and needs more time than a single second to get the section ready...
|
// page.waitFor(3000); // can't use waitForNavigation here and needs more time than a single second to get the section ready...
|
||||||
await page.waitToClick(selectors.claimAction.isPaidWithManaCheckbox);
|
await page.waitToClick(selectors.claimAction.isPaidWithManaCheckbox);
|
||||||
const message = await page.waitForSnackbar();
|
const message = await page.waitForSnackbar();
|
||||||
|
|
||||||
expect(message.type).toBe('success');
|
expect(message.type).toBe('success');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the "is paid with mana" checkbox is checked', async() => {
|
it('should check the "Pick up" checkbox', async() => {
|
||||||
await page.reloadSection('claim.card.action');
|
await page.waitToClick(selectors.claimAction.hasToPickUpCheckbox);
|
||||||
const result = await page.checkboxState(selectors.claimAction.isPaidWithManaCheckbox);
|
const message = await page.waitForSnackbar();
|
||||||
|
|
||||||
expect(result).toBe('checked');
|
expect(message.type).toBe('success');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should confirm the "is paid with mana" and "Pick up" checkbox are checked', async() => {
|
||||||
|
await page.reloadSection('claim.card.action');
|
||||||
|
const isPaidWithManaCheckbox = await page.checkboxState(selectors.claimAction.isPaidWithManaCheckbox);
|
||||||
|
const hasToPickUpCheckbox = await page.checkboxState(selectors.claimAction.hasToPickUpCheckbox);
|
||||||
|
|
||||||
|
expect(isPaidWithManaCheckbox).toBe('checked');
|
||||||
|
expect(hasToPickUpCheckbox).toBe('checked');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
</vn-tool-bar>
|
</vn-tool-bar>
|
||||||
<vn-check vn-one class="vn-mr-md"
|
<vn-check vn-one class="vn-mr-md"
|
||||||
label="Pick up"
|
label="Pick up"
|
||||||
ng-model="::$ctrl.claim.hasToPickUp"
|
ng-model="$ctrl.claim.hasToPickUp"
|
||||||
on-change="$ctrl.save({hasToPickUp: value})">
|
on-change="$ctrl.save({hasToPickUp: value})">
|
||||||
</vn-check>
|
</vn-check>
|
||||||
<vn-check vn-one
|
<vn-check vn-one
|
||||||
|
|
Loading…
Reference in New Issue