diff --git a/cypress/fixtures/doneTesting/conformanceRule.cy.js b/cypress/fixtures/doneTesting/conformanceRule.cy.js index 4920d55..f306055 100644 --- a/cypress/fixtures/doneTesting/conformanceRule.cy.js +++ b/cypress/fixtures/doneTesting/conformanceRule.cy.js @@ -7,973 +7,6 @@ describe('Conformance Save', ()=>{ cy.visit('https://REDACTED-HOST/files'); }); - // it('Have activity', () => { - // // enter Map - // cy.url().should('include', 'files'); - // cy.get('table tr') - // .filter(':contains("Log")') // 選擇 type Log - // .filter(':contains("random")') // 選擇 random log 檔 - // .dblclick(); // 對選中的 tr 執行雙擊 - // cy.contains('h2', 'DISCOVER'); // 斷言在 Discover 頁 - // cy.url().should('include', 'discover/map/log'); // 斷言在 discover/map/log/:id 路徑 - // cy.wait(2000) - - // // enter Conformance - // cy.contains('li', 'CONFORMANCE').click(); // 點擊 Conformance 頁 - // cy.wait(2000); - // cy.url().should('include', '/discover/conformance/log'); // 斷言在 discover/conformance/log/:id 路徑 - // cy.get('.active').should('have.text', 'CONFORMANCE'); - - // // select radio - // cy.get('#cyp-conformance-type-radio').find('input').first().click({ force: true }).should('be.checked'); - - // // select list checkbox - // cy.get('#cyp-conformance-list-checkbox').find('input').first().click({ force: true }).should('be.checked'); - - // // click apply - // cy.contains('button', 'Apply').click(); - // cy.contains('.v-toast', 'Rule applied'); - - // // 是否有顯示選擇項目 - // cy.get('#cyp-conformance-result-check').should('exist'); // 不僅僅檢查元素是否存在於 DOM 中,還檢查元素是否可見,並等待一定時間(預設為 4 秒)以確保元素在這段時間內出現在畫面上。 - - // // save conformance log - // cy.contains('button', 'Save').click(); - // cy.contains('.swal2-title', 'SAVE NEW RULE'); - // cy.contains('button', 'OK').click(); - // cy.contains('#swal2-validation-message', 'You need to write something!'); // 不輸入要跳驗證 - // cy.get('.swal2-input').clear().type('random-conformance-rule-E2Etesting'); - // cy.contains('button', 'OK').click(); - // cy.contains('#swal2-html-container', 'random-conformance-rule-E2Etesting'); - - // // 回到 Files 檢查是否有新增 Filter 'random-conformance-log-E2Etesting'. - // cy.visit('https://REDACTED-HOST/files'); - // cy.url().should('include', 'files'); - // cy.contains('.fileName', 'random-conformance-rule-E2Etesting'); - // }); - - // it('Activity sequence', () => { - // // enter Map - // cy.url().should('include', 'files'); - // cy.get('table tr').filter(':contains("Rule")').filter(':contains("random-conformance-rule-E2Etesting")').dblclick({ force: true }); - // 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="Start & End"]') - // .check({ force: true }) - // .should('be.checked'); - - // // open showbar - // cy.get('#cyp-showbaricon').click(); - - // // select radio Start - // cy.contains('p', 'Start') - // .next('div') - // .find('input') - // .first() - // .check({ force: true }) - // .should('be.checked'); - // // select radio End - // cy.contains('p', 'End') - // .next('div') - // .find('input') - // .check({ force: true }) - // .should('be.checked'); - - // // click apply - // cy.contains('button', 'Apply').click(); - // cy.contains('.v-toast', 'Rule applied'); - - // // 是否有顯示選擇項目 - // cy.get('#cyp-conformance-result-dot') - // .find('li') // 在 ul 中找到所有的 li 元素 - // .should('have.length', 2); // 斷言 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', () => { - // // enter Map - // cy.url().should('include', 'files'); - // cy.get('table tr').filter(':contains("Rule")').filter(':contains("random-conformance-rule-E2Etesting")').dblclick({ force: true }); - // 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 duration', () => { - // // 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 duration"]') - // .check({ force: true }) - // .should('be.checked'); - - // // open showbar - // cy.get('#cyp-showbaricon').click(); - - // // select radio Activities - // cy.contains('p', 'Activities') - // .next('div') - // .find('input') - // .first() - // .check({ force: true }) - // .should('be.checked'); - - // // 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 - // cy.contains('button', 'Apply').click(); - // cy.contains('.v-toast', 'Rule applied'); - - // // 是否有顯示選擇項目 - // cy.get('#cyp-conformance-result-check') - // .find('li') // 在 ul 中找到所有的 li 元素 - // .should('have.length', 1); // 斷言 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('Processing time, End to end, All', () => { - // // enter Map - // cy.url().should('include', 'files'); - // cy.get('table tr').filter(':contains("Rule")').filter(':contains("random-conformance-rule-E2Etesting")').dblclick({ force: true }); - // 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="Processing time"]') - // .check({ force: true }) - // .should('be.checked'); - // // select radio Process Scope - // cy.get('#cyp-conformance-procss-radio') - // .find('input[value="End to end"]') - // .check({ force: true }) - // .should('be.checked'); - // // select radio Activity Sequence - // cy.get('#cyp-conformance-actseq-radio') - // .find('input[value="All"]') - // .check({ force: true }) - // .should('be.checked'); - - // // 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 - // cy.contains('button', 'Apply').click(); - // cy.contains('.v-toast', 'Rule applied'); - - // // save log - // cy.contains('button', 'Save').click(); - // cy.contains('.swal2-title', 'SAVE COMPLETE'); - // cy.contains('#swal2-html-container', 'random-conformance-rule-E2Etesting'); - // }); - - // it('Processing time, End to end, Start', () => { - // // enter Map - // cy.url().should('include', 'files'); - // cy.get('table tr').filter(':contains("Rule")').filter(':contains("random-conformance-rule-E2Etesting")').dblclick({ force: true }); - // 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="Processing time"]') - // .check({ force: true }) - // .should('be.checked'); - // // select radio Process Scope - // cy.get('#cyp-conformance-procss-radio') - // .find('input[value="End to end"]') - // .check({ force: true }) - // .should('be.checked'); - // // select radio Activity Sequence - // cy.get('#cyp-conformance-actseq-radio') - // .find('input[value="Start"]') - // .check({ force: true }) - // .should('be.checked'); - - // // open showbar - // cy.get('#cyp-showbaricon').click(); - - // // select radio Start - // cy.contains('p', 'Start') - // .next('div') - // .find('input') - // .first() - // .check({ force: true }) - // .should('be.checked'); - // // 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 - // cy.contains('button', 'Apply').click(); - // cy.contains('.v-toast', 'Rule applied'); - - // // 是否有顯示選擇項目 - // cy.get('#cyp-conformance-result-dot') - // .find('li') // 在 ul 中找到所有的 li 元素 - // .should('have.length', 1); // 斷言 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('Processing time, End to end, End', () => { - // // enter Map - // cy.url().should('include', 'files'); - // cy.get('table tr').filter(':contains("Rule")').filter(':contains("random-conformance-rule-E2Etesting")').dblclick({ force: true }); - // 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="Processing time"]') - // .check({ force: true }) - // .should('be.checked'); - // // select radio Process Scope - // cy.get('#cyp-conformance-procss-radio') - // .find('input[value="End to end"]') - // .check({ force: true }) - // .should('be.checked'); - // // select radio Activity Sequence - // cy.get('#cyp-conformance-actseq-radio') - // .find('input[value="End"]') - // .check({ force: true }) - // .should('be.checked'); - - // // open showbar - // cy.get('#cyp-showbaricon').click(); - - // // select radio End - // cy.contains('p', 'End') - // .next('div') - // .find('input') - // .first() - // .check({ force: true }) - // .should('be.checked'); - // // 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 - // cy.contains('button', 'Apply').click(); - // cy.contains('.v-toast', 'Rule applied'); - - // // 是否有顯示選擇項目 - // cy.get('#cyp-conformance-result-dot') - // .find('li') // 在 ul 中找到所有的 li 元素 - // .should('have.length', 1); // 斷言 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('Processing time, End to end, Start & End', () => { - // // enter Map - // cy.url().should('include', 'files'); - // cy.get('table tr').filter(':contains("Rule")').filter(':contains("random-conformance-rule-E2Etesting")').dblclick({ force: true }); - // 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="Processing time"]') - // .check({ force: true }) - // .should('be.checked'); - // // select radio Process Scope - // cy.get('#cyp-conformance-procss-radio') - // .find('input[value="End to end"]') - // .check({ force: true }) - // .should('be.checked'); - // // select radio Activity Sequence - // cy.get('#cyp-conformance-actseq-radio') - // .find('input[value="Start & End"]') - // .check({ force: true }) - // .should('be.checked'); - - // // open showbar - // cy.get('#cyp-showbaricon').click(); - - // // select radio "Start & End - // cy.contains('p', 'Start') - // .next('div') - // .find('input') - // .check({ force: true }) - // .should('be.checked'); - // // select radio End - // cy.contains('p', 'End') - // .next('div') - // .find('input') - // .check({ force: true }) - // .should('be.checked'); - // // 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 - // cy.contains('button', 'Apply').click(); - // cy.contains('.v-toast', 'Rule applied'); - - // // 是否有顯示選擇項目 - // cy.get('#cyp-conformance-result-dot') - // .find('li') // 在 ul 中找到所有的 li 元素 - // .should('have.length', 2); // 斷言 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('Processing time, Partial, From', () => { - // // enter Map - // cy.url().should('include', 'files'); - // cy.get('table tr').filter(':contains("Rule")').filter(':contains("random-conformance-rule-E2Etesting")').dblclick({ force: true }); - // 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="Processing time"]') - // .check({ force: true }) - // .should('be.checked'); - // // select radio Process Scope - // cy.get('#cyp-conformance-procss-radio') - // .find('input[value="Partial"]') - // .check({ force: true }) - // .should('be.checked'); - // // select radio Activity Sequence - // cy.get('#cyp-conformance-actseqfromto-radio') - // .find('input[value="From"]') - // .check({ force: true }) - // .should('be.checked'); - - // // open showbar - // cy.get('#cyp-showbaricon').click(); - - // // select radio Start - // cy.contains('p', 'From') - // .next('div') - // .find('input') - // .first() - // .check({ force: true }) - // .should('be.checked'); - // // 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 - // cy.contains('button', 'Apply').click(); - // cy.contains('.v-toast', 'Rule applied'); - - // // 是否有顯示選擇項目 - // cy.get('#cyp-conformance-result-dot') - // .find('li') // 在 ul 中找到所有的 li 元素 - // .should('have.length', 1); // 斷言 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('Processing time, Partial, To', () => { - // // enter Map - // cy.url().should('include', 'files'); - // cy.get('table tr').filter(':contains("Rule")').filter(':contains("random-conformance-rule-E2Etesting")').dblclick({ force: true }); - // 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="Processing time"]') - // .check({ force: true }) - // .should('be.checked'); - // // select radio Process Scope - // cy.get('#cyp-conformance-procss-radio') - // .find('input[value="Partial"]') - // .check({ force: true }) - // .should('be.checked'); - // // select radio Activity Sequence - // cy.get('#cyp-conformance-actseqfromto-radio') - // .find('input[value="To"]') - // .check({ force: true }) - // .should('be.checked'); - - // // open showbar - // cy.get('#cyp-showbaricon').click(); - - // // select radio End - // cy.contains('p', 'To') - // .next('div') - // .find('input') - // .first() - // .check({ force: true }) - // .should('be.checked'); - // // 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 - // cy.contains('button', 'Apply').click(); - // cy.contains('.v-toast', 'Rule applied'); - - // // 是否有顯示選擇項目 - // cy.get('#cyp-conformance-result-dot') - // .find('li') // 在 ul 中找到所有的 li 元素 - // .should('have.length', 1); // 斷言 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('Processing time, Partial, From & To', () => { - // // enter Map - // cy.url().should('include', 'files'); - // cy.get('table tr').filter(':contains("Rule")').filter(':contains("random-conformance-rule-E2Etesting")').dblclick({ force: true }); - // 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="Processing time"]') - // .check({ force: true }) - // .should('be.checked'); - // // select radio Process Scope - // cy.get('#cyp-conformance-procss-radio') - // .find('input[value="Partial"]') - // .check({ force: true }) - // .should('be.checked'); - // // select radio Activity Sequence - // cy.get('#cyp-conformance-actseqfromto-radio') - // .find('input[value="From & To"]') - // .check({ force: true }) - // .should('be.checked'); - - // // open showbar - // cy.get('#cyp-showbaricon').click(); - - // // select radio From & To - // cy.contains('p', 'From') - // .next('div') - // .find('input') - // .check({ force: true }) - // .should('be.checked'); - // // select radio End - // cy.contains('p', 'To') - // .next('div') - // .find('input') - // .check({ force: true }) - // .should('be.checked'); - // // 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 - // cy.contains('button', 'Apply').click(); - // cy.contains('.v-toast', 'Rule applied'); - - // // 是否有顯示選擇項目 - // cy.get('#cyp-conformance-result-dot') - // .find('li') // 在 ul 中找到所有的 li 元素 - // .should('have.length', 2); // 斷言 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('Processing time, End to end, All', () => { - // // enter Map - // cy.url().should('include', 'files'); - // cy.get('table tr').filter(':contains("Rule")').filter(':contains("random-conformance-rule-E2Etesting")').dblclick({ force: true }); - // 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="Processing time"]') - // .check({ force: true }) - // .should('be.checked'); - // // select radio Process Scope - // cy.get('#cyp-conformance-procss-radio') - // .find('input[value="End to end"]') - // .check({ force: true }) - // .should('be.checked'); - // // select radio Activity Sequence - // cy.get('#cyp-conformance-actseq-radio') - // .find('input[value="All"]') - // .check({ force: true }) - // .should('be.checked'); - - // // 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 - // cy.contains('button', 'Apply').click(); - // cy.contains('.v-toast', 'Rule applied'); - - // // save log - // cy.contains('button', 'Save').click(); - // cy.contains('.swal2-title', 'SAVE COMPLETE'); - // cy.contains('#swal2-html-container', 'random-conformance-rule-E2Etesting'); - // }); - - // it('Waiting time, End to end, Start', () => { - // // enter Map - // cy.url().should('include', 'files'); - // cy.get('table tr').filter(':contains("Rule")').filter(':contains("random-conformance-rule-E2Etesting")').dblclick({ force: true }); - // 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="Waiting time"]') - // .check({ force: true }) - // .should('be.checked'); - // // select radio Process Scope - // cy.get('#cyp-conformance-procss-radio') - // .find('input[value="End to end"]') - // .check({ force: true }) - // .should('be.checked'); - // // select radio Activity Sequence - // cy.get('#cyp-conformance-actseq-radio') - // .find('input[value="Start"]') - // .check({ force: true }) - // .should('be.checked'); - - // // open showbar - // cy.get('#cyp-showbaricon').click(); - - // // select radio Start - // cy.contains('p', 'Start') - // .next('div') - // .find('input') - // .first() - // .check({ force: true }) - // .should('be.checked'); - // // 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 - // cy.contains('button', 'Apply').click(); - // cy.contains('.v-toast', 'Rule applied'); - - // // 是否有顯示選擇項目 - // cy.get('#cyp-conformance-result-dot') - // .find('li') // 在 ul 中找到所有的 li 元素 - // .should('have.length', 1); // 斷言 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('Waiting time, End to end, End', () => { - // // enter Map - // cy.url().should('include', 'files'); - // cy.get('table tr').filter(':contains("Rule")').filter(':contains("random-conformance-rule-E2Etesting")').dblclick({ force: true }); - // 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="Waiting time"]') - // .check({ force: true }) - // .should('be.checked'); - // // select radio Process Scope - // cy.get('#cyp-conformance-procss-radio') - // .find('input[value="End to end"]') - // .check({ force: true }) - // .should('be.checked'); - // // select radio Activity Sequence - // cy.get('#cyp-conformance-actseq-radio') - // .find('input[value="End"]') - // .check({ force: true }) - // .should('be.checked'); - - // // open showbar - // cy.get('#cyp-showbaricon').click(); - - // // select radio End - // cy.contains('p', 'End') - // .next('div') - // .find('input') - // .first() - // .check({ force: true }) - // .should('be.checked'); - // // 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 - // cy.contains('button', 'Apply').click(); - // cy.contains('.v-toast', 'Rule applied'); - - // // 是否有顯示選擇項目 - // cy.get('#cyp-conformance-result-dot') - // .find('li') // 在 ul 中找到所有的 li 元素 - // .should('have.length', 1); // 斷言 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('Waiting time, End to end, Start & End', () => { - // // enter Map - // cy.url().should('include', 'files'); - // cy.get('table tr').filter(':contains("Rule")').filter(':contains("random-conformance-rule-E2Etesting")').dblclick({ force: true }); - // 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="Waiting time"]') - // .check({ force: true }) - // .should('be.checked'); - // // select radio Process Scope - // cy.get('#cyp-conformance-procss-radio') - // .find('input[value="End to end"]') - // .check({ force: true }) - // .should('be.checked'); - // // select radio Activity Sequence - // cy.get('#cyp-conformance-actseq-radio') - // .find('input[value="Start & End"]') - // .check({ force: true }) - // .should('be.checked'); - - // // open showbar - // cy.get('#cyp-showbaricon').click(); - - // // select radio "Start & End - // cy.contains('p', 'Start') - // .next('div') - // .find('input') - // .check({ force: true }) - // .should('be.checked'); - // // select radio End - // cy.contains('p', 'End') - // .next('div') - // .find('input') - // .check({ force: true }) - // .should('be.checked'); - // // 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 - // cy.contains('button', 'Apply').click(); - // cy.contains('.v-toast', 'Rule applied'); - - // // 是否有顯示選擇項目 - // cy.get('#cyp-conformance-result-dot') - // .find('li') // 在 ul 中找到所有的 li 元素 - // .should('have.length', 2); // 斷言 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('Waiting time, Partial, From', () => { - // // enter Map - // cy.url().should('include', 'files'); - // cy.get('table tr').filter(':contains("Rule")').filter(':contains("random-conformance-rule-E2Etesting")').dblclick({ force: true }); - // 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="Waiting time"]') - // .check({ force: true }) - // .should('be.checked'); - // // select radio Process Scope - // cy.get('#cyp-conformance-procss-radio') - // .find('input[value="Partial"]') - // .check({ force: true }) - // .should('be.checked'); - // // select radio Activity Sequence - // cy.get('#cyp-conformance-actseqfromto-radio') - // .find('input[value="From"]') - // .check({ force: true }) - // .should('be.checked'); - - // // open showbar - // cy.get('#cyp-showbaricon').click(); - - // // select radio Start - // cy.contains('p', 'From') - // .next('div') - // .find('input') - // .first() - // .check({ force: true }) - // .should('be.checked'); - // // 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 - // cy.contains('button', 'Apply').click(); - // cy.contains('.v-toast', 'Rule applied'); - - // // 是否有顯示選擇項目 - // cy.get('#cyp-conformance-result-dot') - // .find('li') // 在 ul 中找到所有的 li 元素 - // .should('have.length', 1); // 斷言 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('Waiting time, Partial, To', () => { - // // enter Map - // cy.url().should('include', 'files'); - // cy.get('table tr').filter(':contains("Rule")').filter(':contains("random-conformance-rule-E2Etesting")').dblclick({ force: true }); - // 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="Waiting time"]') - // .check({ force: true }) - // .should('be.checked'); - // // select radio Process Scope - // cy.get('#cyp-conformance-procss-radio') - // .find('input[value="Partial"]') - // .check({ force: true }) - // .should('be.checked'); - // // select radio Activity Sequence - // cy.get('#cyp-conformance-actseqfromto-radio') - // .find('input[value="To"]') - // .check({ force: true }) - // .should('be.checked'); - - // // open showbar - // cy.get('#cyp-showbaricon').click(); - - // // select radio End - // cy.contains('p', 'To') - // .next('div') - // .find('input') - // .first() - // .check({ force: true }) - // .should('be.checked'); - // // 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 - // cy.contains('button', 'Apply').click(); - // cy.contains('.v-toast', 'Rule applied'); - - // // 是否有顯示選擇項目 - // cy.get('#cyp-conformance-result-dot') - // .find('li') // 在 ul 中找到所有的 li 元素 - // .should('have.length', 1); // 斷言 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('Waiting time, Partial, From & To', () => { - // // enter Map - // cy.url().should('include', 'files'); - // cy.get('table tr').filter(':contains("Rule")').filter(':contains("random-conformance-rule-E2Etesting")').dblclick({ force: true }); - // 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="Waiting time"]') - // .check({ force: true }) - // .should('be.checked'); - // // select radio Process Scope - // cy.get('#cyp-conformance-procss-radio') - // .find('input[value="Partial"]') - // .check({ force: true }) - // .should('be.checked'); - // // select radio Activity Sequence - // cy.get('#cyp-conformance-actseqfromto-radio') - // .find('input[value="From & To"]') - // .check({ force: true }) - // .should('be.checked'); - - // // open showbar - // cy.get('#cyp-showbaricon').click(); - - // // select radio From & To - // cy.contains('p', 'From') - // .next('div') - // .find('input') - // .check({ force: true }) - // .should('be.checked'); - // // select radio End - // cy.contains('p', 'To') - // .next('div') - // .find('input') - // .check({ force: true }) - // .should('be.checked'); - // // 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 - // cy.contains('button', 'Apply').click(); - // cy.contains('.v-toast', 'Rule applied'); - - // // 是否有顯示選擇項目 - // cy.get('#cyp-conformance-result-dot') - // .find('li') // 在 ul 中找到所有的 li 元素 - // .should('have.length', 2); // 斷言 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('Cycle time, Start', () => { // enter Map diff --git a/cypress/fixtures/doneTesting/fileUploadEtc.cy.js b/cypress/fixtures/doneTesting/fileUploadEtc.cy.js index be9df07..4a3d901 100644 --- a/cypress/fixtures/doneTesting/fileUploadEtc.cy.js +++ b/cypress/fixtures/doneTesting/fileUploadEtc.cy.js @@ -8,163 +8,4 @@ describe('File Upload etc', () => { cy.login(); cy.visit('https://REDACTED-HOST/files'); }); - - // it('Phase one worng file upload.', () => { - // cy.contains('div', 'Upload').click(); - // // 不是 UTF-8 - // cy.get('input[type="file"]').selectFile('cypress/fixtures/csv/big5.csv'); - // cy.contains('.swal2-html-container', 'UFT-8'); - // cy.wait(1000); - // cy.closePopup(); - // // 沒有資料 - // cy.get('input[type="file"]').selectFile('cypress/fixtures/csv/empty.csv'); - // cy.contains('.swal2-html-container', 'Need at least one record of data.'); - // cy.wait(1000); - // cy.closePopup(); - // // 欄位不滿 5 欄 - // cy.get('input[type="file"]').selectFile('cypress/fixtures/csv/insufficient-columns.csv'); - // cy.contains('.swal2-html-container', 'Need at least five columns of data.'); - // cy.wait(1000); - // cy.closePopup(); - // // 不是 csv - // cy.get('input[type="file"]').selectFile('cypress/fixtures/csv/favicon.ico'); - // cy.contains('.swal2-html-container', 'CSV'); - // cy.wait(1000); - // cy.closePopup(); - // }); - - // it('Upload Page, rename, reset, back to page', () => { - // cy.contains('div', 'Upload').click(); - // cy.get('input[type="file"]').selectFile('cypress/fixtures/csv/worngFile.csv'); - // // rename - // cy.get('#fileNameInput').type(' is space ').blur(); - // cy.get('#fileNameInput').should('have.value', 'worngFile is space'); - // cy.get('#fileNameInput').clear().type(' is space ').blur(); - // cy.get('#fileNameInput').should('have.value', 'is space'); - // // reset - // cy.get('div[data-type="timestamp"]').click(); - // cy.get('.p-dropdown-item').filter('[aria-label="Timestamp*"]').click(); // 使用 filter 選擇包含特定屬性的元素 - // cy.get('div[data-type="timestamp"] span').contains('Timestamp*'); - // cy.get('div[data-type="case id"]').click(); - // cy.get('.p-dropdown-item').filter('[aria-label="Case ID*"]').click(); - // cy.get('div[data-type="case id"] span').contains('Case ID*'); - // cy.get('div[data-type="name"]').click(); - // cy.get('.p-dropdown-item').filter('[aria-label="Activity*"]').click(); - // cy.get('div[data-type="name"] span').contains('Activity*'); - // cy.get('div[data-type="instance"]').click(); - // cy.get('.p-dropdown-item').filter('[aria-label="Activity Instance ID*"]').click(); - // cy.get('div[data-type="instance"] span').contains('Activity Instance ID*'); - // cy.get('div[data-type="status"]').click(); - // cy.get('.p-dropdown-item').filter('[aria-label="Status*"]').click(); - // cy.get('div[data-type="status"] span').contains('Status*'); - // cy.contains('.btn', 'Reset').click(); - // cy.get('div[data-type="timestamp"] span').contains('Not Assigned'); - // cy.get('div[data-type="case id"] span').contains('Not Assigned'); - // cy.get('div[data-type="name"] span').contains('Not Assigned'); - // cy.get('div[data-type="instance"] span').contains('Not Assigned'); - // cy.get('div[data-type="status"] span').contains('Not Assigned'); - // // back to page - // cy.contains('.btn', 'Cancel').click(); - // cy.url().should('include', 'files'); - // }); - - // it('Phase two worng file upload.', () => { - // cy.contains('div', 'Upload').click(); - // cy.get('input[type="file"]').selectFile('cypress/fixtures/csv/worngFile.csv'); - // // select - // cy.get('div[data-type="timestamp"]').click(); - // cy.get('.p-dropdown-item').filter('[aria-label="Timestamp*"]').click(); - // cy.get('div[data-type="timestamp"] span').contains('Timestamp*'); - // cy.get('div[data-type="case id"]').click(); - // cy.get('.p-dropdown-item').filter('[aria-label="Case ID*"]').click(); - // cy.get('div[data-type="case id"] span').contains('Case ID*'); - // cy.get('div[data-type="name"]').click(); - // cy.get('.p-dropdown-item').filter('[aria-label="Activity*"]').click(); - // cy.get('div[data-type="name"] span').contains('Activity*'); - // cy.get('div[data-type="instance"]').click(); - // cy.get('.p-dropdown-item').filter('[aria-label="Activity Instance ID*"]').click(); - // cy.get('div[data-type="instance"] span').contains('Activity Instance ID*'); - // cy.get('div[data-type="status"]').click(); - // cy.get('.p-dropdown-item').filter('[aria-label="Status*"]').click(); - // cy.get('div[data-type="status"] span').contains('Status*'); - // // send - // cy.contains('.btn', 'Upload').click(); - // // 'Are you sure?' SweetAlert2 的按鈕設為 display: none,使用 force: true 打開 - // cy.contains('h2.swal2-title', 'ARE YOU SURE?') - // .siblings('.swal2-actions') // 找到同級的 .swal2-actions - // .find('button.swal2-confirm') // 在 .swal2-actions 中找到 button.swal2-confirm - // .click({ force: true }); - // // Error Message - // cy.contains('h2.swal2-title', 'UPLOAD FAILED'); - // cy.get('div.swal2-html-container').find('li').should('have.length', 5) // 確認有 5 個錯誤訊息項目 - // cy.get('div.swal2-html-container li').should('contain', 'unregnizable').and('contain', 'Status'); - // cy.get('div.swal2-html-container li').should('contain', 'missing').and('contain', 'name'); - // cy.get('div.swal2-html-container').contains('p', 'There are more errors.'); - // }); - - // it('Right file upload.', () => { - // cy.contains('div', 'Upload').click(); - // cy.get('input[type="file"]').selectFile('cypress/fixtures/csv/rightFile.csv'); - // // 斷言按鈕是否禁用 - // cy.contains('.btn', 'Upload').should('be.disabled'); - // // select - // cy.get('div[data-type="Timestamp"]').click(); - // cy.get('.p-dropdown-item').filter('[aria-label="Timestamp*"]').click(); - // cy.get('div[data-type="Timestamp"] span').contains('Timestamp*'); - // cy.get('div[data-type="CaseID"]').click(); - // cy.get('.p-dropdown-item').filter('[aria-label="Case ID*"]').click(); - // cy.get('div[data-type="CaseID"] span').contains('Case ID*'); - // cy.get('div[data-type="Activity"]').click(); - // cy.get('.p-dropdown-item').filter('[aria-label="Activity*"]').click(); - // cy.get('div[data-type="Activity"] span').contains('Activity*'); - // cy.get('div[data-type="Activity_Instance"]').click(); - // cy.get('.p-dropdown-item').filter('[aria-label="Activity Instance ID*"]').click(); - // cy.get('div[data-type="Activity_Instance"] span').contains('Activity Instance ID*'); - // cy.get('div[data-type="Status"]').click(); - // cy.get('.p-dropdown-item').filter('[aria-label="Status*"]').click(); - // cy.get('div[data-type="Status"] span').contains('Status*'); - // // send - // cy.contains('.btn', 'Upload').click(); - // // 'Are you sure?' - // cy.contains('h2.swal2-title', 'ARE YOU SURE?').siblings('.swal2-actions').find('button.swal2-confirm').click(); - // cy.wait(3000); - // // 回到 file page - // cy.url().should('include', 'files'); - // // 只選文本內容而不包括子元素的文字 - // cy.get('table tbody tr:first-child td:first-child') - // .invoke('text') // 提取其文字 - // .should('include', 'rightFile'); - // }); - - // it('Donwload file.', () => { - // const downloadsFolder = Cypress.config('downloadsFolder'); - // const path = require('path'); - // const filename = path.join(downloadsFolder, 'rightFile.csv'); - - // // 選取檔案 - // cy.get('table tbody tr:first-child td:first-child') - // .contains('rightFile') - // .rightclick(); - // cy.get('.p-contextmenu') - // .find('li') - // .filter(':contains("Download")') - // .click(); - // cy.wait(2000); - // // download to '/cypress/downloads' - // cy.readFile(filename); - // cy.wait(2000); - // }); - - // it('Delete file.', () => { - // // select file - // cy.get('table tbody tr:first-child td:first-child') - // .contains('rightFile') // rightclick 需要 DOM 元素做目標,前面不能階斷言 should - // .rightclick(); - // cy.get('.p-contextmenu') - // .find('li') - // .filter(':contains("Delete")') - // .click(); - // // delete file - // cy.contains('h2.swal2-title', 'Confirm Deletion').siblings('.swal2-actions').find('button.swal2-confirm').click(); - // }); }); diff --git a/cypress/fixtures/doneTesting/filterFunnel.cy.js b/cypress/fixtures/doneTesting/filterFunnel.cy.js index cefd2ba..9f8ee21 100644 --- a/cypress/fixtures/doneTesting/filterFunnel.cy.js +++ b/cypress/fixtures/doneTesting/filterFunnel.cy.js @@ -8,7 +8,6 @@ describe('Save Log and Filter', ()=>{ // enter log cy.url().should('include', 'files'); - // cy.contains('.fileName', 'random').dblclick(); // 選取 'random' log 檔 cy.get('table tr') .filter(':contains("Log")') // 選擇 type Log .filter(':contains("random")') // 選擇 random log 檔 diff --git a/cypress/fixtures/doneTesting/performance.cy.js b/cypress/fixtures/doneTesting/performance.cy.js index 2aa497e..dc76f86 100644 --- a/cypress/fixtures/doneTesting/performance.cy.js +++ b/cypress/fixtures/doneTesting/performance.cy.js @@ -5,57 +5,6 @@ describe('Performance', ()=>{ cy.visit('https://REDACTED-HOST/files'); }); - // it('Enter Log', () => { - // // enter Map - // cy.url().should('include', 'files'); - // cy.get('table tr') - // .filter(':contains("Log")') - // .first() // 選擇集合中第一個元素 - // .dblclick(); - // cy.contains('h2', 'DISCOVER'); - // cy.url().should('include', 'discover/map/log'); - // cy.wait(2000); - // // enter Performance - // cy.contains('li', 'PERFORMANCE').click(); - // cy.url().should('include', 'discover/performance/log'); - // // 斷言頁面中有八個 canvas 元素 - // cy.get('canvas').should('have.length', 8); - // }); - - // it('Enter Filter', () => { - // // enter Map - // cy.url().should('include', 'files'); - // cy.get('table tr') - // .filter(':contains("Filter")') - // .first() - // .dblclick(); - // cy.contains('h2', 'DISCOVER'); - // cy.url().should('include', 'discover/map/filter'); - // cy.wait(2000); - // // enter Performance - // cy.contains('li', 'PERFORMANCE').click(); - // cy.url().should('include', 'discover/performance/filter'); - // // 斷言頁面中有八個 canvas 元素 - // cy.get('canvas').should('have.length', 8); - // }); - - // it('Enter Rule', () => { - // // enter Map - // cy.url().should('include', 'files'); - // cy.get('table tr') - // .filter(':contains("Rule")') - // .first() - // .dblclick(); - // cy.contains('h2', 'DISCOVER'); - // cy.url().should('include', 'conformance'); - // cy.wait(2000); - // // enter Performance - // cy.contains('li', 'PERFORMANCE').click(); - // cy.url().should('include', 'discover/performance'); - // // 斷言頁面中有八個 canvas 元素 - // cy.get('canvas').should('have.length', 8); - // }); - it('Anchor', () => { // enter Map cy.url().should('include', 'files'); diff --git a/cypress/fixtures/doneTesting/saveLogAndFilter.cy.js b/cypress/fixtures/doneTesting/saveLogAndFilter.cy.js index 105bb25..b2fac8b 100644 --- a/cypress/fixtures/doneTesting/saveLogAndFilter.cy.js +++ b/cypress/fixtures/doneTesting/saveLogAndFilter.cy.js @@ -10,7 +10,6 @@ describe('Save Log and Filter', ()=>{ it('save log', () => { // enter log cy.url().should('include', 'files'); - // cy.contains('.fileName', 'random').dblclick(); // 選取 'random' log 檔 cy.get('table tr') .filter(':contains("Log")') // 選擇 type Log .filter(':contains("random")') // 選擇 random log 檔 @@ -95,7 +94,6 @@ describe('Save Log and Filter', ()=>{ it('no save log', () => { // enter log cy.url().should('include', 'files'); - // cy.contains('.fileName', 'random').dblclick(); // 選取 'random' log 檔 cy.get('table tr') .filter(':contains("Log")') // 選擇 type Log .filter(':contains("random")') // 選擇 random log 檔