Skip to content

Commit

Permalink
Fixing prettier issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
dbreese committed Nov 6, 2023
1 parent 7330569 commit 0f677c3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ describe("c-edit-contact-record", () => {
expect(form.objectApiName).toBe(OBJECT_API_NAME);

const submitButton = element.shadowRoot.querySelector(
'lightning-button[data-id="submit"]'
'lightning-button[data-id="submit"]',
);
expect(submitButton.type).toBe("submit");

const cancelButton = element.shadowRoot.querySelector(
'lightning-button[data-id="cancel"]'
'lightning-button[data-id="cancel"]',
);
expect(cancelButton.type).toBe("button");

Expand All @@ -65,15 +65,15 @@ describe("c-edit-contact-record", () => {

// get the input fields and ensure they are in the correct order
const outputFieldNames = Array.from(
element.shadowRoot.querySelectorAll("lightning-input-field")
element.shadowRoot.querySelectorAll("lightning-input-field"),
).map((outputField) => outputField.fieldName);
expect(outputFieldNames).toEqual(INPUT_FIELDS);

// Resolve a promise to wait for a re-render of the new content to include the name value
// that is built after the @wire executes.
return Promise.resolve().then(() => {
const displayName = element.shadowRoot.querySelector(
'lightning-layout-item[data-id="name"]'
'lightning-layout-item[data-id="name"]',
);

const mockedName = mockRecord.fields.Name.value;
Expand All @@ -93,7 +93,7 @@ describe("c-edit-contact-record", () => {
const backSpy = jest.spyOn(window.history, "back");

const cancelButton = element.shadowRoot.querySelector(
'lightning-button[data-id="cancel"]'
'lightning-button[data-id="cancel"]',
);
cancelButton.click();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ describe("c-edit-opportunity-record", () => {
expect(form.objectApiName).toBe(OBJECT_API_NAME);

const submitButton = element.shadowRoot.querySelector(
'lightning-button[data-id="submit"]'
'lightning-button[data-id="submit"]',
);
expect(submitButton.type).toBe("submit");

const cancelButton = element.shadowRoot.querySelector(
'lightning-button[data-id="cancel"]'
'lightning-button[data-id="cancel"]',
);
expect(cancelButton.type).toBe("button");

Expand All @@ -63,15 +63,15 @@ describe("c-edit-opportunity-record", () => {

// get the input fields and ensure they are in the correct order
const outputFieldNames = Array.from(
element.shadowRoot.querySelectorAll("lightning-input-field")
element.shadowRoot.querySelectorAll("lightning-input-field"),
).map((outputField) => outputField.fieldName);
expect(outputFieldNames).toEqual(INPUT_FIELDS);

// Resolve a promise to wait for a re-render of the new content to include the name value
// that is built after the @wire executes.
return Promise.resolve().then(() => {
const displayName = element.shadowRoot.querySelector(
'lightning-layout-item[data-id="name"]'
'lightning-layout-item[data-id="name"]',
);

const mockedName = mockRecord.fields.Name.value;
Expand All @@ -91,7 +91,7 @@ describe("c-edit-opportunity-record", () => {
const backSpy = jest.spyOn(window.history, "back");

const cancelButton = element.shadowRoot.querySelector(
'lightning-button[data-id="cancel"]'
'lightning-button[data-id="cancel"]',
);
cancelButton.click();

Expand Down

0 comments on commit 0f677c3

Please sign in to comment.