Populate info.duration for audio & video file uploads (#11225)
* Improve m.file m.image m.audio m.video types * Populate `info.duration` for audio & video file uploads * Fix tests * Iterate types * Improve coverage * Fix test * Add small delay to stabilise cypress test * Fix test idempotency * Improve coverage * Slow down * iterate
This commit is contained in:
parent
8b8ca425d7
commit
f04a0e2860
17 changed files with 556 additions and 85 deletions
|
@ -183,7 +183,7 @@ describe("FilePanel", () => {
|
|||
});
|
||||
});
|
||||
|
||||
it("should render the audio pleyer and play the audio file on the panel", () => {
|
||||
it("should render the audio player and play the audio file on the panel", () => {
|
||||
// Upload an image file
|
||||
uploadFile("cypress/fixtures/1sec.ogg");
|
||||
|
||||
|
@ -202,10 +202,14 @@ describe("FilePanel", () => {
|
|||
cy.contains(".mx_AudioPlayer_byline", "(3.56 KB)").should("exist"); // actual size
|
||||
});
|
||||
|
||||
// Assert that the duration counter is 00:01 before clicking the play button
|
||||
cy.contains(".mx_AudioPlayer_mediaInfo time", "00:01").should("exist");
|
||||
|
||||
// Assert that the counter is zero before clicking the play button
|
||||
cy.contains(".mx_AudioPlayer_seek [role='timer']", "00:00").should("exist");
|
||||
|
||||
// Click the play button
|
||||
cy.wait(500);
|
||||
cy.findByRole("button", { name: "Play" }).click();
|
||||
|
||||
// Assert that the pause button is rendered
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue