Update Chapters list to make modifying a chapter take less scrolling.
This commit is contained in:
@@ -287,7 +287,7 @@ test('unsaved metadata and update settings survive job completion, then save typ
|
||||
change(field(main, 'Lock Authors'), true);
|
||||
change(field(main, 'Lock Authors'), false);
|
||||
input(field(main, 'recheck-days'), '5');
|
||||
change(nodes(section(main, 'Updates')).find((el) => el.attributes.type === 'checkbox'), false);
|
||||
change(nodes(section(main, 'Checking for new chapters')).find((el) => el.attributes.type === 'checkbox'), false);
|
||||
api.on('GET', 'jobs', [{ id: 'job', story_id: 1, status: 'done' }]);
|
||||
await refreshJobs();
|
||||
await settle();
|
||||
@@ -300,10 +300,10 @@ test('unsaved metadata and update settings survive job completion, then save typ
|
||||
assert.deepEqual(api.sent('PUT', 'stories/1/settings').at(-1).body, { locked_fields: ['title'] });
|
||||
assert.deepEqual(api.sent('PUT', 'stories/1/metadata')[0].body,
|
||||
{ values: { title: 'My title', comments: '<p>One</p><p>Two <three></p>' } });
|
||||
await click(section(main, 'Updates'), 'Save');
|
||||
await click(section(main, 'Checking for new chapters'), 'Save');
|
||||
assert.deepEqual(api.sent('PUT', 'stories/1/settings').at(-1).body, { auto_update: false, recheck_days: 5 });
|
||||
input(field(main, 'recheck-days'), '');
|
||||
await click(section(main, 'Updates'), 'Save');
|
||||
await click(section(main, 'Checking for new chapters'), 'Save');
|
||||
assert.equal(api.sent('PUT', 'stories/1/settings').at(-1).body.recheck_days, 0);
|
||||
});
|
||||
|
||||
@@ -325,7 +325,7 @@ test('the metadata card shows the site value only when it differs, and drops the
|
||||
await mountStory();
|
||||
const card = section(main, 'Metadata');
|
||||
assert.match(card.textContent, /Site value differs/);
|
||||
assert.equal(nodes(card).filter((el) => el.tagName === 'summary').length, 1);
|
||||
assert.equal(nodes(card).filter((el) => el.className === 'field-site').length, 1);
|
||||
assert.ok(find(card, 'button', 'Use the site value'));
|
||||
change(field(main, 'Lock Title'), true);
|
||||
assert.match(card.textContent, /Site value differs/);
|
||||
|
||||
Reference in New Issue
Block a user