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

feat: Passing --browser flag alone will launch after test selection #28538

Open
wants to merge 63 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
9c66b18
Add localSettings field to OpenBrowser query
raygdev Dec 16, 2023
92e9483
Add wasBrowserSetInCLI as OpenBrowserList prop
raygdev Dec 16, 2023
7063ecc
Emit launch on mount if --browser was passed
raygdev Dec 16, 2023
04d4056
Merge branch 'develop' of https://github.com/raygdev/cypress into iss…
raygdev Dec 16, 2023
289a1ee
Add entry to cli changelog
raygdev Dec 16, 2023
e57272c
Correct typo in changelog
raygdev Dec 16, 2023
51d5511
Add link to issue addressed
raygdev Dec 16, 2023
957bf56
Add pull request title
raygdev Dec 16, 2023
332602b
Check if browser is already open before launch
raygdev Dec 17, 2023
fea326b
Moved features section to top of file
raygdev Dec 17, 2023
845477d
Add reference to PR in changelog
raygdev Dec 17, 2023
65c22e2
Correct unintended completion
raygdev Dec 18, 2023
ab75b54
Merge branch 'cypress-io:develop' into issue-22003
raygdev Dec 20, 2023
46c9a32
Merge branch 'develop' of https://github.com/raygdev/cypress into iss…
raygdev Jan 6, 2024
b142339
Merge branch 'issue-22003' of https://github.com/raygdev/cypress into…
raygdev Jan 6, 2024
a806939
Add features to top of changelog
raygdev Jan 6, 2024
d172862
Change prop name for convention
raygdev Jan 6, 2024
95e0c9b
Merge branch 'develop' of https://github.com/raygdev/cypress into iss…
raygdev Jan 6, 2024
246436a
Merge develop and handle conflicts
raygdev Jan 22, 2024
91c2019
Merge branch 'issue-22003' of https://github.com/raygdev/cypress into…
raygdev Feb 21, 2024
54325c5
Add isValidBrowser
raygdev Mar 11, 2024
b7296be
Add isValidBrowser to schema
raygdev Mar 11, 2024
7c4c9bb
Use isValid browser
raygdev Mar 11, 2024
c5852c2
Merge branch 'develop' of https://github.com/raygdev/cypress into iss…
raygdev Mar 11, 2024
ccdd0b9
Add to changelog.md
raygdev Mar 11, 2024
3a03a71
Add global launch count to keep track project launch
raygdev Mar 13, 2024
e5cb959
Make global count available to the launchPad
raygdev Mar 13, 2024
0ed0e48
Add description for globalLaunchCount
raygdev Mar 13, 2024
7da6148
Add globalCounnt to schema
raygdev Mar 13, 2024
77376d2
Remove unused import and remove unused prop
raygdev Mar 13, 2024
4847cd9
Use launch function
raygdev Mar 13, 2024
07d6b9f
Import document and use query
raygdev Mar 13, 2024
2e4829a
Merge branch 'develop' of https://github.com/raygdev/cypress into iss…
raygdev Mar 13, 2024
6da369e
Add to changelog
raygdev Mar 13, 2024
d17bad1
Add to existing features section
raygdev Mar 13, 2024
a7baff4
Merge branch 'develop' of https://github.com/raygdev/cypress into iss…
raygdev Mar 13, 2024
42de35e
Add to changelog
raygdev Mar 13, 2024
fee655b
Merge branch 'develop' of https://github.com/raygdev/cypress into iss…
raygdev Mar 14, 2024
33bafa2
Merge branch 'develop' of https://github.com/raygdev/cypress into iss…
raygdev Mar 21, 2024
dcbe3eb
Merge branch 'develop' of https://github.com/raygdev/cypress into iss…
raygdev Mar 28, 2024
f69f548
Update changelog.md
raygdev Mar 28, 2024
9486b3f
Add setter for launchCount and add tests
raygdev Apr 7, 2024
b703611
Merge branch 'develop' of https://github.com/raygdev/cypress into iss…
raygdev Apr 7, 2024
31da795
Update changelog
raygdev Apr 8, 2024
48b3562
Merge branch 'develop' of https://github.com/raygdev/cypress into iss…
raygdev Apr 9, 2024
5633d82
Handle changelog merge conflict
raygdev Apr 10, 2024
be8e4fa
Merge branch 'develop' of https://github.com/raygdev/cypress into iss…
raygdev Apr 10, 2024
654c795
Merge changes
raygdev Apr 12, 2024
7a749d2
Remove extra bugfix title
raygdev Apr 12, 2024
66fa91e
Merge branch 'develop' of https://github.com/raygdev/cypress into iss…
raygdev Apr 12, 2024
414c50f
Merge branch 'develop' of https://github.com/raygdev/cypress into iss…
raygdev Apr 15, 2024
42152da
Update changelog
raygdev Apr 15, 2024
ba72ab9
Merge branch 'develop' of https://github.com/raygdev/cypress into iss…
raygdev Apr 16, 2024
f848ec0
Merge branch 'develop' of https://github.com/raygdev/cypress into iss…
raygdev Apr 30, 2024
7cc99df
Update changelog
raygdev Apr 30, 2024
06a8a1b
Merge branch 'develop' into issue-22003
marktnoonan May 4, 2024
c5514a9
Update changelog
raygdev May 4, 2024
543f827
Merge branch 'develop' into issue-22003
ryanthemanuel May 6, 2024
1dd266d
Merge branch 'develop' into issue-22003
raygdev May 7, 2024
9ee7ead
Merge branch 'develop' into issue-22003
raygdev May 8, 2024
9aa40f1
Update changelog
raygdev May 8, 2024
cb106a6
Merge branch 'develop' into issue-22003
mschile May 16, 2024
c9a88e9
Merge branch 'develop' into issue-22003
raygdev May 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@

