test: E2E-conformance rule Activity duration done.
This commit is contained in:
@@ -106,6 +106,59 @@ describe('Conformance Save', ()=>{
|
|||||||
// cy.contains('#swal2-html-container', 'random-conformance-rule-E2Etesting');
|
// cy.contains('#swal2-html-container', 'random-conformance-rule-E2Etesting');
|
||||||
// });
|
// });
|
||||||
|
|
||||||
|
// it('Activity sequence, Sequence, Directly follows', () => {
|
||||||
|
// // enter Map
|
||||||
|
// cy.url().should('include', 'files');
|
||||||
|
// cy.get('table tr')
|
||||||
|
// .filter(':contains("Rule")') // 選擇 type Log
|
||||||
|
// .filter(':contains("random-conformance-rule-E2Etesting")') // 選擇 random log 檔
|
||||||
|
// .dblclick({ force: true }); // 對選中的 tr 執行雙擊
|
||||||
|
// cy.contains('h2', 'DISCOVER'); // 斷言在 Discover 頁
|
||||||
|
// cy.url().should('include', 'rule/log'); // 斷言在 discover/map/log/:id 路徑
|
||||||
|
// cy.wait(2000)
|
||||||
|
|
||||||
|
// // select radio Rule Type
|
||||||
|
// cy.get('#cyp-conformance-type-radio')
|
||||||
|
// .find('input[value="Activity sequence"]')
|
||||||
|
// .check({ force: true })
|
||||||
|
// .should('be.checked');
|
||||||
|
|
||||||
|
// // select radio Activity Sequence
|
||||||
|
// cy.get('#cyp-conformance-sequence-radio')
|
||||||
|
// .find('input[value="Sequence"]')
|
||||||
|
// .check({ force: true })
|
||||||
|
// .should('be.checked');
|
||||||
|
|
||||||
|
// // select radio Mode
|
||||||
|
// cy.get('#cyp-conformance-Mode-radio')
|
||||||
|
// .find('input[value="Directly follows"]')
|
||||||
|
// .check({ force: true })
|
||||||
|
// .should('be.checked');
|
||||||
|
|
||||||
|
// // open showbar
|
||||||
|
// cy.get('#cyp-showbaricon').click();
|
||||||
|
|
||||||
|
// // select radio Start
|
||||||
|
// cy.get('div[data-draggable="true"]').eq(0).dblclick(); // 第 1 個 div
|
||||||
|
// cy.get('div[data-draggable="true"]').eq(1).dblclick(); // 第 2 個 div
|
||||||
|
// cy.get('div[data-draggable="true"]').eq(2).dblclick(); // 第 3 個 div
|
||||||
|
// cy.contains('button', 'Apply').click();
|
||||||
|
|
||||||
|
// // click apply
|
||||||
|
// cy.contains('button', 'Apply').click();
|
||||||
|
// cy.contains('.v-toast', 'Rule applied');
|
||||||
|
|
||||||
|
// // 是否有顯示選擇項目
|
||||||
|
// cy.get('#cyp-conformance-result-arrow')
|
||||||
|
// .find('li') // 在 ul 中找到所有的 li 元素
|
||||||
|
// .should('have.length', 3); // 斷言 li 的數量為 2
|
||||||
|
|
||||||
|
// // save log
|
||||||
|
// cy.contains('button', 'Save').click();
|
||||||
|
// cy.contains('.swal2-title', 'SAVE COMPLETE');
|
||||||
|
// cy.contains('#swal2-html-container', 'random-conformance-rule-E2Etesting');
|
||||||
|
// });
|
||||||
|
|
||||||
it('Activity sequence, Sequence, Directly follows', () => {
|
it('Activity sequence, Sequence, Directly follows', () => {
|
||||||
// enter Map
|
// enter Map
|
||||||
cy.url().should('include', 'files');
|
cy.url().should('include', 'files');
|
||||||
@@ -119,19 +172,7 @@ describe('Conformance Save', ()=>{
|
|||||||
|
|
||||||
// select radio Rule Type
|
// select radio Rule Type
|
||||||
cy.get('#cyp-conformance-type-radio')
|
cy.get('#cyp-conformance-type-radio')
|
||||||
.find('input[value="Activity sequence"]')
|
.find('input[value="Activity duration"]')
|
||||||
.check({ force: true })
|
|
||||||
.should('be.checked');
|
|
||||||
|
|
||||||
// select radio Activity Sequence
|
|
||||||
cy.get('#cyp-conformance-sequence-radio')
|
|
||||||
.find('input[value="Sequence"]')
|
|
||||||
.check({ force: true })
|
|
||||||
.should('be.checked');
|
|
||||||
|
|
||||||
// select radio Mode
|
|
||||||
cy.get('#cyp-conformance-Mode-radio')
|
|
||||||
.find('input[value="Directly follows"]')
|
|
||||||
.check({ force: true })
|
.check({ force: true })
|
||||||
.should('be.checked');
|
.should('be.checked');
|
||||||
|
|
||||||
@@ -139,19 +180,29 @@ describe('Conformance Save', ()=>{
|
|||||||
cy.get('#cyp-showbaricon').click();
|
cy.get('#cyp-showbaricon').click();
|
||||||
|
|
||||||
// select radio Start
|
// select radio Start
|
||||||
cy.get('div[data-draggable="true"]').eq(0).dblclick(); // 第 1 個 div
|
cy.contains('p', 'Activities')
|
||||||
cy.get('div[data-draggable="true"]').eq(1).dblclick(); // 第 2 個 div
|
.next('div')
|
||||||
cy.get('div[data-draggable="true"]').eq(2).dblclick(); // 第 3 個 div
|
.find('input')
|
||||||
|
.first()
|
||||||
|
.check({ force: true })
|
||||||
|
.should('be.checked');
|
||||||
cy.contains('button', 'Apply').click();
|
cy.contains('button', 'Apply').click();
|
||||||
|
|
||||||
|
// change time to time range Start
|
||||||
|
cy.get('#min').click();
|
||||||
|
cy.get('input[data-index="2"]').eq(0).type('59', { force: true });
|
||||||
|
// change time to time range End
|
||||||
|
cy.get('#max').click();
|
||||||
|
cy.get('input[data-index="2"]').eq(0).type('0', { force: true });
|
||||||
|
|
||||||
// click apply
|
// click apply
|
||||||
cy.contains('button', 'Apply').click();
|
cy.contains('button', 'Apply').click();
|
||||||
cy.contains('.v-toast', 'Rule applied');
|
cy.contains('.v-toast', 'Rule applied');
|
||||||
|
|
||||||
// 是否有顯示選擇項目
|
// 是否有顯示選擇項目
|
||||||
cy.get('#cyp-conformance-result-arrow')
|
cy.get('#cyp-conformance-result-check')
|
||||||
.find('li') // 在 ul 中找到所有的 li 元素
|
.find('li') // 在 ul 中找到所有的 li 元素
|
||||||
.should('have.length', 3); // 斷言 li 的數量為 2
|
.should('have.length', 1); // 斷言 li 的數量為 2
|
||||||
|
|
||||||
// save log
|
// save log
|
||||||
cy.contains('button', 'Save').click();
|
cy.contains('button', 'Save').click();
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="space-y-2" id="cyp-conformance-result-check">
|
<ul class="space-y-2" id="cyp-conformance-result-check">
|
||||||
<div class="flex justify-start items-center pr-4" v-for="(act, index) in datadata" :key="index">
|
<li class="flex justify-start items-center pr-4" v-for="(act, index) in datadata" :key="index">
|
||||||
<span class="material-symbols-outlined text-primary mr-2">
|
<span class="material-symbols-outlined text-primary mr-2">
|
||||||
check_circle
|
check_circle
|
||||||
</span>
|
</span>
|
||||||
<p class="px-2 py-1 border border-neutral-500 w-full whitespace-nowrap break-keep text-ellipsis overflow-hidden">{{ act }}</p>
|
<p class="px-2 py-1 border border-neutral-500 w-full whitespace-nowrap break-keep text-ellipsis overflow-hidden">{{ act }}</p>
|
||||||
</div>
|
</li>
|
||||||
</div>
|
</ul>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="flex justify-between items-center">
|
<div class="flex justify-between items-center" id="cyp-timerange">
|
||||||
<Durationjs :max="minVuemax" :min="minVuemin" :size="'min'" :updateMax="updateMax" @total-seconds="minTotalSeconds"></Durationjs>
|
<Durationjs :max="minVuemax" :min="minVuemin" :size="'min'" :updateMax="updateMax" @total-seconds="minTotalSeconds"></Durationjs>
|
||||||
<span>~</span>
|
<span>~</span>
|
||||||
<Durationjs :max="maxVuemax" :min="maxVuemin" :size="'max'" @total-seconds="maxTotalSeconds"></Durationjs>
|
<Durationjs :max="maxVuemax" :min="maxVuemin" :size="'max'" @total-seconds="maxTotalSeconds"></Durationjs>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<div v-if="totalSeconds === 0" class="text-center">
|
<div v-if="totalSeconds === 0" class="text-center">
|
||||||
<p>0</p>
|
<p>0</p>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="flex justify-center items-center gap-1">
|
<div v-else class="flex justify-center items-center gap-1" id="cyp-timerange-show">
|
||||||
<p>{{ days }}d</p>
|
<p>{{ days }}d</p>
|
||||||
<p>{{ hours }}h</p>
|
<p>{{ hours }}h</p>
|
||||||
<p>{{ minutes }}m</p>
|
<p>{{ minutes }}m</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user