rating_test.js 698 B

12345678910111213141516171819
  1. var assert = require('assert');
  2. var value = '';
  3. Feature('rating');
  4. Scenario('should be disabled if "readonly" is specified', async (I) => {
  5. I.amOnPage('read-only.html');
  6. value = await I.grabAttributeFrom('[id="root[rating]5"]', 'disabled');
  7. assert.equal(value, 'true');
  8. value = await I.grabAttributeFrom('[id="root[rating]4"]', 'disabled');
  9. assert.equal(value, 'true');
  10. value = await I.grabAttributeFrom('[id="root[rating]3"]', 'disabled');
  11. assert.equal(value, 'true');
  12. value = await I.grabAttributeFrom('[id="root[rating]2"]', 'disabled');
  13. assert.equal(value, 'true');
  14. value = await I.grabAttributeFrom('[id="root[rating]1"]', 'disabled');
  15. assert.equal(value, 'true');
  16. });