open-vault/ui/tests/pages/secrets/backend/kv/show.js
Matthew Irish 5e5b6e9f7a
UI json edit test (#5705)
* add new codemirror helpers

* adding json helpers to the secret pages

* mark the edit button / link as the edit element instead of the json toggle

* add acceptance tests for JSON editing
2018-11-09 14:00:53 -06:00

16 lines
557 B
JavaScript

import { Base } from '../show';
import { create, clickable, collection, isPresent } from 'ember-cli-page-object';
import { code } from 'vault/tests/pages/helpers/codemirror';
export default create({
...Base,
rows: collection('data-test-row-label'),
toggleJSON: clickable('[data-test-secret-json-toggle]'),
toggleIsPresent: isPresent('[data-test-secret-json-toggle]'),
edit: clickable('[data-test-secret-edit]'),
editIsPresent: isPresent('[data-test-secret-edit]'),
editor: {
content: code('[data-test-component="json-editor"]'),
},
});