feat: refs #8193 added notes e2e
gitea/salix-front/pipeline/pr-dev This commit is unstable Details

This commit is contained in:
Jon Elias 2025-03-18 10:40:41 +01:00
parent 76b793b559
commit 9bf1f74061
2 changed files with 27 additions and 0 deletions

View File

@ -212,6 +212,7 @@ onUnmounted(() => {
option-label="description"
option-value="id"
@update:model-value="selectFilter('observationTypeFk')"
data-cy="VnNotes-observation-type-filter"
/>
</QItemSection>
</QItem>
@ -266,6 +267,7 @@ onUnmounted(() => {
style="flex: 0.15"
:required="isRequired"
@keyup.enter.stop="insert"
data-cy="VnNotes-observation-type"
/>
<VnInput
v-model.trim="newNote.text"
@ -277,6 +279,7 @@ onUnmounted(() => {
@keyup.enter.stop="handleClick"
:required="isRequired"
clearable
data-cy="VnNotes-text-input"
>
<template #append>
<QBtn
@ -337,6 +340,7 @@ onUnmounted(() => {
outline
color="grey"
v-if="selectType && note.observationTypeFk"
data-cy="VnNotes-observation-type-badge"
>
{{
observationTypes.find(

View File

@ -0,0 +1,23 @@
/// <reference types="cypress" />
describe('VnNotes', () => {
const obervationType = 'Packager';
beforeEach(() => {
cy.viewport(1920, 1080);
cy.login('developer');
cy.visit('#/customer/1101/notes');
});
it('should add and filter notes', () => {
cy.selectOption("[data-cy='VnNotes-observation-type']", obervationType);
cy.dataCy('VnNotes-text-input').type('Test note {enter}');
cy.selectOption("[data-cy='VnNotes-observation-type-filter']", obervationType);
cy.get('.column.full-width')
.children()
.each(($el) => {
cy.wrap($el)
.find('[data-cy="VnNotes-observation-type-badge"]')
.should('include.text', obervationType);
});
});
});