diff --git a/tests/e2e/pdf-settings/advanced/restrict-owner-field.test.js b/tests/e2e/pdf-settings/advanced/restrict-owner-field.test.js index 9186556e7..e5697b70c 100644 --- a/tests/e2e/pdf-settings/advanced/restrict-owner-field.test.js +++ b/tests/e2e/pdf-settings/advanced/restrict-owner-field.test.js @@ -1,28 +1,37 @@ -import { fieldLabel } from '../../utilities/page-model/helpers/field' -import Pdf from '../../utilities/page-model/helpers/pdf' +import { fieldLabel } from '../../utilities/page-model/helpers/field'; +import Pdf from '../../utilities/page-model/helpers/pdf'; -const run = new Pdf() +const run = new Pdf(); -fixture`PDF advanced settings - Restrict owner field test` +fixture`PDF advanced settings - Restrict owner field test`; -test('should display \'Restrict Owner\' field', async t => { - // Actions - await run.navigatePdfSection('gf_edit_forms&view=settings&subview=PDF&id=4') +test("should display 'Restrict Owner' field", async (t) => { + // Actions + await run.navigatePdfSection( + 'gf_edit_forms&view=settings&subview=PDF&id=4' + ); - // Assertions - await t - .expect(fieldLabel('Restrict Owner').exists).ok() - .expect(run.restrictOwnerCheckbox.exists).ok() -}) + // Assertions + await t + .expect(fieldLabel('Restrict Owner').exists) + .ok() + .expect(run.restrictOwnerCheckbox.exists) + .ok(); +}); -test('should save toggled checkbox value', async t => { - // Actions & Assertions - await run.navigatePdfSection('gf_edit_forms&view=settings&subview=PDF&id=4') - await t - .click(run.restrictOwnerCheckbox) - .click(run.saveSettings) - .expect(run.restrictOwnerCheckbox.checked).ok() - .click(run.restrictOwnerCheckbox) - .click(run.saveSettings) - .expect(run.restrictOwnerCheckbox.checked).notOk() -}) +test('should save toggled checkbox value', async (t) => { + // Actions & Assertions + await run.navigatePdfSection( + 'gf_edit_forms&view=settings&subview=PDF&id=4' + ); + await t + .click(run.restrictOwnerCheckbox) + .click(run.saveSettings) + .wait(500) + .expect(run.restrictOwnerCheckbox.checked) + .ok() + .click(run.restrictOwnerCheckbox) + .click(run.saveSettings) + .expect(run.restrictOwnerCheckbox.checked) + .notOk(); +});