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

prep for e2e #240

Merged
merged 15 commits into from
Nov 30, 2024
Merged
Show file tree
Hide file tree
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
62 changes: 57 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,22 @@ jobs:
run: |
install_dir="$HOME/.local/bin"
cd "$install_dir"
./browsers --no-gui https://browsers.software
#set -x

command_output="$(./browsers --no-gui https://browsers.software)"
echo "$command_output"

if echo "$command_output" | grep -q 'Firefox Web Browser'; then
echo "matched Firefox Web Browser"
fi

if echo "$command_output" | grep -q 'Google Chrome'; then
echo "matched Google Chrome"
fi

if echo "$command_output" | grep -q 'Microsoft Edge'; then
echo "matched Microsoft Edge"
fi
shell: bash
- name: Upload release artifact
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -201,9 +216,27 @@ jobs:
run: |
target_dir='target/universal-apple-darwin/release'
cd "$target_dir"
set -x
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
shell: bash
#set -x

touch ./output_file
open ./Browsers.app -W --stdout output_file --stderr output_file --args --no-gui https://browsers.software

command_output=`cat ./output_file`
echo "$command_output"

if echo "$command_output" | grep -q 'Safari'; then
echo "matched Safari"
fi

if echo "$command_output" | grep -q 'Chrome'; then
echo "matched Chrome"
fi

if echo "$command_output" | grep -q 'Google Chrome for Testing'; then
echo "matched Google Chrome for Testing"
fi
# special shell script to make tty working
shell: 'script -q /dev/null bash -e {0}'
- name: Upload mac artifacts
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -280,7 +313,26 @@ jobs:
run: |
install_dir="$PROGRAMFILES/software.Browsers"
cd "$install_dir"
./browsers.exe --no-gui https://browsers.software
#set -x

command_output="$(./browsers.exe --no-gui https://browsers.software)"
echo "$command_output"

if echo "$command_output" | grep -q 'Mozilla Firefox'; then
echo "matched Mozilla Firefox"
fi

if echo "$command_output" | grep -q 'Google Chrome'; then
echo "matched Google Chrome"
fi

if echo "$command_output" | grep -q 'Internet Explorer'; then
echo "matched Internet Explorer"
fi

if echo "$command_output" | grep -q ' Microsoft Edge (Profile 1)'; then
echo "matched Microsoft Edge (Profile 1)"
fi
shell: bash
- name: Upload release artifact
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion src/gui/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ impl UIBrowser {
pub fn get_full_name(&self) -> String {
return if self.supports_profiles {
format!(
"{} {}",
"{} ({})",
self.browser_name.to_string(),
self.profile_name.as_str()
)
Expand Down
Loading