Skip to content

Commit c27e844

Browse files
authored
feat add viewport 1200X800 (#37)
adding support in cli for viewport 1200x800 ## Tested Works with flag `--viewport` <img width="818" height="141" alt="image" src="https://github.com/user-attachments/assets/14a49e8e-e0f1-4fc5-9846-e1e1bf1409b2" /> Works with flag `--viewport-interactive` <img width="928" height="157" alt="image" src="https://github.com/user-attachments/assets/d0bf703b-a472-4b2b-b1f5-f7f0138f8cb6" /> works on dashboard /browsers <img width="1624" height="829" alt="image" src="https://github.com/user-attachments/assets/a59c0966-2ec2-45c0-9145-622088e8bd60" />
1 parent 5abf789 commit c27e844

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

cmd/browsers.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ func getAvailableViewports() []string {
107107
"1920x1200@25",
108108
"1440x900@25",
109109
"1024x768@60",
110+
"1200x800@60",
110111
}
111112
}
112113

@@ -2013,7 +2014,7 @@ func init() {
20132014
browsersCreateCmd.Flags().Bool("save-changes", false, "If set, save changes back to the profile when the session ends")
20142015
browsersCreateCmd.Flags().String("proxy-id", "", "Proxy ID to use for the browser session")
20152016
browsersCreateCmd.Flags().StringSlice("extension", []string{}, "Extension IDs or names to load (repeatable; may be passed multiple times or comma-separated)")
2016-
browsersCreateCmd.Flags().String("viewport", "", "Browser viewport size (e.g., 1920x1080@25). Supported: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25, 1024x768@60")
2017+
browsersCreateCmd.Flags().String("viewport", "", "Browser viewport size (e.g., 1920x1080@25). Supported: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25, 1024x768@60, 1200x800@60")
20172018
browsersCreateCmd.Flags().Bool("viewport-interactive", false, "Interactively select viewport size from list")
20182019

20192020
// Add flags for delete command

cmd/browsers_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1079,11 +1079,12 @@ func TestParseViewport_InvalidFormats(t *testing.T) {
10791079

10801080
func TestGetAvailableViewports_ReturnsExpectedOptions(t *testing.T) {
10811081
viewports := getAvailableViewports()
1082-
assert.Len(t, viewports, 5)
1082+
assert.Len(t, viewports, 6)
10831083
assert.Contains(t, viewports, "2560x1440@10")
10841084
assert.Contains(t, viewports, "1920x1080@25")
10851085
assert.Contains(t, viewports, "1920x1200@25")
10861086
assert.Contains(t, viewports, "1440x900@25")
1087+
assert.Contains(t, viewports, "1200x800@60")
10871088
assert.Contains(t, viewports, "1024x768@60")
10881089
}
10891090

0 commit comments

Comments
 (0)