Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Prevent beeping when we run the receipt tests locally #11533

Closed

Conversation

andybalaam
Copy link
Member

@andybalaam andybalaam commented Sep 5, 2023

Not sure whether this is the best way to do this, and/or whether we want to do it for all tests, but I couldn't find a better way to quieten the beeps, which have been driving me over the edge this week...

Relevant Cypress issue is: cypress-io/cypress#27148 - looks like they are not interested in fixing this in Cypress.

It's hard to do it in a more general way with this approach, because the test needs to be underway before we can overwrite the playAudioNotification method, because before the test starts it doesn't exist yet.

Part of element-hq/element-web#25449


This change is marked as an internal change (Task), so will not be included in the changelog.

@andybalaam andybalaam requested a review from a team as a code owner September 5, 2023 12:12
@andybalaam andybalaam added the T-Task Refactoring, enabling or disabling functionality, other engineering tasks label Sep 5, 2023
Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks plausible to me, though cypress-io/cypress#27148 (comment) also looks like a compelling solution if it works

@t3chguy
Copy link
Member

t3chguy commented Sep 5, 2023

@richvdh it does but only on Chromium, didn't work on Electron for me and doesn't even attempt to work on Firefox

@t3chguy
Copy link
Member

t3chguy commented Sep 5, 2023

(I had a patch to do this locally as it also drove me mad)

@richvdh
Copy link
Member

richvdh commented Sep 5, 2023

@richvdh it does but only on Chromium, didn't work on Electron for me and doesn't even attempt to work on Firefox

Ok, but don't we run the cypress tests in Chrome? I didn't know that running them in electron was even an option

@t3chguy
Copy link
Member

t3chguy commented Sep 5, 2023

@richvdh in CI yes, but sound in CI isn't likely to bother someone. test:cypress defaults to Electron. If you open headed mode test:cypress:open then it asks you how to run it.

image

@andybalaam
Copy link
Member Author

@richvdh it does but only on Chromium, didn't work on Electron for me and doesn't even attempt to work on Firefox

Just to double check - does that mean you are OK with merging this PR @t3chguy ?

@t3chguy
Copy link
Member

t3chguy commented Sep 6, 2023

Just to double check - does that mean you are OK with merging this PR @t3chguy ?

I think it should be opt-in behaviour personally, at least on the headed cypress environment, given there you can use cy.pause() and interact with things manually so you'd expect it to behave as close to normal

@andybalaam andybalaam closed this Nov 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T-Task Refactoring, enabling or disabling functionality, other engineering tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants