Skip to content

Commit 9f94347

Browse files
committed
Merge branch 'main' into fix-credit-card-auto-fill
2 parents 2351776 + 8af8771 commit 9f94347

File tree

4 files changed

+52
-7
lines changed

4 files changed

+52
-7
lines changed

.github/workflows/build-and-deploy.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,20 @@ jobs:
241241
- name: Debug WAR file paths
242242
run: ls -alh /tmp
243243

244+
- name: Install latest Google Chrome
245+
run: |
246+
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo gpg --dearmor -o /usr/share/keyrings/google-chrome.gpg
247+
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/google-chrome.gpg] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list
248+
sudo apt-get update
249+
sudo apt-get install -y google-chrome-stable
250+
251+
- name: Check Chrome version
252+
run: google-chrome --version
253+
244254
- name: Install Selenium
245255
run: |
246-
wget https://storage.googleapis.com/chrome-for-testing-public/132.0.6834.110/linux64/chromedriver-linux64.zip
256+
LATEST_VERSION=$(curl -s https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json | jq -r '.channels.Stable.version')
257+
wget https://storage.googleapis.com/chrome-for-testing-public/${LATEST_VERSION}/linux64/chromedriver-linux64.zip
247258
unzip chromedriver-linux64.zip
248259
sudo cp chromedriver-linux64/chromedriver /tmp
249260
ls -al /tmp
@@ -305,9 +316,20 @@ jobs:
305316
- name: Debug WAR file paths
306317
run: ls -alh /tmp
307318

319+
- name: Install latest Google Chrome
320+
run: |
321+
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo gpg --dearmor -o /usr/share/keyrings/google-chrome.gpg
322+
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/google-chrome.gpg] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list
323+
sudo apt-get update
324+
sudo apt-get install -y google-chrome-stable
325+
326+
- name: Check Chrome version
327+
run: google-chrome --version
328+
308329
- name: Install Selenium
309330
run: |
310-
wget https://storage.googleapis.com/chrome-for-testing-public/132.0.6834.110/linux64/chromedriver-linux64.zip
331+
LATEST_VERSION=$(curl -s https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json | jq -r '.channels.Stable.version')
332+
wget https://storage.googleapis.com/chrome-for-testing-public/${LATEST_VERSION}/linux64/chromedriver-linux64.zip
311333
unzip chromedriver-linux64.zip
312334
sudo cp chromedriver-linux64/chromedriver /tmp
313335
ls -al /tmp

react/src/__tests__/pages/AntMedia.test.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3815,6 +3815,33 @@ describe('AntMedia Component', () => {
38153815

38163816
consoleSpy.mockRestore();
38173817
});
3818+
3819+
describe('checkAndTurnOffLocalCamera', () => {
3820+
it('should call webRTCAdaptor.turnOffLocalCamera with the correct stream id', async () => {
3821+
const { container } = render(
3822+
<AntMedia isTest={true}>
3823+
<MockChild/>
3824+
</AntMedia>
3825+
);
3826+
3827+
await waitFor(() => {
3828+
expect(webRTCAdaptorConstructor).not.toBe(undefined);
3829+
});
3830+
3831+
currentConference.isMyMicMuted = false;
3832+
await act(async () => {
3833+
currentConference.setPublishStreamId('test-stream-id');
3834+
});
3835+
3836+
// Call the function
3837+
await act(async () => {
3838+
currentConference.checkAndTurnOffLocalCamera();
3839+
});
3840+
3841+
// Assertion: only check the observable side effect
3842+
expect(webRTCAdaptorConstructor.turnOffLocalCamera).toHaveBeenCalledWith('test-stream-id');
3843+
});
3844+
});
38183845
});
38193846

38203847

react/src/pages/AntMedia.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2946,11 +2946,7 @@ function AntMedia(props) {
29462946
}
29472947

29482948
function checkAndTurnOffLocalCamera(streamId) {
2949-
if (isVideoEffectRunning) {
2950-
webRTCAdaptor?.turnOffEffectCamera();
2951-
} else {
29522949
webRTCAdaptor?.turnOffLocalCamera(publishStreamId);
2953-
}
29542950

29552951
updateUserStatusMetadata(isMyMicMuted, false);
29562952
setIsMyCamTurnedOff(true);

test/browser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def get_element_with_retry(self, by, value, retries=5, wait_time=2):
105105
else:
106106
print(f"Element not found by {by} with value {value} after {retries} attempts: {e}")
107107
#print("SS as base64: \n"+self.driver.get_screenshot_as_base64())
108-
self.save_ss_as_file("not-found.png")
108+
self.save_ss_as_file(value+"not-found.png")
109109

110110
raise
111111

0 commit comments

Comments
 (0)