Issue #14: Done.

This commit is contained in:
chiayin
2023-10-04 14:04:45 +08:00
parent a25290f4db
commit 240f68a73e
2 changed files with 10 additions and 10 deletions

View File

@@ -60,7 +60,7 @@ describe('Save Log and Filter', ()=>{
it('Sequence, Start', () => { it('Sequence, Start', () => {
// select radio // select radio
cy.get('input#Sequence0').should('be.checked'); // 選取 Radio 'Sequence' cy.get('input#Sequence0').should('be.checked'); // 選取 Radio 'Sequence'
cy.contains('label', 'Start activity / End activity') // 選取 Radio 'Have activity(s)' cy.contains('label', 'Start & End') // 選取 Radio 'Have activity(s)'
.prev(2) .prev(2)
.find('input') .find('input')
.should('have.attr', 'type', 'radio') // select the previous element .should('have.attr', 'type', 'radio') // select the previous element
@@ -98,7 +98,7 @@ describe('Save Log and Filter', ()=>{
it('Sequence, End', () => { it('Sequence, End', () => {
// select radio // select radio
cy.get('input#Sequence0').should('be.checked'); // 選取 Radio 'Sequence' cy.get('input#Sequence0').should('be.checked'); // 選取 Radio 'Sequence'
cy.contains('label', 'Start activity / End activity') // 選取 Radio 'Have activity(s)' cy.contains('label', 'Start & End') // 選取 Radio 'Have activity(s)'
.prev(2) .prev(2)
.find('input') .find('input')
.should('have.attr', 'type', 'radio') // select the previous element .should('have.attr', 'type', 'radio') // select the previous element
@@ -137,7 +137,7 @@ describe('Save Log and Filter', ()=>{
it('Sequence, Start & End', () => { it('Sequence, Start & End', () => {
// select radio // select radio
cy.get('input#Sequence0').should('be.checked'); // 選取 Radio 'Sequence' cy.get('input#Sequence0').should('be.checked'); // 選取 Radio 'Sequence'
cy.contains('label', 'Start activity / End activity') // 選取 Radio 'Have activity(s)' cy.contains('label', 'Start & End') // 選取 Radio 'Have activity(s)'
.prev(2) .prev(2)
.find('input') .find('input')
.should('have.attr', 'type', 'radio') // select the previous element .should('have.attr', 'type', 'radio') // select the previous element

View File

@@ -24,7 +24,7 @@
<label :for="item + index">{{ item }}</label> <label :for="item + index">{{ item }}</label>
</div> </div>
</div> </div>
<div v-show="selectValue[0] === 'Sequence' && selectValue[1] === 'Start activity / End activity'"> <div v-show="selectValue[0] === 'Sequence' && selectValue[1] === 'Start & End'">
<p class="h2">Start & End</p> <p class="h2">Start & End</p>
<div v-for="(item, index) in selectFilter['Start & End']" :key="index"> <div v-for="(item, index) in selectFilter['Start & End']" :key="index">
<RadioButton v-model="selectValue[2]" :inputId="item + index" name="Start & End" :value="item" class="mb-1 mr-2"/> <RadioButton v-model="selectValue[2]" :inputId="item + index" name="Start & End" :value="item" class="mb-1 mr-2"/>
@@ -71,11 +71,11 @@
<!-- Filter task Data--> <!-- Filter task Data-->
<ActOccCase v-if="selectValue[0] === 'Sequence' && selectValue[1] === 'Have activity(s)'" :tableTitle="'Activity List'" :tableData="filterAllTaskData" :tableSelect="selectFilterTask" :progressWidth ="progressWidth" @on-row-select="onRowAct"></ActOccCase> <ActOccCase v-if="selectValue[0] === 'Sequence' && selectValue[1] === 'Have activity(s)'" :tableTitle="'Activity List'" :tableData="filterAllTaskData" :tableSelect="selectFilterTask" :progressWidth ="progressWidth" @on-row-select="onRowAct"></ActOccCase>
<!-- Filter Start Data --> <!-- Filter Start Data -->
<ActOcc v-if="selectValue[0] === 'Sequence' && selectValue[1] === 'Start activity / End activity' && selectValue[2] === 'Start'" :tableTitle="'Start activity'" :tableData="filterStartData" :tableSelect="selectFilterStart" :progressWidth ="progressWidth" @on-row-select="onRowStart"></ActOcc> <ActOcc v-if="selectValue[0] === 'Sequence' && selectValue[1] === 'Start & End' && selectValue[2] === 'Start'" :tableTitle="'Start activity'" :tableData="filterStartData" :tableSelect="selectFilterStart" :progressWidth ="progressWidth" @on-row-select="onRowStart"></ActOcc>
<!-- Filter End Data --> <!-- Filter End Data -->
<ActOcc v-if="selectValue[0] === 'Sequence' && selectValue[1] === 'Start activity / End activity' && selectValue[2] === 'End'" :tableTitle="'End activity'" :tableData="filterEndData" :tableSelect="selectFilterEnd" :progressWidth ="progressWidth" @on-row-select="onRowEnd"></ActOcc> <ActOcc v-if="selectValue[0] === 'Sequence' && selectValue[1] === 'Start & End' && selectValue[2] === 'End'" :tableTitle="'End activity'" :tableData="filterEndData" :tableSelect="selectFilterEnd" :progressWidth ="progressWidth" @on-row-select="onRowEnd"></ActOcc>
<!-- Filter Start And End Data --> <!-- Filter Start And End Data -->
<div v-if="selectValue[0] === 'Sequence' && selectValue[1] === 'Start activity / End activity' && selectValue[2] === 'Start & End'" class="flex justify-between items-center w-full h-full space-x-4 "> <div v-if="selectValue[0] === 'Sequence' && selectValue[1] === 'Start & End' && selectValue[2] === 'Start & End'" class="flex justify-between items-center w-full h-full space-x-4 ">
<ActOcc :tableTitle="'Start activity'" :tableData="filterStartToEndData" :tableSelect="selectFilterStartToEnd" :progressWidth ="progressWidth" class="w-1/2" @on-row-select="startRow"></ActOcc> <ActOcc :tableTitle="'Start activity'" :tableData="filterStartToEndData" :tableSelect="selectFilterStartToEnd" :progressWidth ="progressWidth" class="w-1/2" @on-row-select="startRow"></ActOcc>
<ActOcc :tableTitle="'End activity'" :tableData="filterEndToStartData" :tableSelect="selectFilterEndToStart" :progressWidth ="progressWidth" class="w-1/2" @on-row-select="endRow"></ActOcc> <ActOcc :tableTitle="'End activity'" :tableData="filterEndToStartData" :tableSelect="selectFilterEndToStart" :progressWidth ="progressWidth" class="w-1/2" @on-row-select="endRow"></ActOcc>
</div> </div>
@@ -130,7 +130,7 @@ export default {
selectFilter: { selectFilter: {
// 'Filter Type': ['Sequence', 'Attributes', 'Trace', 'Timeframes'], // 'Filter Type': ['Sequence', 'Attributes', 'Trace', 'Timeframes'],
'Filter Type': ['Sequence', 'Trace', 'Timeframes'], 'Filter Type': ['Sequence', 'Trace', 'Timeframes'],
'Activity Sequence':['Have activity(s)', 'Start activity / End activity', 'Sequence'], 'Activity Sequence':['Have activity(s)', 'Start & End', 'Sequence'],
'Start & End': ['Start', 'End', 'Start & End'], 'Start & End': ['Start', 'End', 'Start & End'],
'Mode': ['Directly follows', 'Eventually follows'], 'Mode': ['Directly follows', 'Eventually follows'],
'ModeAtt': ['Case', 'Activity'], 'ModeAtt': ['Case', 'Activity'],
@@ -202,7 +202,7 @@ export default {
case 'Have activity(s)': // Activity Sequence 選 Have activity(s) 的行為 case 'Have activity(s)': // Activity Sequence 選 Have activity(s) 的行為
if(this.selectFilterTask && this.selectFilterTask?.length !== 0) disabled = false; if(this.selectFilterTask && this.selectFilterTask?.length !== 0) disabled = false;
break; break;
case 'Start activity / End activity': // Activity Sequence 選 Start activity / End activity 的行為 case 'Start & End': // Activity Sequence 選 Start & End 的行為
switch(sele[2]) { switch(sele[2]) {
case 'Start': case 'Start':
if(this.selectFilterStart) disabled = false; if(this.selectFilterStart) disabled = false;
@@ -458,7 +458,7 @@ export default {
} }
}); });
break; break;
case 'Start activity / End activity': // Activity Sequence 選 Start activity / End activity 的行為 case 'Start & End': // Activity Sequence 選 Start & End 的行為
switch(sele[2]) { switch(sele[2]) {
case 'Start': case 'Start':
data = { data = {