Polymer step operations webcomponents
First, make sure you have the Polymer CLI installed. Then run polymer serve
to serve your element locally.
$ polymer serve
<dom-bind>
<template>
<step-operation-container
operation-as-string="{{ string_tool_step_operation }}"
operation="{% verbatim %}{{operation}}{% endverbatim %}">
<operation-step
operation="{% verbatim %}{{operation}}{% endverbatim %}"
result="{% verbatim %}{{selected_name}}{% endverbatim %}">
<div class="field">
<dropdown-selector
url="..."
selected="{% verbatim %}{{selected_name}}{% endverbatim %}"
</dropdown-selector>
</div>
</operation-step>
<operation-step
operation="{% verbatim %}{{operation}}{% endverbatim %}"
result="{% verbatim %}{{selected_surname}}{% endverbatim %}">
<div class="field">
<dropdown-selector
url="..."
selected="{% verbatim %}{{selected_surname}}{% endverbatim %}"
</dropdown-selector>
</div>
</operation-step>
<operation-step
operation="{% verbatim %}{{operation}}{% endverbatim %}"
result="{% verbatim %}{{operation_result}}{% endverbatim %}">
<django-csrf-token headers="{% verbatim %}{{tokenHeaders}}{% endverbatim %}"></django-csrf-token>
<apply-operation-step
operation="{% verbatim %}{{operation}}{% endverbatim %}"
result="{% verbatim %}{{operation_result}}{% endverbatim %}"
url="..."
headers="[[tokenHeaders]]">
<div class="review">
[[selected_name]] [[selected_surname]]
</div>
</apply-operation-step>
</operation-step>
<operation-step
operation="{% verbatim %}{{operation}}{% endverbatim %}">
<div class="result">
<h2>[[operation_result.message]]</h2>
</div>
</operation-step>
</step-operation-container>
</template>
</dom-bind>
Operation JSON object example:
{
"key": "module.name",
"name": "Operation name",
"description": "...",
"steps": [
{
"key": "select_name",
"name": "Select name",
"description": null,
"enabled": true,
"enables": ["select_surname"],
"result": null
},
{
"key": "select_surname",
"name": "Select surname",
"description": none,
"enabled": false,
"enables": ["review"],
"result": null
},
{
"key": "review",
"name": "Review",
"description": null,
"enabled": false,
"enables": ["results"],
"result": null
},
{
"key": "results",
"name": "Results",
"description": null,
"enabled": false,
"enables": [],
"result": null
}
]
}
...
$ polymer test
Your application is already set up to be tested via web-component-tester. Run polymer test
to run your application's test suite locally.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
TODO: Write history
TODO: Write credits
Apache 2.0