test: update E2E testing.
This commit is contained in:
@@ -10,7 +10,11 @@ describe('Save Log and Filter', ()=>{
|
||||
it('save log', () => {
|
||||
// enter log
|
||||
cy.url().should('include', 'files');
|
||||
cy.contains('.fileName', 'random').dblclick(); // 選取 'random' log 檔
|
||||
// cy.contains('.fileName', 'random').dblclick(); // 選取 'random' log 檔
|
||||
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(3000)
|
||||
@@ -91,7 +95,11 @@ describe('Save Log and Filter', ()=>{
|
||||
it('no save log', () => {
|
||||
// enter log
|
||||
cy.url().should('include', 'files');
|
||||
cy.contains('.fileName', 'random').dblclick(); // 選取 'random' log 檔
|
||||
// cy.contains('.fileName', 'random').dblclick(); // 選取 'random' log 檔
|
||||
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(3000)
|
||||
@@ -118,8 +126,8 @@ describe('Save Log and Filter', ()=>{
|
||||
cy.wait(3000)
|
||||
|
||||
cy.get('#backPage').click();
|
||||
cy.contains('.swal2-title', 'LEAVE MAP');
|
||||
cy.contains('button', 'OK').click();
|
||||
cy.contains('.swal2-title', 'SAVE YOUR FILTER');
|
||||
cy.contains('button', 'No').click();
|
||||
cy.url().should('include', 'files');
|
||||
})
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user