_Released 12/19/2023 (PENDING)_

**Features:**

- Running the command `cypress open --browser <browser-name>`will
launch the browser after testing type selection in the GUI. Addresses
[#22003](https://github.com/cypress-io/cypress/issues/22003).
Addressed in [#28538](https://github.com/cypress-io/cypress/pull/28538).

**Bugfixes:**

- Cypress no longer errors during `cypress run` or `cypress open` when using Typescript 5.3.2+ with `extends` in `tsconfig.json`. Fixes [#28385](https://github.com/cypress-io/cypress/issues/28385).
Expand Down
6 changes: 6 additions & 0 deletions packages/launchpad/src/setup/OpenBrowser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
/>
<OpenBrowserList
variant=""
:wasBrowserSetInCLI="query.data.value.localSettings.preferences.wasBrowserSetInCLI"
:gql="query.data.value.currentProject"
@navigated-back="backFn"
@launch="launch"
Expand All @@ -31,6 +32,11 @@ const { t } = useI18n()

gql`
query OpenBrowser {
localSettings {
preferences {
wasBrowserSetInCLI
}
}
currentProject {
id
currentTestingType
Expand Down
9 changes: 8 additions & 1 deletion packages/launchpad/src/setup/OpenBrowserList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
<script lang="ts" setup>
import { useI18n } from '@cy/i18n'
import Button from '@packages/frontend-shared/src/components/Button.vue'
import { computed } from 'vue'
import { computed, onMounted } from 'vue'
import { useMutation, gql, useSubscription } from '@urql/vue'
import { allBrowsersIcons } from '@packages/frontend-shared/src/assets/browserLogos'
import TestingTypeComponentIcon from '~icons/cy/testing-type-component_x16'
Expand Down Expand Up @@ -215,6 +215,7 @@ useSubscription({ query: OpenBrowserList_BrowserStatusChangeDocument })

const props = defineProps<{
gql: OpenBrowserListFragment
wasBrowserSetInCLI: boolean | null
}>()

const emit = defineEmits<{
Expand Down Expand Up @@ -285,4 +286,10 @@ const browserStatus = computed(() => {

const testingTypeIcon = computed(() => props.gql.currentTestingType === 'component' ? TestingTypeComponentIcon : TestingTypeE2EIcon)

onMounted(() => {
if (props.wasBrowserSetInCLI && !browserStatus.value.open) {
emit('launch')
}
})

</script>