(core) Add dialog with options to allow downloading without history or data

Summary:
{F74398}

Refactored the 'radio checkboxes' in the modal for deleting a page and reused them here.

The option to download as a template already existed in the server code but wasn't being exercised by the frontend. Also added an option to remove just the history, which is the main motivation for this diff.

Test Plan: Expanded the existing nbrowser test.

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D3999
This commit is contained in:
Alex Hall
2023-08-18 12:54:03 +02:00
parent a1d31e41ad
commit 166312be3a
8 changed files with 121 additions and 69 deletions

View File

@@ -69,7 +69,7 @@ describe('Views.ntest', function() {
assert.equal(await gu.actions.getActiveTab().text(), 'Table1');
assert.deepEqual(await $(`.test-docpage-label`).array().text(), ['Table1', 'Table3']);
await gu.actions.tableView('Table1').selectOption('Remove');
await $(".test-removepage-option-page").click();
await $(".test-option-page").click();
await $(".test-modal-confirm").click();
await gu.waitForServer();
assert.equal(await gu.actions.getActiveTab().text(), 'Table3');

View File

@@ -1144,7 +1144,7 @@ export async function removePage(name: string|RegExp, options: {
const popupTables = await driver.findAll(".test-removepage-table", e => e.getText());
assert.deepEqual(popupTables.sort(), options.tables.sort());
}
await popup.find(`.test-removepage-option-${options.withData ? 'data': 'page'}`).click();
await popup.find(`.test-option-${options.withData ? 'data': 'page'}`).click();
if (options.cancel) {
await driver.find(".test-modal-cancel").click();
} else {