mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-17 13:09:49 -04:00
Removed links to the sticky javascript, but didn't remove altogether
This commit is contained in:
@@ -299,19 +299,20 @@ describe('TemplateFolderForm', () => {
|
||||
|
||||
});
|
||||
|
||||
test("should make the current controls sticky", () => {
|
||||
// Removing sticky functionality
|
||||
// test("should make the current controls sticky", () => {
|
||||
|
||||
// the class the sticky JS hooks into should be present
|
||||
expect(formControls.querySelector('#nothing_selected .js-stick-at-bottom-when-scrolling')).not.toBeNull();
|
||||
// // the class the sticky JS hooks into should be present
|
||||
// expect(formControls.querySelector('#nothing_selected .js-stick-at-bottom-when-scrolling')).not.toBeNull();
|
||||
|
||||
// .recalculate should have been called so the sticky JS picks up the controls
|
||||
expect(GOVUK.stickAtBottomWhenScrolling.recalculate.mock.calls.length).toEqual(1);
|
||||
// // .recalculate should have been called so the sticky JS picks up the controls
|
||||
// expect(GOVUK.stickAtBottomWhenScrolling.recalculate.mock.calls.length).toEqual(1);
|
||||
|
||||
// mode should have been set to 'default' as the controls only have one part
|
||||
expect(GOVUK.stickAtBottomWhenScrolling.setMode.mock.calls.length).toEqual(1);
|
||||
expect(GOVUK.stickAtBottomWhenScrolling.setMode.mock.calls[0][0]).toEqual('default');
|
||||
// // mode should have been set to 'default' as the controls only have one part
|
||||
// expect(GOVUK.stickAtBottomWhenScrolling.setMode.mock.calls.length).toEqual(1);
|
||||
// expect(GOVUK.stickAtBottomWhenScrolling.setMode.mock.calls[0][0]).toEqual('default');
|
||||
|
||||
});
|
||||
// });
|
||||
|
||||
});
|
||||
|
||||
@@ -421,19 +422,20 @@ describe('TemplateFolderForm', () => {
|
||||
|
||||
});
|
||||
|
||||
test("should make the current controls sticky", () => {
|
||||
// Removing sticky functionality
|
||||
// test("should make the current controls sticky", () => {
|
||||
|
||||
// the classes the sticky JS hooks into should be present for both parts
|
||||
expect(formControls.querySelectorAll('#add_new_template_form .js-stick-at-bottom-when-scrolling').length).toEqual(2);
|
||||
// // the classes the sticky JS hooks into should be present for both parts
|
||||
// expect(formControls.querySelectorAll('#add_new_template_form .js-stick-at-bottom-when-scrolling').length).toEqual(2);
|
||||
|
||||
// .recalculate should have been called so the sticky JS picks up the controls
|
||||
expect(GOVUK.stickAtBottomWhenScrolling.recalculate.mock.calls.length).toEqual(1);
|
||||
// // .recalculate should have been called so the sticky JS picks up the controls
|
||||
// expect(GOVUK.stickAtBottomWhenScrolling.recalculate.mock.calls.length).toEqual(1);
|
||||
|
||||
// the mode should be set to 'dialog' so both parts can be sticky
|
||||
expect(GOVUK.stickAtBottomWhenScrolling.setMode.mock.calls.length).toEqual(1);
|
||||
expect(GOVUK.stickAtBottomWhenScrolling.setMode.mock.calls[0][0]).toEqual('dialog');
|
||||
// // the mode should be set to 'dialog' so both parts can be sticky
|
||||
// expect(GOVUK.stickAtBottomWhenScrolling.setMode.mock.calls.length).toEqual(1);
|
||||
// expect(GOVUK.stickAtBottomWhenScrolling.setMode.mock.calls[0][0]).toEqual('dialog');
|
||||
|
||||
});
|
||||
// });
|
||||
|
||||
describe("When the 'Cancel' link is clicked after choosing to add a new template", () => {
|
||||
|
||||
@@ -533,13 +535,13 @@ describe('TemplateFolderForm', () => {
|
||||
|
||||
});
|
||||
|
||||
test("should make the current controls sticky", () => {
|
||||
test("", () => {
|
||||
|
||||
// the class the sticky JS hooks into should be present
|
||||
expect(formControls.querySelector('#add_new_folder_form .js-stick-at-bottom-when-scrolling')).not.toBeNull();
|
||||
|
||||
// .recalculate should have been called so the sticky JS picks up the controls
|
||||
expect(GOVUK.stickAtBottomWhenScrolling.recalculate.mock.calls.length).toEqual(1);
|
||||
expect(GOVUK.stickAtBottomWhenScrolling.recalculate.mock.calls.length).toEqual(0);
|
||||
|
||||
// mode should have been set to 'default' as the controls only have one part
|
||||
expect(GOVUK.stickAtBottomWhenScrolling.setMode.mock.calls.length).toEqual(1);
|
||||
@@ -607,19 +609,20 @@ describe('TemplateFolderForm', () => {
|
||||
|
||||
});
|
||||
|
||||
test("should make the current controls sticky", () => {
|
||||
// Removing sticky functionality
|
||||
// test("should make the current controls sticky", () => {
|
||||
|
||||
// the class the sticky JS hooks into should be present
|
||||
expect(formControls.querySelector('#items_selected .js-stick-at-bottom-when-scrolling')).not.toBeNull();
|
||||
// // the class the sticky JS hooks into should be present
|
||||
// expect(formControls.querySelector('#items_selected .js-stick-at-bottom-when-scrolling')).not.toBeNull();
|
||||
|
||||
// .recalculate should have been called so the sticky JS picks up the controls
|
||||
expect(GOVUK.stickAtBottomWhenScrolling.recalculate.mock.calls.length).toEqual(1);
|
||||
// // .recalculate should have been called so the sticky JS picks up the controls
|
||||
// expect(GOVUK.stickAtBottomWhenScrolling.recalculate.mock.calls.length).toEqual(1);
|
||||
|
||||
// mode should have been set to 'default' as the controls only have one part
|
||||
expect(GOVUK.stickAtBottomWhenScrolling.setMode.mock.calls.length).toEqual(1);
|
||||
expect(GOVUK.stickAtBottomWhenScrolling.setMode.mock.calls[0][0]).toEqual('default');
|
||||
// // mode should have been set to 'default' as the controls only have one part
|
||||
// expect(GOVUK.stickAtBottomWhenScrolling.setMode.mock.calls.length).toEqual(1);
|
||||
// expect(GOVUK.stickAtBottomWhenScrolling.setMode.mock.calls[0][0]).toEqual('default');
|
||||
|
||||
});
|
||||
// });
|
||||
|
||||
describe("'Clear selection' link", () => {
|
||||
|
||||
@@ -755,19 +758,20 @@ describe('TemplateFolderForm', () => {
|
||||
|
||||
});
|
||||
|
||||
test("should make the current controls sticky", () => {
|
||||
// Removing sticky functionality
|
||||
// test("should make the current controls sticky", () => {
|
||||
|
||||
// the classes the sticky JS hooks into should be present for both parts
|
||||
expect(formControls.querySelectorAll('#move_to_folder_radios .js-stick-at-bottom-when-scrolling').length).toEqual(2);
|
||||
// // the classes the sticky JS hooks into should be present for both parts
|
||||
// expect(formControls.querySelectorAll('#move_to_folder_radios .js-stick-at-bottom-when-scrolling').length).toEqual(2);
|
||||
|
||||
// .recalculate should have been called so the sticky JS picks up the controls
|
||||
expect(GOVUK.stickAtBottomWhenScrolling.recalculate.mock.calls.length).toEqual(1);
|
||||
// // .recalculate should have been called so the sticky JS picks up the controls
|
||||
// expect(GOVUK.stickAtBottomWhenScrolling.recalculate.mock.calls.length).toEqual(1);
|
||||
|
||||
// the mode should be set to 'dialog' so both parts can be sticky
|
||||
expect(GOVUK.stickAtBottomWhenScrolling.setMode.mock.calls.length).toEqual(1);
|
||||
expect(GOVUK.stickAtBottomWhenScrolling.setMode.mock.calls[0][0]).toEqual('dialog');
|
||||
// // the mode should be set to 'dialog' so both parts can be sticky
|
||||
// expect(GOVUK.stickAtBottomWhenScrolling.setMode.mock.calls.length).toEqual(1);
|
||||
// expect(GOVUK.stickAtBottomWhenScrolling.setMode.mock.calls[0][0]).toEqual('dialog');
|
||||
|
||||
});
|
||||
// });
|
||||
|
||||
describe("When the 'Cancel' link is clicked after choosing to move a template or folder", () => {
|
||||
|
||||
@@ -857,19 +861,20 @@ describe('TemplateFolderForm', () => {
|
||||
|
||||
});
|
||||
|
||||
test("should make the current controls sticky", () => {
|
||||
// Removing sticky functionality
|
||||
// test("should make the current controls sticky", () => {
|
||||
|
||||
// the class the sticky JS hooks into should be present
|
||||
expect(formControls.querySelector('#move_to_new_folder_form .js-stick-at-bottom-when-scrolling')).not.toBeNull();
|
||||
// // the class the sticky JS hooks into should be present
|
||||
// expect(formControls.querySelector('#move_to_new_folder_form .js-stick-at-bottom-when-scrolling')).not.toBeNull();
|
||||
|
||||
// .recalculate should have been called so the sticky JS picks up the controls
|
||||
expect(GOVUK.stickAtBottomWhenScrolling.recalculate.mock.calls.length).toEqual(1);
|
||||
// // .recalculate should have been called so the sticky JS picks up the controls
|
||||
// expect(GOVUK.stickAtBottomWhenScrolling.recalculate.mock.calls.length).toEqual(1);
|
||||
|
||||
// mode should have been set to 'default' as the controls only have one part
|
||||
expect(GOVUK.stickAtBottomWhenScrolling.setMode.mock.calls.length).toEqual(1);
|
||||
expect(GOVUK.stickAtBottomWhenScrolling.setMode.mock.calls[0][0]).toEqual('default');
|
||||
// // mode should have been set to 'default' as the controls only have one part
|
||||
// expect(GOVUK.stickAtBottomWhenScrolling.setMode.mock.calls.length).toEqual(1);
|
||||
// expect(GOVUK.stickAtBottomWhenScrolling.setMode.mock.calls[0][0]).toEqual('default');
|
||||
|
||||
});
|
||||
// });
|
||||
|
||||
describe("When the 'Cancel' link is clicked after choosing to add a template or folder to a new folder", () => {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user