Merge pull request 'fix e2e smartTable' (!1462) from fix-e2e-smartTable into dev
gitea/salix/pipeline/head There was a failure building this commit Details

Reviewed-on: #1462
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
Alexandre Riera 2023-04-20 05:15:53 +00:00
commit 4f25f153a9
1 changed files with 3 additions and 9 deletions

View File

@ -79,27 +79,21 @@ describe('SmartTable SearchBar integration', () => {
it('should order by first id', async() => {
await page.loginAndModule('developer', 'item');
await page.accessToSection('item.fixedPrice');
await page.doSearch();
await page.keyboard.press('Enter');
const result = await page.waitToGetProperty(selectors.itemFixedPrice.firstItemID, 'value');
expect(result).toEqual('1');
});
it('should order by last id', async() => {
it('should order by last id, reload page and have same order', async() => {
await page.waitToClick(selectors.itemFixedPrice.orderColumnId);
const result = await page.waitToGetProperty(selectors.itemFixedPrice.firstItemID, 'value');
expect(result).toEqual('3');
});
it('should reload page and have same order', async() => {
await page.reload({
waitUntil: 'networkidle2'
});
const result = await page.waitToGetProperty(selectors.itemFixedPrice.firstItemID, 'value');
expect(result).toEqual('3');
expect(result).toEqual('13');
});
});
});