Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
830f129
feat(playwright): add prompts
n05la3 Apr 2, 2025
2efd733
feat(playwright): initial setup
n05la3 Apr 2, 2025
782ee1d
feat(playwright): setup esm and ejs build
n05la3 Apr 2, 2025
31a22fb
chore(playwright): setup eslint and husky
n05la3 Apr 2, 2025
01a32e8
feat(playwright): set compatible Quasar version and enforce server port
n05la3 Apr 2, 2025
1cea571
feat(playwright): add scripts to run in watch mode
n05la3 Apr 2, 2025
5e16504
feat(playwright): implement AE installation
n05la3 Apr 2, 2025
266a270
feat(playwright): add files to `.gitignore` file during installation
n05la3 Apr 2, 2025
ac0d288
feat(client): control the installation instead of depending on Playwr…
n05la3 Apr 2, 2025
aa24800
feat(playwright): add sample workflow file
n05la3 Apr 2, 2025
f69d738
feat(playwright): add Playwright configs for component and e2e testing
n05la3 Apr 2, 2025
85516b3
feat(playwright): add color utility
n05la3 Apr 2, 2025
0b67bea
feat(playwright): add portal utils
n05la3 Apr 2, 2025
5355a2c
fix(playwright): add default port
n05la3 Apr 2, 2025
2cfc3f3
feat(playwright): add color assertions utils
n05la3 Apr 2, 2025
a67b8da
feat(playwright): add test route utils
n05la3 Apr 2, 2025
6018c12
feat(playwright): export utils for library use
n05la3 Apr 2, 2025
43b3c48
feat(playwright): add components for test
n05la3 Apr 2, 2025
952f859
feat(playwright): add more component templates and config files
n05la3 Apr 2, 2025
77a7ac3
feat(playwright): add js and ts templates
n05la3 Apr 2, 2025
ef1877a
feat(playwright): setup app-vite playwright test app
n05la3 Apr 2, 2025
299d2cb
feat(playwright): add component tests
n05la3 Apr 2, 2025
ca30c61
fix(playwright): adjust how prompts are handled
n05la3 Apr 22, 2025
8eb5840
feat(playwright): add support for component testing to component config
n05la3 May 6, 2025
b85674a
feat(playwright): add code coverage flag to e2e template
n05la3 May 6, 2025
2aa34bd
refactor(playwright): remove test-route.ts utility function
n05la3 May 6, 2025
ed4c011
refactor(playwright): rename color assertions
n05la3 May 6, 2025
895d934
feat(playwright): add component test fixture
n05la3 May 6, 2025
7d27cba
refactor(playwright): move tests to base template
n05la3 May 8, 2025
848beca
fix(playwright): fix bug preventing prompt in new stable app-vite ver…
n05la3 May 8, 2025
c1c72f8
feat(playwright): many random improvement for code coverage support
n05la3 May 8, 2025
ba2bc66
feat(playwright): init empty project and setup playwright
n05la3 May 8, 2025
f9bb68d
feat(playwright): sync project
n05la3 May 8, 2025
2bb2629
refactor(playwright): adjust the nyc config
n05la3 May 10, 2025
e26711e
fix(playwright): fix component fixture typing
n05la3 May 10, 2025
8d43950
refactor(plawright): improve templates
n05la3 May 10, 2025
22047eb
feat(playwright): add flag to control whether to enable coverage or not
n05la3 May 10, 2025
ba66b49
feat(playwright): prefer unbuild to tsc for building the extension
n05la3 May 10, 2025
e07b8eb
chore(playwright): sync test project
n05la3 May 10, 2025
80f1ce7
refactor(playwright): minor utility improvement
n05la3 May 14, 2025
3290dc1
feat(playwright): sync test apps
n05la3 May 12, 2025
3900150
manor minor fixes, resync/update test apps
n05la3 May 22, 2025
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
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<template>
<q-checkbox v-model="checked" data-cy="checkbox" />
<q-toggle v-model="toggled" data-cy="toggle" />
<q-checkbox v-model="checked" data-cy="checkbox" data-testid="checkbox" />
<q-toggle v-model="toggled" data-cy="toggle" data-testid="toggle" />

