From 025963b2d03c522ca28cab8ff2bc7f770a01ca8c Mon Sep 17 00:00:00 2001 From: Walmyr Date: Sat, 22 Jun 2024 19:11:24 +0200 Subject: [PATCH] Update the app with a new skill level (DevOps) And update a test according to the app change. --- cypress/e2e/checklist.cy.js | 4 ++-- src/script.js | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cypress/e2e/checklist.cy.js b/cypress/e2e/checklist.cy.js index 74fa994..25bd6f1 100644 --- a/cypress/e2e/checklist.cy.js +++ b/cypress/e2e/checklist.cy.js @@ -17,10 +17,10 @@ describe('Cypress Skills Checklist', () => { cy.contains('footer', '0%').should('not.exist') }) - it('checking all checkboxes leads to 100% completion and advanced - Sr. level', () => { + it('checking all checkboxes leads to 100% completion and DevOps level', () => { cy.get('input[type="checkbox"]').check() - cy.contains('footer', '(100%) - Nível de habilidade: Avançado (Sr.)').should('be.visible') + cy.contains('footer', '(100%) - Nível de habilidade: DevOps').should('be.visible') }) }) diff --git a/src/script.js b/src/script.js index 821bc74..340f949 100644 --- a/src/script.js +++ b/src/script.js @@ -17,8 +17,10 @@ document.addEventListener('DOMContentLoaded', () => { skillLevelElement.textContent = 'Iniciante (Jr.)' } else if (percentage >= 50 && percentage < 75) { skillLevelElement.textContent = 'Intermediário (Pleno)' - } else { + } else if (percentage >= 75 && percentage < 95) { skillLevelElement.textContent = 'Avançado (Sr.)' + } else { + skillLevelElement.textContent = 'DevOps' } }