diff --git a/x-pack/plugins/reporting/public/components/__snapshots__/report_listing.test.tsx.snap b/x-pack/plugins/reporting/public/components/__snapshots__/report_listing.test.tsx.snap index 66c3aea8acc13..ddba7842f1199 100644 --- a/x-pack/plugins/reporting/public/components/__snapshots__/report_listing.test.tsx.snap +++ b/x-pack/plugins/reporting/public/components/__snapshots__/report_listing.test.tsx.snap @@ -30,7 +30,6 @@ Array [ }, ] } - data-test-page={0} data-test-subj="reportJobListing" isSelectable={true} itemId="id" @@ -57,7 +56,6 @@ Array [ >
@@ -368,7 +366,6 @@ Array [ ,
diff --git a/x-pack/plugins/reporting/public/components/report_listing.tsx b/x-pack/plugins/reporting/public/components/report_listing.tsx index 80ef9311fd0e5..afcae93a8db16 100644 --- a/x-pack/plugins/reporting/public/components/report_listing.tsx +++ b/x-pack/plugins/reporting/public/components/report_listing.tsx @@ -513,7 +513,6 @@ class ReportListingUi extends Component { isSelectable={true} onChange={this.onTableChange} data-test-subj="reportJobListing" - data-test-page={this.state.page} /> {this.state.selectedJobs.length > 0 ? this.renderDeleteButton() : null} diff --git a/x-pack/test/functional/apps/reporting_management/index.ts b/x-pack/test/functional/apps/reporting_management/index.js similarity index 75% rename from x-pack/test/functional/apps/reporting_management/index.ts rename to x-pack/test/functional/apps/reporting_management/index.js index 8606c46053ab0..ef92e7d04ef0c 100644 --- a/x-pack/test/functional/apps/reporting_management/index.ts +++ b/x-pack/test/functional/apps/reporting_management/index.js @@ -4,9 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { FtrProviderContext } from '../../ftr_provider_context'; - -export default ({ loadTestFile }: FtrProviderContext) => { +export default ({ loadTestFile }) => { describe('reporting management app', function () { this.tags('ciGroup7'); loadTestFile(require.resolve('./report_listing')); diff --git a/x-pack/test/functional/apps/reporting_management/report_listing.ts b/x-pack/test/functional/apps/reporting_management/report_listing.ts index 476f3e73d0923..ca5fb888e67e1 100644 --- a/x-pack/test/functional/apps/reporting_management/report_listing.ts +++ b/x-pack/test/functional/apps/reporting_management/report_listing.ts @@ -26,7 +26,6 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const security = getService('security'); const testSubjects = getService('testSubjects'); - const findInstance = getService('find'); const esArchiver = getService('esArchiver'); describe('Listing of Reports', function () { @@ -68,7 +67,10 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { }); }); - it.skip('Paginates content', async () => { + it('Paginates historical reports', async () => { + // wait for first row of page 1 + await testSubjects.find('checkboxSelectRow-k9a9xlwl0gpe1457b10rraq3'); + const previousButton = await testSubjects.find('pagination-button-previous'); // previous CAN NOT be clicked @@ -90,7 +92,9 @@ pdf\ndashboard\n2020-04-21 @ 07:00 PM\ntest_user\nCompleted at 2020-04-21 @ 07:0 // click page 2 await testSubjects.click('pagination-button-1'); - await findInstance.byCssSelector('[data-test-page="1"]'); + + // wait for first row of page 2 + await testSubjects.find('checkboxSelectRow-k9a9uc4x0gpe1457b16wthc8'); // previous CAN be clicked expect(await previousButton.getAttribute('disabled')).to.be(null); @@ -110,7 +114,9 @@ test_user\nCompleted at 2020-04-21 @ 06:55 PM - Max size reached\nreport2csv\n20 // click page 3 await testSubjects.click('pagination-button-2'); - await findInstance.byCssSelector('[data-test-page="2"]'); + + // wait for first row of page 3 + await testSubjects.find('checkboxSelectRow-k9a9p1840gpe1457b1ghfxw5'); // scan page 3 tableText = await getTableTextFromElement(await testSubjects.find('reportJobListing'));