Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Reporting/Functional] unskip pagination test #74973

Merged
merged 3 commits into from
Aug 13, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,6 @@ class ReportListingUi extends Component<Props, State> {
isSelectable={true}
onChange={this.onTableChange}
data-test-subj="reportJobListing"
data-test-page={this.state.page}
/>
{this.state.selectedJobs.length > 0 ? this.renderDeleteButton() : null}
</Fragment>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed this to JS file so that it can run in the flaky test runner

export default ({ loadTestFile }) => {
describe('reporting management app', function () {
this.tags('ciGroup7');
loadTestFile(require.resolve('./report_listing'));
Expand Down
13 changes: 10 additions & 3 deletions x-pack/test/functional/apps/reporting_management/report_listing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,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
Expand All @@ -90,7 +93,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);
Expand All @@ -110,7 +115,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'));
Expand Down