Skip to content

Commit fb3d7c4

Browse files
authored
prep for e2e (#240)
prep for e2e tests
1 parent f374535 commit fb3d7c4

File tree

2 files changed

+58
-6
lines changed

2 files changed

+58
-6
lines changed

.github/workflows/ci.yml

Lines changed: 57 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,22 @@ jobs:
106106
run: |
107107
install_dir="$HOME/.local/bin"
108108
cd "$install_dir"
109-
./browsers --no-gui https://browsers.software
109+
#set -x
110+
111+
command_output="$(./browsers --no-gui https://browsers.software)"
112+
echo "$command_output"
113+
114+
if echo "$command_output" | grep -q 'Firefox Web Browser'; then
115+
echo "matched Firefox Web Browser"
116+
fi
117+
118+
if echo "$command_output" | grep -q 'Google Chrome'; then
119+
echo "matched Google Chrome"
120+
fi
121+
122+
if echo "$command_output" | grep -q 'Microsoft Edge'; then
123+
echo "matched Microsoft Edge"
124+
fi
110125
shell: bash
111126
- name: Upload release artifact
112127
uses: actions/upload-artifact@v4
@@ -201,9 +216,27 @@ jobs:
201216
run: |
202217
target_dir='target/universal-apple-darwin/release'
203218
cd "$target_dir"
204-
set -x
205-
open ./Browsers.app --env BROWSERS_LOG_LEVEL=DEBUG --stdout /tmp/my-stdout --stderr /tmp/my-stderr --args --no-gui https://browsers.software && cat /tmp/my-stdout && cat /tmp/my-stderr
206-
shell: bash
219+
#set -x
220+
221+
touch ./output_file
222+
open ./Browsers.app -W --stdout output_file --stderr output_file --args --no-gui https://browsers.software
223+
224+
command_output=`cat ./output_file`
225+
echo "$command_output"
226+
227+
if echo "$command_output" | grep -q 'Safari'; then
228+
echo "matched Safari"
229+
fi
230+
231+
if echo "$command_output" | grep -q 'Chrome'; then
232+
echo "matched Chrome"
233+
fi
234+
235+
if echo "$command_output" | grep -q 'Google Chrome for Testing'; then
236+
echo "matched Google Chrome for Testing"
237+
fi
238+
# special shell script to make tty working
239+
shell: 'script -q /dev/null bash -e {0}'
207240
- name: Upload mac artifacts
208241
uses: actions/upload-artifact@v4
209242
with:
@@ -280,7 +313,26 @@ jobs:
280313
run: |
281314
install_dir="$PROGRAMFILES/software.Browsers"
282315
cd "$install_dir"
283-
./browsers.exe --no-gui https://browsers.software
316+
#set -x
317+
318+
command_output="$(./browsers.exe --no-gui https://browsers.software)"
319+
echo "$command_output"
320+
321+
if echo "$command_output" | grep -q 'Mozilla Firefox'; then
322+
echo "matched Mozilla Firefox"
323+
fi
324+
325+
if echo "$command_output" | grep -q 'Google Chrome'; then
326+
echo "matched Google Chrome"
327+
fi
328+
329+
if echo "$command_output" | grep -q 'Internet Explorer'; then
330+
echo "matched Internet Explorer"
331+
fi
332+
333+
if echo "$command_output" | grep -q ' Microsoft Edge (Profile 1)'; then
334+
echo "matched Microsoft Edge (Profile 1)"
335+
fi
284336
shell: bash
285337
- name: Upload release artifact
286338
uses: actions/upload-artifact@v4

src/gui/ui.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ impl UIBrowser {
376376
pub fn get_full_name(&self) -> String {
377377
return if self.supports_profiles {
378378
format!(
379-
"{} {}",
379+
"{} ({})",
380380
self.browser_name.to_string(),
381381
self.profile_name.as_str()
382382
)

0 commit comments

Comments
 (0)