Turn CWA off unless CWA_ENABLED is true
CWA_ENABLED now defaults to false. If a CWA variable is set while CWA is off, the start log has a warning that names it. On the Settings page, the alert about INGEST_DIR moves to Book Downloads and shows with CWA on or off. The Uploads to CWA card moves below Book Downloads.
This commit is contained in:
@@ -54,7 +54,7 @@ test('the upload switches load and save on the settings page', async (t) => {
|
||||
assert.equal(warning.hidden, true);
|
||||
assert.equal(link.attributes['aria-describedby'], '');
|
||||
assert.match(warning.textContent, /Updates without a saved CWA book ID create duplicate books if CWA imports them/);
|
||||
assert.equal(nodes(card).find((el) => el.attributes.id === 'ingest-note').hidden, true);
|
||||
assert.equal(nodes(section(main, 'Book Downloads')).find((el) => el.attributes.id === 'ingest-note').hidden, true);
|
||||
assert.equal(pause.disabled, false);
|
||||
assert.equal(hold.disabled, false);
|
||||
assert.equal(link.disabled, false);
|
||||
@@ -129,7 +129,7 @@ for (const linkBooks of [true, false]) {
|
||||
assert.equal(nodes(card).find((el) => el.attributes.id === 'link-note').hidden, linkBooks);
|
||||
assert.equal(pause.checked, true);
|
||||
assert.equal(pause.disabled, true);
|
||||
const note = nodes(card).find((el) => el.attributes.id === 'ingest-note');
|
||||
const note = nodes(section(main, 'Book Downloads')).find((el) => el.attributes.id === 'ingest-note');
|
||||
assert.equal(note.hidden, false);
|
||||
assert.equal(note.className, 'notice');
|
||||
assert.equal(pause.attributes['aria-describedby'], note.attributes.id);
|
||||
|
||||
Reference in New Issue
Block a user