-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: re-enable result title slot (#1384)
* fix: re-enable result title slot * chore: add test
- Loading branch information
1 parent
6f86d92
commit 22d40d6
Showing
5 changed files
with
46 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** | ||
* Tests the available slots to correctly render | ||
*/ | ||
const slotRenderTest = () => { | ||
const filtersTitle = "Foo"; | ||
const resultsTitle = "Bar"; | ||
cy.mount( | ||
` | ||
<eox-itemfilter> | ||
<p slot="filterstitle">${filtersTitle}</p> | ||
<p slot="resultstitle">${resultsTitle}</p> | ||
</eox-itemfilter>`, | ||
).as("eox-itemfilter"); | ||
cy.get("eox-itemfilter") | ||
.shadow() | ||
.within(() => { | ||
cy.get('slot[name="filterstitle"]').and(($el) => { | ||
expect($el[0].assignedNodes()[0].textContent).to.equal(filtersTitle); | ||
}); | ||
cy.get('slot[name="resultstitle"]').and(($el) => { | ||
expect($el[0].assignedNodes()[0].textContent).to.equal(resultsTitle); | ||
}); | ||
}); | ||
}; | ||
|
||
export default slotRenderTest; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters