From 88de9cfa533ed9fe8404353e9db31b2dc0979163 Mon Sep 17 00:00:00 2001 From: chiayin Date: Wed, 7 Feb 2024 11:41:00 +0800 Subject: [PATCH] test: Performance Enter Rule done. --- cypress/e2e/performance.cy.js | 76 +++++++++++++++++------------------ 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/cypress/e2e/performance.cy.js b/cypress/e2e/performance.cy.js index c3acf87..3ca3047 100644 --- a/cypress/e2e/performance.cy.js +++ b/cypress/e2e/performance.cy.js @@ -5,49 +5,15 @@ describe('Performance', ()=>{ cy.visit('https://REDACTED-HOST/files'); }); // Anchor - 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', () => { + // it('Enter Log', () => { // // enter Map // cy.url().should('include', 'files'); // cy.get('table tr') - // .filter(':contains("Rule")') - // .first() + // .filter(':contains("Log")') + // .first() // 選擇集合中第一個元素 // .dblclick(); // cy.contains('h2', 'DISCOVER'); - // cy.url().should('include', 'conformance'); + // cy.url().should('include', 'discover/map/log'); // cy.wait(2000); // // enter Performance // cy.contains('li', 'PERFORMANCE').click(); @@ -55,4 +21,38 @@ describe('Performance', ()=>{ // // 斷言頁面中有八個 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); + }); })