Skip to content

Commit

Permalink
Fixed some tests on SelectVersion's page buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
qlrd committed Aug 17, 2023
1 parent e65b084 commit 63d4ab9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
9 changes: 7 additions & 2 deletions src/pages/SelectVersion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
variant="outlined"
:class="[selectedClass]"
@click="select(version)"
:id="`select-version-page-${version}-button`"
:id="`select-version-page-${ transformVersion(version) }-button`"
>
<v-card-title :id="`select-version-page-${version}-text`"> {{ version }}</v-card-title>
<v-card-title :id="`select-version-page-${ transformVersion(version) }-text`"> {{ version }}</v-card-title>
</v-card>
</v-item>
</v-col>
Expand Down Expand Up @@ -43,6 +43,7 @@ const props = defineProps<{
}>()
const { versions } = toRefs(props)
/**
* Functions
*/
Expand All @@ -54,4 +55,8 @@ async function select(version: string) {
await window.api.invoke('krux:store:set', { from: 'SelectVersion', key: 'version', value: version })
}
function transformVersion (version: string): string {
return version.replace(/[\/\_\.]/g, '-')
}
</script>
8 changes: 4 additions & 4 deletions test/e2e/pageobjects/app.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ class App {
this.__select_device_page_maixpy_dock_text__ = 'div#select-device-page-maixpy_dock-text'
this.__select_device_page_maixpy_back_text__ = 'div#select-device-page-back-text'
this.__select_version_page__ = 'div#select-version-page';
this.__select_version_page_selfcustody_button__ = 'div#select-version-page-selfcustody/krux/releases/tag/v22.08.2-button'
this.__select_version_page_selfcustody_button__ = 'div#select-version-page-selfcustody-krux-releases-tag-v22-08-2-button'
this.__select_version_page_back_button__ = 'div#select-version-page-back-button'
this.__select_version_page_odudex_button__ = 'div#select-version-page-odudex/krux_binaries-button'
this.__select_version_page_selfcustody_text__ = 'div#select-version-page-selfcustody/krux/releases/tag/v22.08.2-text'
this.__select_version_page_odudex_text__ = 'div#select-version-page-odudex/krux_binaries-text'
this.__select_version_page_odudex_button__ = 'div#select-version-page-odudex-krux-binaries-button'
this.__select_version_page_selfcustody_text__ = 'div#select-version-page-selfcustody-krux-releases-tag-v22-08-2-text'
this.__select_version_page_odudex_text__ = 'div#select-version-page-odudex-krux-binaries-text'
this.__select_version_page_back_text__ = 'div#select-version-page-back-text'
this.__github_octocat_checker_logo__ = 'pre#github-octocat-checker-logo'
}
Expand Down

0 comments on commit 63d4ab9

Please sign in to comment.