<q-radio v-model="selected" val="Value1" data-cy="radio-1">Value1</q-radio>
<q-radio v-model="selected" val="Value2" data-cy="radio-2">Value2</q-radio>
<q-radio v-model="selected" val="Value1" data-cy="radio-1" data-testid="radio-1">Value1</q-radio>
<q-radio v-model="selected" val="Value2" data-cy="radio-2" data-testid="radio-2">Value2</q-radio>
</template>

<script<% if (shouldSupportTypeScript) { %> lang="ts"<% } %>>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,32 @@
<template>
<q-card data-cy="dark-card" :dark="$q.dark.isActive">
{{ $q.dark.isActive ? 'Dark ' : 'Light' }} content

<q-btn label="Toggle Dark Mode" data-testid="dark-mode-toggle-button" @click="toggleNightMode" />
</q-card>

</template>

<script<% if (shouldSupportTypeScript) { %> lang="ts"<% } %>>
import { defineComponent } from 'vue';
import { useQuasar } from 'quasar';

export default defineComponent({
name: 'QuasarDark',
setup() {
const $q = useQuasar();

// TODO: Refactor the Cypress test so that it does not need to test on the instance. Let's avoid such
// tests in e2e and component tests. It's preferable to have buttons that perform the task than to directly
// call those methods on the instance. Moreover, Playwright does not encourage nor support access to the instance.
// See https://kentcdodds.com/blog/testing-implementation-details
function toggleNightMode() {
$q.dark.set(!$q.dark.isActive);
}

return {
toggleNightMode
};
},
});
</script>
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<template>
<q-date v-model="date" data-cy="date-picker" />
<q-date v-model="date" data-cy="date-picker" data-testid="date-picker" />

<div>
<q-input v-model="date" label="Scegli data">
<template #append>
<q-btn
data-cy="open-date-picker-popup-button"
data-testid="open-date-picker-popup-button"
icon="event"
flat
round
Expand All @@ -14,7 +15,7 @@
</template>
</q-input>
<q-dialog ref="dateDialogRef">
<q-date v-model="date" @update:model-value="dateDialogRef.hide()" />
<q-date v-model="date" data-testid="date-proxy" @update:model-value="dateDialogRef.hide()" />
</q-dialog>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<q-card-actions align="right">
<q-btn
data-cy="ok-button"
data-testid="ok-button"
color="primary"
label="OK"
@click="onOKClick"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
:breakpoint="700"
elevated
data-cy="drawer"
data-testid="drawer"
class="bg-primary text-white"
>
<q-scroll-area class="fit">
<div class="q-pa-sm">
<div v-for="n in 50" :key="n">Drawer {{ n }} / 50</div>
</div>
<q-btn data-cy="button">Am I on screen?</q-btn>
<q-btn data-cy="button" data-testid="button">Am I on screen?</q-btn>
</q-scroll-area>
</q-drawer>
</template>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<q-btn data-cy="open-menu-btn" label="Open menu">
<q-btn data-cy="open-menu-btn" data-testid="open-menu-btn" label="Open menu">
<q-menu>
<q-list>
<q-item v-close-popup clickable>
Expand All @@ -19,4 +19,4 @@ import { defineComponent } from 'vue';
export default defineComponent({
name: 'QuasarMenu',
});
</script>
</script>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<q-page-sticky position="bottom-right" :offset="[18, 18]">
<q-btn data-cy="button" rounded color="accent" icon="arrow_forward">
<q-btn data-cy="button" data-testid="button" rounded color="accent" icon="arrow_forward">
{{ title }}
</q-btn>
</q-page-sticky>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
<q-select
v-model="selected"
data-cy="select"
data-testid="select"
label="test options selection"
:options="options"
:loading="loading"
:disable="disable"
:multiple="multiple"
/>

<span data-cy="select-value">{{ selected }}</span>
<span data-cy="select-value" data-testid="select-value">{{ selected }}</span>
</template>

<script<% if (shouldSupportTypeScript) { %> lang="ts"<% } %>>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<q-tooltip
v-model="showTooltip"
data-cy="tooltip"
data-testid="tooltip"
class="bg-red"
:offset="[10, 10]"
>
Expand Down
15 changes: 15 additions & 0 deletions packages/e2e-playwright/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.DS_Store
.thumbs.db
node_modules
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
dist
Loading