UX: don't show 'auto delete' option for TL4

This commit is contained in:
Régis Hanol
2018-05-17 00:42:48 +02:00
parent 01b0d9d235
commit 674318e127
2 changed files with 24 additions and 13 deletions

View File

@ -1,4 +1,4 @@
import { acceptance } from 'helpers/qunit-helpers';
import { acceptance, replaceCurrentUser } from 'helpers/qunit-helpers';
acceptance('Topic - Edit timer', { loggedIn: true });
QUnit.test('default', assert => {
@ -162,6 +162,22 @@ QUnit.test('schedule', assert => {
});
});
QUnit.test("TL4 can't auto-delete", assert => {
replaceCurrentUser({ staff: false, trust_level: 4 });
visit('/t/internationalization-localization');
click('.toggle-admin-menu');
click('.topic-admin-status-update button');
const timerType = selectKit('.select-kit.timer-type');
timerType.expand();
andThen(() => {
assert.ok(!timerType.rowByValue("delete").exists());
});
});
QUnit.test('auto delete', assert => {
const timerType = selectKit('.select-kit.timer-type');
const futureDateInputSelector = selectKit('.future-date-input-selector');