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/playwright integration #9

Merged
merged 9 commits into from
Jan 29, 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
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,3 @@ dist
/test-results/
/playwright-report/
/playwright/.cache/

# cypress
/cypress/videos/
/cypress/screenshots/
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"i18n-ally.keystyle": "nested",
"prettier.requireConfig": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"cSpell.words": ["Cidoc", "nuxt"],
"editor.defaultFormatter": "esbenp.prettier-vscode",
Expand Down
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,8 @@ To test the frontend we use Cypress to run E2E tests.
2. Run all the specs directly with `npm run cy:run`. This will run through all the tests and
output the results in the console. If you run `npm run cy:run-record` cypress will also record
videos of the tests and save them under `cypress/videos`.

### Developing with and for Cypress

- To enable tests to run properly even when changing component we should use selectors that are
prone to stay the same. Therefore we should follow the
[Best Practice](https://docs.cypress.io/guides/references/best-practices#Selecting-Elements) and
add a `data-test` attribute to elements we intend to test.

### Developing with and for Playwright
TO-DO
# Licensing

All code unless otherwise noted is licensed under the terms of the MIT License (MIT). Please refer
Expand Down
5 changes: 1 addition & 4 deletions components/LocaleDropDown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,14 @@ const availableLocales = computed(() => {
<template>
<VBtn
id="locale-selector-button-activator"
data-test="header-locale-menu"
role="button"
class="h-100 d-flex align-center justify-center px-2 text-grey"
>
<VIcon>mdi-translate</VIcon>
<VIcon size="small">mdi-chevron-down</VIcon>
<span class="d-sr-only">{{ $t("global.basics.language-selection") }}</span>
</VBtn>
<VMenu activator="#locale-selector-button-activator">
<VList data-test="locale-selector-list">
<VList>
<VListSubheader>
<p class="text-caption px-2">
{{ $t("global.basics.language") }}
Expand All @@ -35,7 +33,6 @@ const availableLocales = computed(() => {
@see https://i18n.nuxtjs.org/guide/lang-switcher
-->
<NuxtLink
:data-test="`locale-selector-${l.code}`"
:to="switchLocalePath(l.code)"
@click.prevent.stop="setLocale(locale.code)"
>
Expand Down
2 changes: 2 additions & 0 deletions config/i18n.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export const locales = ["en", "de"];
export type Locale = (typeof locales)[number];
23 changes: 0 additions & 23 deletions cypress.config.ts

This file was deleted.

35 changes: 0 additions & 35 deletions cypress/e2e/MainPage.cy.ts

This file was deleted.

39 changes: 0 additions & 39 deletions cypress/e2e/MainToOtherPages.cy.ts

This file was deleted.

5 changes: 0 additions & 5 deletions cypress/fixtures/example.json

This file was deleted.

37 changes: 0 additions & 37 deletions cypress/support/commands.ts

This file was deleted.

20 changes: 0 additions & 20 deletions cypress/support/e2e.ts

This file was deleted.

Loading
Loading