Skip to content

Commit

Permalink
Merge branch 'main' into fix/card-wraper-div-height
Browse files Browse the repository at this point in the history
  • Loading branch information
m4olivei authored Dec 3, 2024
2 parents a75658f + 41999ed commit 532e5a0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const Large = (args) => {
</c4d-image>
<c4d-card-eyebrow>${eyebrow}</c4d-card-eyebrow>
<c4d-card-heading>${heading}</c4d-card-heading>
${copy && html`<p></p>`}
${copy ? html`<p>${copy}</p>` : ''}
<c4d-feature-card-footer> </c4d-feature-card-footer>
</c4d-feature-card>
`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ describe('c4d-feature-card | medium', () => {
});
});

it.skip('should have image on the left and content on the right side of the card', () => {
it('should have image on the left and content on the right side of the card', () => {
// image takes the left half
cy.get('c4d-image').then(($image) => {
expect($image[0].getBoundingClientRect().left).to.equal(32);
expect($image[0].getBoundingClientRect().left).to.equal(33);
expect($image[0].getBoundingClientRect().right).to.equal(328);
});

Expand All @@ -75,7 +75,7 @@ describe('c4d-feature-card | medium', () => {
.find('.cds--card__wrapper')
.then(($content) => {
expect($content[0].getBoundingClientRect().left).to.equal(328);
expect($content[0].getBoundingClientRect().right).to.equal(624);
expect($content[0].getBoundingClientRect().right).to.equal(623);
});
});

Expand Down Expand Up @@ -161,16 +161,17 @@ describe('c4d-feature-card | large', () => {
});
});

it.skip('should have eyebrow, heading, and copy content', () => {
it('should have eyebrow, heading, and copy content', () => {
cy.get('c4d-card-eyebrow').invoke('text').should('not.be.empty');
cy.get('c4d-card-heading').invoke('text').should('not.be.empty');
cy.get('c4d-feature-card > p').invoke('text').should('not.be.empty');
});


it.skip('should have image on the left and content on the right half of the card', () => {
it('should have image on the left and content on the right half of the card', () => {
// image takes the left half
cy.get('c4d-image').then(($image) => {
expect($image[0].getBoundingClientRect().left).to.equal(16);
expect($image[0].getBoundingClientRect().left).to.equal(33);
expect($image[0].getBoundingClientRect().right).to.equal(529);
});

Expand All @@ -180,7 +181,7 @@ describe('c4d-feature-card | large', () => {
.find('.cds--card__wrapper')
.then(($content) => {
expect($content[0].getBoundingClientRect().left).to.equal(529);
expect($content[0].getBoundingClientRect().right).to.equal(1042);
expect($content[0].getBoundingClientRect().right).to.equal(1025);
});
});

Expand Down

0 comments on commit 532e5a0

Please sign in to comment.