Skip to content
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

Fixes #1047: preventDefault() #1122

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions test/components/entity/upload/data-template.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,16 @@ describe('EntityUploadDataTemplate', () => {
it('has the correct filename', async () => {
const clock = sinon.useFakeTimers(Date.parse('2024-12-31T01:23:45'));
testData.extendedDatasets.createPast(1);
const a = mountComponent().get('a');
await a.trigger('click');
const component = mountComponent();
const a = component.get('a');
// Call setFilename method directly instead of trigger click event which
// creates the actual file in the file system; see CF#1047.
// Additionally, since Chrome Headless 131.0.0.0, this test has started
// failing
component.vm.setFilename({ target: a.element });
a.attributes().download.should.equal('trees 20241231012345.csv');
clock.tick(1000);
await a.trigger('click');
component.vm.setFilename({ target: a.element });
a.attributes().download.should.equal('trees 20241231012346.csv');
});
});