Browse Source

test: loop changed to avoid tooltip

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/4820/head
Raju Udava 2 years ago
parent
commit
5e3ea7fbd0
  1. 21
      tests/playwright/tests/columnAttachments.spec.ts

21
tests/playwright/tests/columnAttachments.spec.ts

@ -16,15 +16,18 @@ test.describe('Attachment column', () => {
accountLicensePage = new AccountLicensePage(accountPage); accountLicensePage = new AccountLicensePage(accountPage);
}); });
test('Create and verify atttachent column, verify it in shared form,', async ({ page, context }) => { test('Create and verify attachment column, verify it in shared form,', async ({ page, context }) => {
// run tests slowly
test.slow();
await dashboard.treeView.openTable({ title: 'Country' }); await dashboard.treeView.openTable({ title: 'Country' });
await dashboard.grid.column.create({ await dashboard.grid.column.create({
title: 'testAttach', title: 'testAttach',
type: 'Attachment', type: 'Attachment',
}); });
for (let i = 4; i <= 6; i++) { for (let i = 12; i >= 8; i -= 2) {
const filepath = [`${process.cwd()}/fixtures/sampleFiles/${i}.json`]; const filepath = [`${process.cwd()}/fixtures/sampleFiles/${i / 2}.json`];
await dashboard.grid.cell.attachment.addFile({ await dashboard.grid.cell.attachment.addFile({
index: i, index: i,
columnHeader: 'testAttach', columnHeader: 'testAttach',
@ -36,12 +39,12 @@ test.describe('Attachment column', () => {
}); });
} }
await dashboard.grid.cell.attachment.addFile({ await dashboard.grid.cell.attachment.addFile({
index: 7, index: 14,
columnHeader: 'testAttach', columnHeader: 'testAttach',
filePath: [`${process.cwd()}/fixtures/sampleFiles/sampleImage.jpeg`], filePath: [`${process.cwd()}/fixtures/sampleFiles/sampleImage.jpeg`],
}); });
await dashboard.grid.cell.attachment.verifyFile({ await dashboard.grid.cell.attachment.verifyFile({
index: 7, index: 14,
columnHeader: 'testAttach', columnHeader: 'testAttach',
}); });
@ -87,12 +90,12 @@ test.describe('Attachment column', () => {
const csvArray = csvFileData.split('\r\n'); const csvArray = csvFileData.split('\r\n');
const columns = csvArray[0]; const columns = csvArray[0];
const rows = csvArray.slice(1); const rows = csvArray.slice(1);
const cells = rows[4].split(','); const cells = rows[10].split(',');
await expect(columns).toBe('Country,City List,testAttach'); await expect(columns).toBe('Country,City List,testAttach');
await expect(cells[0]).toBe('Anguilla'); await expect(cells[0]).toBe('Bahrain');
await expect(cells[1]).toBe('South Hill'); await expect(cells[1]).toBe('al-Manama');
await expect(cells[2].includes('4.json(http://localhost:8080/download/')).toBe(true); await expect(cells[2].includes('5.json(http://localhost:8080/download/')).toBe(true);
}); });
test('Attachment enterprise features,', async ({ page, context }) => { test('Attachment enterprise features,', async ({ page, context }) => {

Loading…
Cancel
Save