-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(file): Added download attributes. - OEL-2772 #573
Changes from 6 commits
43d7c4f
b47fce8
a1a3aa8
35f0396
e8f9d1c
04c42c7
da29705
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,6 +87,23 @@ describe("OE - File Card", () => { | |
).resolves.toMatchSnapshot(); | ||
}); | ||
|
||
test(`renders correctly with different download icon`, () => { | ||
expect.assertions(1); | ||
return expect( | ||
render({ | ||
...demoCardData, | ||
download: { | ||
label: "Download", | ||
path: "/example.html", | ||
icon: { | ||
name: "cloud-download", | ||
size: "fluid", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wish we could test this with a different icon set :) But it's ok. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the test you can see that it's not populated... I could add but we have only that sprite :)) and i think it's enough that it's not populated if you dont add it (that means you can change it how you want). |
||
}, | ||
}, | ||
}) | ||
).resolves.toMatchSnapshot(); | ||
}); | ||
|
||
test(`passes the accessibility tests`, async () => { | ||
expect( | ||
await axe(renderTwigFileAsHtml(template, demoCardData, true)) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was failing like this, it's more or less how you suggested now but without the attributes merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello misters,
Why not keeping my original logic #583 ?
For example, in your case you are forcing the
download=true
, I do not need it sometimesSee : https://historia.europa.eu/en/about-us/press (icon changed + attributes changed)