This commit is contained in:
parent
76b793b559
commit
9bf1f74061
|
@ -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(
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue