more e2e repairs
gitea/salix/dev This commit looks good Details

This commit is contained in:
Carlos Jimenez Ruiz 2019-03-08 11:01:10 +01:00
parent 479ca86196
commit f6c725d007
2 changed files with 6 additions and 2 deletions

View File

@ -172,6 +172,7 @@ export default {
firstPaymentConfirmed: 'vn-client-web-payment vn-tr:nth-child(1) vn-icon[icon="check"][aria-hidden="false"]'
},
itemsIndex: {
searchIcon: `vn-item-index vn-searchbar vn-icon[icon="search"]`,
goBackToModuleIndexButton: `vn-item-descriptor a[href="#!/item/index"]`,
createItemButton: `${components.vnFloatButton}`,
searchResult: `vn-item-index a.vn-tr`,

View File

@ -6,7 +6,8 @@ describe('Item index path', () => {
beforeAll(() => {
nightmare
.loginAndModule('salesPerson', 'item');
.loginAndModule('salesPerson', 'item')
.waitToClick(selectors.itemsIndex.searchIcon);
});
it('should click on the fields to show button to open the list of columns to show', async() => {
@ -40,6 +41,7 @@ describe('Item index path', () => {
const imageVisible = await nightmare
.waitToClick(selectors.itemsIndex.searchResult)
.waitToClick(selectors.itemsIndex.goBackToModuleIndexButton)
.waitToClick(selectors.itemsIndex.searchIcon)
.wait(selectors.itemsIndex.searchResult)
.isVisible(selectors.itemsIndex.firstItemImage);
@ -77,7 +79,8 @@ describe('Item index path', () => {
const idVisible = await nightmare
.waitToClick(selectors.itemsIndex.searchResult)
.waitToClick(selectors.itemsIndex.goBackToModuleIndexButton)
.wait(1999)
.waitToClick(selectors.itemsIndex.searchIcon)
.wait(selectors.itemsIndex.searchResult)
.isVisible(selectors.itemsIndex.firstItemId);
expect(idVisible).toBeTruthy();