2020-12-10 17:51:22 +00:00
|
|
|
import { clickable, create, isPresent, text, visitable } from 'ember-cli-page-object';
|
2020-05-05 04:36:28 +00:00
|
|
|
|
|
|
|
import allocations from 'nomad-ui/tests/pages/components/allocations';
|
|
|
|
|
|
|
|
export default create({
|
|
|
|
visit: visitable('/csi/plugins/:id'),
|
|
|
|
|
|
|
|
title: text('[data-test-title]'),
|
|
|
|
|
2020-05-18 22:28:41 +00:00
|
|
|
controllerHealthIsPresent: isPresent('[data-test-plugin-controller-health]'),
|
2020-05-05 04:36:28 +00:00
|
|
|
controllerHealth: text('[data-test-plugin-controller-health]'),
|
|
|
|
nodeHealth: text('[data-test-plugin-node-health]'),
|
|
|
|
provider: text('[data-test-plugin-provider]'),
|
|
|
|
|
2020-05-18 21:52:26 +00:00
|
|
|
controllerAvailabilityIsPresent: isPresent('[data-test-plugin-controller-availability]'),
|
|
|
|
nodeAvailabilityIsPresent: isPresent('[data-test-plugin-node-availability]'),
|
|
|
|
|
2020-05-05 04:36:28 +00:00
|
|
|
...allocations('[data-test-controller-allocation]', 'controllerAllocations'),
|
|
|
|
...allocations('[data-test-node-allocation]', 'nodeAllocations'),
|
|
|
|
|
2020-05-20 01:01:42 +00:00
|
|
|
goToControllerAllocations: clickable('[data-test-go-to-controller-allocations]'),
|
|
|
|
goToNodeAllocations: clickable('[data-test-go-to-node-allocations]'),
|
2020-05-20 21:22:47 +00:00
|
|
|
goToControllerAllocationsText: text('[data-test-go-to-controller-allocations]'),
|
|
|
|
goToNodeAllocationsText: text('[data-test-go-to-node-allocations]'),
|
2020-05-20 01:01:42 +00:00
|
|
|
|
2020-05-18 22:28:41 +00:00
|
|
|
controllerTableIsPresent: isPresent('[data-test-controller-allocations]'),
|
|
|
|
|
2020-05-05 04:36:28 +00:00
|
|
|
controllerTableIsEmpty: isPresent('[data-test-empty-controller-allocations]'),
|
|
|
|
controllerEmptyState: {
|
|
|
|
headline: text('[data-test-empty-controller-allocations-headline]'),
|
|
|
|
},
|
|
|
|
|
|
|
|
nodeTableIsEmpty: isPresent('[data-test-empty-node-allocations]'),
|
|
|
|
nodeEmptyState: {
|
|
|
|
headline: text('[data-test-empty-node-allocations-headline]'),
|
|
|
|
},
|
|
|
|
});
|