test: E2E-conformance no save done.
This commit is contained in:
@@ -7,44 +7,47 @@ describe('Conformance Save', ()=>{
|
|||||||
cy.visit('https://REDACTED-HOST/files');
|
cy.visit('https://REDACTED-HOST/files');
|
||||||
});
|
});
|
||||||
|
|
||||||
// it('save conformance log', () => {
|
it('save conformance log', () => {
|
||||||
// // enter Map
|
// enter Map
|
||||||
// cy.url().should('include', 'files');
|
cy.url().should('include', 'files');
|
||||||
// cy.contains('.fileName', 'random').dblclick(); // 選取 'random' log 檔
|
cy.get('table tr')
|
||||||
// cy.contains('h2', 'DISCOVER'); // 斷言在 Discover 頁
|
.filter(':contains("Log")') // 選擇 type Log
|
||||||
// cy.url().should('include', 'discover/map/log'); // 斷言在 discover/map/log/:id 路徑
|
.filter(':contains("random")') // 選擇 random log 檔
|
||||||
// cy.wait(2000)
|
.dblclick(); // 對選中的 tr 執行雙擊
|
||||||
|
cy.contains('h2', 'DISCOVER'); // 斷言在 Discover 頁
|
||||||
|
cy.url().should('include', 'discover/map/log'); // 斷言在 discover/map/log/:id 路徑
|
||||||
|
cy.wait(2000)
|
||||||
|
|
||||||
// // enter Conformance
|
// enter Conformance
|
||||||
// cy.contains('li', 'CONFORMANCE').click(); // 點擊 Conformance 頁
|
cy.contains('li', 'CONFORMANCE').click(); // 點擊 Conformance 頁
|
||||||
// cy.wait(2000);
|
cy.wait(2000);
|
||||||
// cy.url().should('include', '/discover/conformance/log'); // 斷言在 discover/conformance/log/:id 路徑
|
cy.url().should('include', '/discover/conformance/log'); // 斷言在 discover/conformance/log/:id 路徑
|
||||||
// cy.get('.active').should('have.text', 'CONFORMANCE');
|
cy.get('.active').should('have.text', 'CONFORMANCE');
|
||||||
|
|
||||||
// // select radio
|
// select radio
|
||||||
// cy.get('#cyp-conformance-type-radio').find('input').first().click({ force: true }).should('be.checked');
|
cy.get('#cyp-conformance-type-radio').find('input').first().click({ force: true }).should('be.checked');
|
||||||
|
|
||||||
// // select list checkbox
|
// select list checkbox
|
||||||
// cy.get('#cyp-conformance-list-checkbox').find('input').first().click({ force: true }).should('be.checked');
|
cy.get('#cyp-conformance-list-checkbox').find('input').first().click({ force: true }).should('be.checked');
|
||||||
|
|
||||||
// // 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');
|
||||||
|
|
||||||
// // save conformance log
|
// save conformance log
|
||||||
// cy.contains('button', 'Save').click();
|
cy.contains('button', 'Save').click();
|
||||||
// cy.contains('.swal2-title', 'SAVE NEW RULE');
|
cy.contains('.swal2-title', 'SAVE NEW RULE');
|
||||||
// cy.contains('button', 'OK').click();
|
cy.contains('button', 'OK').click();
|
||||||
// cy.contains('#swal2-validation-message', 'You need to write something!'); // 不輸入要跳驗證
|
cy.contains('#swal2-validation-message', 'You need to write something!'); // 不輸入要跳驗證
|
||||||
// cy.get('.swal2-input').clear().type('random-conformance-log-E2Etesting');
|
cy.get('.swal2-input').clear().type('random-conformance-log-E2Etesting');
|
||||||
// cy.contains('button', 'OK').click();
|
cy.contains('button', 'OK').click();
|
||||||
// cy.contains('#swal2-html-container', 'random-conformance-log-E2Etesting');
|
cy.contains('#swal2-html-container', 'random-conformance-log-E2Etesting');
|
||||||
|
|
||||||
// // 回到 Files 檢查是否有新增 Filter 'random-conformance-log-E2Etesting'.
|
// 回到 Files 檢查是否有新增 Filter 'random-conformance-log-E2Etesting'.
|
||||||
// cy.visit('https://REDACTED-HOST/files');
|
cy.visit('https://REDACTED-HOST/files');
|
||||||
// cy.url().should('include', 'files');
|
cy.url().should('include', 'files');
|
||||||
// cy.contains('.fileName', 'random-conformance-log-E2Etesting');
|
cy.contains('.fileName', 'random-conformance-log-E2Etesting');
|
||||||
// });
|
});
|
||||||
|
|
||||||
it('save conformance filter', () => {
|
it('save conformance filter', () => {
|
||||||
// 先做一個 filter,再做一個 conformance filter。
|
// 先做一個 filter,再做一個 conformance filter。
|
||||||
@@ -90,9 +93,10 @@ describe('Conformance Save', ()=>{
|
|||||||
cy.visit('https://REDACTED-HOST/files');
|
cy.visit('https://REDACTED-HOST/files');
|
||||||
cy.url().should('include', 'files');
|
cy.url().should('include', 'files');
|
||||||
cy.get('table tr')
|
cy.get('table tr')
|
||||||
.filter(':contains("Filter")') // 選擇 type Filter
|
.contains('.fileType', 'Filter')
|
||||||
.filter(':contains("random-to-conformance-filter-E2Etesting")') // 選擇 random-to-conformance-filter-E2Etesting filter 檔
|
.parent()
|
||||||
.dblclick(); // 對選中的 tr 執行雙擊
|
.contains('.fileName', 'random-to-conformance-filter-E2Etesting')
|
||||||
|
.dblclick();
|
||||||
cy.contains('h2', 'DISCOVER'); // 斷言在 Discover 頁
|
cy.contains('h2', 'DISCOVER'); // 斷言在 Discover 頁
|
||||||
cy.url().should('include', 'discover/map/filter'); // 斷言在 discover/map/filter/:id 路徑
|
cy.url().should('include', 'discover/map/filter'); // 斷言在 discover/map/filter/:id 路徑
|
||||||
cy.wait(2000)
|
cy.wait(2000)
|
||||||
@@ -128,38 +132,37 @@ describe('Conformance Save', ()=>{
|
|||||||
cy.contains('.fileName', 'random-conformance-filter-E2Etesting');
|
cy.contains('.fileName', 'random-conformance-filter-E2Etesting');
|
||||||
});
|
});
|
||||||
|
|
||||||
// it('no save log', () => {
|
it('no save conformance', () => {
|
||||||
// // enter log
|
// enter log
|
||||||
// cy.url().should('include', 'files');
|
cy.url().should('include', 'files');
|
||||||
// cy.contains('.fileName', 'random').dblclick(); // 選取 'random' log 檔
|
cy.get('table tr')
|
||||||
// cy.contains('h2', 'DISCOVER'); // 斷言在 Discover 頁
|
.filter(':contains("Log")') // 選擇 type Log
|
||||||
// cy.url().should('include', 'discover/map/log'); // 斷言在 discover/map/log/:id 路徑
|
.filter(':contains("random")') // 選擇 random log 檔
|
||||||
// cy.wait(3000)
|
.dblclick(); // 對選中的 tr 執行雙擊
|
||||||
|
cy.contains('h2', 'DISCOVER'); // 斷言在 Discover 頁
|
||||||
|
cy.url().should('include', 'discover/map/log'); // 斷言在 discover/map/log/:id 路徑
|
||||||
|
cy.wait(2000)
|
||||||
|
|
||||||
// // select radio
|
// enter Conformance
|
||||||
// cy.get('#iconFilter').click(); // 選取 Filter sidebar
|
cy.contains('li', 'CONFORMANCE').click(); // 點擊 Conformance 頁
|
||||||
// cy.get('input#Sequence0').should('be.checked'); // 選取 Radio 'Sequence'
|
cy.wait(2000);
|
||||||
// cy.contains('label', 'Have activity(s)') // 選取 Radio 'Have activity(s)'
|
cy.url().should('include', '/discover/conformance/log'); // 斷言在 discover/conformance/log/:id 路徑
|
||||||
// .prev(2)
|
cy.get('.active').should('have.text', 'CONFORMANCE');
|
||||||
// .find('input')
|
|
||||||
// .should('have.attr', 'type', 'radio') // select the previous element
|
|
||||||
// .should('be.checked'); // confirm it's type radio (optional)
|
|
||||||
|
|
||||||
// // select table item
|
// select radio
|
||||||
// cy.get('.allCheckboxAct') // 選取 all select
|
cy.get('#cyp-conformance-type-radio').find('input').first().click({ force: true }).should('be.checked');
|
||||||
// .find('input')
|
|
||||||
// .should('not.be.visible').check({ force: true}).should('be.checked'); // 打開隱藏項目並選取
|
|
||||||
|
|
||||||
// // click Alpay and click Alppy All
|
// select list checkbox
|
||||||
// cy.contains('button', 'Apply').click();
|
cy.get('#cyp-conformance-list-checkbox').find('input').first().click({ force: true }).should('be.checked');
|
||||||
// cy.get('#tabFunnel').click();
|
|
||||||
// cy.contains('.p-timeline', 'Sequence');
|
|
||||||
// cy.contains('button', 'Apply All').click();
|
|
||||||
// cy.wait(3000)
|
|
||||||
|
|
||||||
// cy.get('#backPage').click();
|
// click apply
|
||||||
// cy.contains('.swal2-title', 'LEAVE MAP');
|
cy.contains('button', 'Apply').click();
|
||||||
// cy.contains('button', 'OK').click();
|
cy.contains('.v-toast', 'Rule applied');
|
||||||
// cy.url().should('include', 'files');
|
cy.wait(1000)
|
||||||
// })
|
|
||||||
|
cy.get('#backPage').click();
|
||||||
|
cy.contains('.swal2-title', 'SAVE YOUR RULE');
|
||||||
|
cy.contains('button', 'No').click();
|
||||||
|
cy.url().should('include', 'files');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user