Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('can create a contact from the event form', () => {
addContacts();
nav('/planning');
// Create the Event with base values
event = {
name: 'Test',
dates: {
start: {date: '12/12/2045', time: '00:00'},
end: {time: '00:59'},
},
};
subNavBar.createEvent();
editor.inputValues(event);
const contactInput = new ContactInput(editor.editor);
// Search for Foo Bar
contactInput.searchContacts('foo');
30000,
'Timeout while waiting for the Workqueue item title to be "Plan*"'
);
// Minimize then open the item
editor.minimizeButton.click();
item1.openItem();
editor.openAllToggleBoxes();
expect(editor.editors.count()).toBe(1);
expect(editor.planningType.count()).toBe(1);
editor.expectValues(plan);
// Navigate to Workspace, then back to Planning
nav('/workspace');
nav('/planning');
editor.openAllToggleBoxes();
expect(editor.editors.count()).toBe(1);
expect(editor.planningType.count()).toBe(1);
editor.expectValues(plan);
// Refresh the page while the Event is open in the Editor
browser.navigate().refresh();
editor.openAllToggleBoxes();
expect(editor.editors.count()).toBe(1);
expect(editor.planningType.count()).toBe(1);
editor.expectValues(plan);
// Now minimize the item and reload the page (so the editor is not open when the page opens)
editor.minimizeButton.click();
() => item1.isTitle('Plan*'),
30000,
'Timeout while waiting for the Workqueue item title to be "Plan*"'
);
// Minimize then open the item
editor.minimizeButton.click();
item1.openItem();
editor.openAllToggleBoxes();
expect(editor.editors.count()).toBe(1);
expect(editor.planningType.count()).toBe(1);
editor.expectValues(plan);
// Navigate to Workspace, then back to Planning
nav('/workspace');
nav('/planning');
editor.openAllToggleBoxes();
expect(editor.editors.count()).toBe(1);
expect(editor.planningType.count()).toBe(1);
editor.expectValues(plan);
// Refresh the page while the Event is open in the Editor
browser.navigate().refresh();
editor.openAllToggleBoxes();
expect(editor.editors.count()).toBe(1);
expect(editor.planningType.count()).toBe(1);
editor.expectValues(plan);
// Now minimize the item and reload the page (so the editor is not open when the page opens)
7500,
'Timeout while waiting for the Workqueue item title to be "Event*"'
);
// Minimize then open the item
editor.minimizeButton.click();
item1.openItem();
editor.openAllToggleBoxes();
expect(editor.editors.count()).toBe(1);
expect(editor.eventType.count()).toBe(1);
editor.expectValues(expectedEvent);
// Navigate to Workspace, then back to Planning
nav('/workspace');
nav('/planning');
editor.openAllToggleBoxes();
expect(editor.editors.count()).toBe(1);
expect(editor.eventType.count()).toBe(1);
editor.expectValues(expectedEvent);
// Refresh the page while the Event is open in the Editor
browser.navigate().refresh();
editor.openAllToggleBoxes();
expect(editor.editors.count()).toBe(1);
expect(editor.eventType.count()).toBe(1);
editor.expectValues(expectedEvent);
// Now minimize the item and reload the page (so the editor is not open when the page opens)
'Timeout while waiting for the Workqueue item title to be "Event*"'
);
// Minimize then open the item
editor.minimizeButton.click();
item1.openItem();
editor.openAllToggleBoxes();
expect(editor.editors.count()).toBe(1);
expect(editor.eventType.count()).toBe(1);
editor.expectValues(expectedEvent);
// Navigate to Workspace, then back to Planning
nav('/workspace');
nav('/planning');
editor.openAllToggleBoxes();
expect(editor.editors.count()).toBe(1);
expect(editor.eventType.count()).toBe(1);
editor.expectValues(expectedEvent);
// Refresh the page while the Event is open in the Editor
browser.navigate().refresh();
editor.openAllToggleBoxes();
expect(editor.editors.count()).toBe(1);
expect(editor.eventType.count()).toBe(1);
editor.expectValues(expectedEvent);
// Now minimize the item and reload the page (so the editor is not open when the page opens)
editor.minimizeButton.click();
const addContacts = () => {
nav('/contacts');
const mgr = new ContactManager();
const inputs = {
first_name: mgr.editor.getFormInput('first_name'),
last_name: mgr.editor.getFormInput('last_name'),
email: mgr.editor.getFormInput('contact_email[0]'),
};
mgr.addButton.click();
inputs.first_name.setValue('Foo');
inputs.last_name.setValue('Bar');
mgr.editor.addEmail('foo@bar.com');
mgr.editor.saveButton.click();
browser.wait(