Skip to content

Commit 02a3667

Browse files
committed
[Reporting/Functional] unskip pagination test (#74973)
* [Reporting/Functional] unskip pagination test * change to js file for flaky test runner * fix ts
1 parent b00307c commit 02a3667

4 files changed

Lines changed: 11 additions & 11 deletions

File tree

x-pack/plugins/reporting/public/components/__snapshots__/report_listing.test.tsx.snap

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/plugins/reporting/public/components/report_listing.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,6 @@ class ReportListingUi extends Component<Props, State> {
513513
isSelectable={true}
514514
onChange={this.onTableChange}
515515
data-test-subj="reportJobListing"
516-
data-test-page={this.state.page}
517516
/>
518517
{this.state.selectedJobs.length > 0 ? this.renderDeleteButton() : null}
519518
</Fragment>

x-pack/test/functional/apps/reporting_management/index.ts renamed to x-pack/test/functional/apps/reporting_management/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
* you may not use this file except in compliance with the Elastic License.
55
*/
66

7-
import { FtrProviderContext } from '../../ftr_provider_context';
8-
9-
export default ({ loadTestFile }: FtrProviderContext) => {
7+
export default ({ loadTestFile }) => {
108
describe('reporting management app', function () {
119
this.tags('ciGroup7');
1210
loadTestFile(require.resolve('./report_listing'));

x-pack/test/functional/apps/reporting_management/report_listing.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
2626
const security = getService('security');
2727

2828
const testSubjects = getService('testSubjects');
29-
const findInstance = getService('find');
3029
const esArchiver = getService('esArchiver');
3130

3231
describe('Listing of Reports', function () {
@@ -68,7 +67,10 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
6867
});
6968
});
7069

71-
it.skip('Paginates content', async () => {
70+
it('Paginates historical reports', async () => {
71+
// wait for first row of page 1
72+
await testSubjects.find('checkboxSelectRow-k9a9xlwl0gpe1457b10rraq3');
73+
7274
const previousButton = await testSubjects.find('pagination-button-previous');
7375

7476
// previous CAN NOT be clicked
@@ -91,7 +93,9 @@ pdf\n2020-04-21 @ 07:00 PM\ntest_user\nCompleted at 2020-04-21 @ 07:00 PM
9193

9294
// click page 2
9395
await testSubjects.click('pagination-button-1');
94-
await findInstance.byCssSelector('[data-test-page="1"]');
96+
97+
// wait for first row of page 2
98+
await testSubjects.find('checkboxSelectRow-k9a9uc4x0gpe1457b16wthc8');
9599

96100
// previous CAN be clicked
97101
expect(await previousButton.getAttribute('disabled')).to.be(null);
@@ -112,7 +116,9 @@ report2csv\nsearch\n2020-04-21 @ 06:54 PM\ntest_user\nCompleted at 2020-04-21 @
112116

113117
// click page 3
114118
await testSubjects.click('pagination-button-2');
115-
await findInstance.byCssSelector('[data-test-page="2"]');
119+
120+
// wait for first row of page 3
121+
await testSubjects.find('checkboxSelectRow-k9a9p1840gpe1457b1ghfxw5');
116122

117123
// scan page 3
118124
tableText = await getTableTextFromElement(await testSubjects.find('reportJobListing'));

0 commit comments

Comments
 (0)