Atomic components: test
Component for structuring tests, heavily inspired by SUIT CSS.
Read more about Atomic framework.
Installation
-
Bower:
bower install --save atomic-css-components-test -
Component(1):
component install atomic-css/components-test - Download: zip, tar.gz
-
Git:
git clone https://github.com/atomic-css/components-test.git
Available classes
-
Test- core test component -
Test-title- test title -
Test-describe- the 'describe' block -
Test-it- the 'it' block -
Test-it--success- successfull 'it' block -
Test-it--error- errorneous 'it' block -
Test-run- the 'it' block -
Test-support- browser support wrapper -
Test-browser- browser and its version -
Test-browser--android- Android -
Test-browser--blackberry- Blackberry -
Test-browser--chrome- Chrome -
Test-browser--chromeCanary- Chrome Canary -
Test-browser--firefox- Firefox -
Test-browser--firefoxNightly- Firefox Nightly -
Test-browser--ie- Internet Explorer -
Test-browser--ieMobile- IE Mobile -
Test-browser--opera- Opera -
Test-browser--safari- Safari -
Test-browser--safariIos- iOS Safari
Usage
The Test component is useful for structuring tests of other components and utilities.
It mimics JavaScript's describe and it blocks.
<div class="Test">
<ul class="Test-support">
<li class="Test-browser Test-browser--chrome">10+</li>
...
</ul>
<h2 class="Test-describe">.ComponentName</h2>
<h3 class="Test-it [Test-it--success|Test-it--error]">Should do something.</h3>
<div class="Test-run">
<p>The test itself</p>
</div>
</div>Browser support
- Google Chrome (latest)
- Opera (latest)
- Firefox 4+
- Safari 5+
- Internet Explorer 8+