open-nomad/ui/tests/pages/storage/plugins/list.js

42 lines
1 KiB
JavaScript
Raw Normal View History

2020-05-08 00:25:24 +00:00
import {
clickable,
collection,
create,
fillable,
isPresent,
text,
visitable,
} from 'ember-cli-page-object';
2020-05-05 00:04:40 +00:00
import error from 'nomad-ui/tests/pages/components/error';
import pageSizeSelect from 'nomad-ui/tests/pages/components/page-size-select';
export default create({
pageSize: 25,
visit: visitable('/csi/plugins'),
2020-05-08 00:25:24 +00:00
search: fillable('[data-test-plugins-search] input'),
2020-05-05 00:04:40 +00:00
plugins: collection('[data-test-plugin-row]', {
id: text('[data-test-plugin-id]'),
controllerHealth: text('[data-test-plugin-controller-health]'),
nodeHealth: text('[data-test-plugin-node-health]'),
provider: text('[data-test-plugin-provider]'),
clickRow: clickable(),
clickName: clickable('[data-test-plugin-id] a'),
2020-05-05 00:04:40 +00:00
}),
nextPage: clickable('[data-test-pager="next"]'),
prevPage: clickable('[data-test-pager="prev"]'),
isEmpty: isPresent('[data-test-empty-plugins-list]'),
emptyState: {
headline: text('[data-test-empty-plugins-list-headline]'),
},
error: error(),
pageSizeSelect: pageSizeSelect(),
});