Skip to content

Commit

Permalink
Correcting cypress selector on contact info wrappers
Browse files Browse the repository at this point in the history
  • Loading branch information
spaceo committed Oct 10, 2023
1 parent 26e7564 commit 4afdff0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/tests/unit/__snapshots__/contact-info.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`ContactInfoInputs > Should NOT wrap the input fields if it is NOT inline 1`] = `
<div
data-cy="contact-info-input-inline"
data-cy="contact-info-input"
>
<p>
One input component
Expand All @@ -16,7 +16,7 @@ exports[`ContactInfoInputs > Should NOT wrap the input fields if it is NOT inlin
exports[`ContactInfoInputs > Should wrap the input fields if it is inline 1`] = `
<div
class="contact-info-flex"
data-cy="contact-info-input"
data-cy="contact-info-input-inline"
>
<div
class="patron__input--desktop mr-16"
Expand Down
8 changes: 4 additions & 4 deletions src/tests/unit/contact-info.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,25 @@ configure({
describe("ContactInfoInputs", () => {
it("Should wrap the input fields if it is inline", async () => {
const { getByTestId } = render(
<ContactInfoInputs isInline>
<ContactInfoInputs dataCy="contact-info-input-inline" isInline>
<p>One input component</p>
<p>Another input component</p>
</ContactInfoInputs>
);

const contactInfoInputs = getByTestId("contact-info-input");
const contactInfoInputs = getByTestId("contact-info-input-inline");

expect(contactInfoInputs).toMatchSnapshot();
});
it("Should NOT wrap the input fields if it is NOT inline", async () => {
const { getByTestId } = render(
<ContactInfoInputs dataCy="contact-info-input-inline" isInline={false}>
<ContactInfoInputs isInline={false}>
<p>One input component</p>
<p>Another input component</p>
</ContactInfoInputs>
);

const contactInfoInputs = getByTestId("contact-info-input-inline");
const contactInfoInputs = getByTestId("contact-info-input");

expect(contactInfoInputs).toMatchSnapshot();
});
Expand Down

0 comments on commit 4afdff0

Please sign in to comment.