From 55188faa03f79068f759e428aca5f8270f9755a3 Mon Sep 17 00:00:00 2001 From: nithyamani Date: Tue, 17 May 2022 14:01:58 +0530 Subject: [PATCH 01/23] changed website css --- resources/style.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/style.css b/resources/style.css index 80ffd9f..aaae29d 100644 --- a/resources/style.css +++ b/resources/style.css @@ -1,5 +1,5 @@ body{ - background: #2274a5; + background: #5CA4A9; background-size:cover; } .paragraph{ @@ -20,7 +20,7 @@ body{ .fixed-header{ width: 100%; position: fixed; - background: #EADEDA; + background: #ffe8e1; padding: 10px 0; color: #333; } @@ -62,7 +62,7 @@ nav a{ } p{ padding-bottom: 15px; - color: #e6af2e; + color: #ed6a5a; } .form-control{ padding: 20px; From 26fd7639b43ead1f0ab5a3663b5b08c855a1c819 Mon Sep 17 00:00:00 2001 From: nithyamani Date: Tue, 17 May 2022 14:24:41 +0530 Subject: [PATCH 02/23] changed percy command in package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9fb92c1..039cd92 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "bstack-local-parallel-browsers": "browserstack-cypress --config-file run_conf/bstack-local-parallel.json run --sync --parallels", "bstack-parallel": "browserstack-cypress --config-file run_conf/bstack-single.json run --sync --parallels", "bstack-parallel-browsers": "browserstack-cypress --config-file run_conf/bstack-parallel.json run --sync --parallels", - "percy-test": "npx percy exec -- npm run cypress:run 'cypress/integration/e2e/sample-percy.spec.ts'" + "percy-test": "npm run cypress:run 'cypress/integration/e2e/sample-percy.spec.ts'" }, "devDependencies": { "@cypress/webpack-preprocessor": "~5.11.1", From 1fceb941bc55e9fe7c1a2bfbe9be6ad16c3687b4 Mon Sep 17 00:00:00 2001 From: nithyamani Date: Tue, 17 May 2022 14:57:10 +0530 Subject: [PATCH 03/23] added github actions --- .github/workflows/github-actions-demo.yml | 10 ++++++++++ .percy.yml | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/github-actions-demo.yml diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml new file mode 100644 index 0000000..722d88d --- /dev/null +++ b/.github/workflows/github-actions-demo.yml @@ -0,0 +1,10 @@ +name: GitHub Actions Demo +on: [push] +jobs: + Explore-GitHub-Actions: + runs-on: ubuntu-latest + steps: + - name: Install dependencies + run: npm install + - name: Run test + run: npx percy exec -- npm run percy-test \ No newline at end of file diff --git a/.percy.yml b/.percy.yml index 16e7249..936354a 100644 --- a/.percy.yml +++ b/.percy.yml @@ -5,7 +5,7 @@ snapshot: - 768 - 1280 minHeight: 1024 - percyCSS: "" + #percyCSS: ".change-font{display: none;} .fixed-header{display: none;}" discovery: allowedHostnames: [] disallowedHostnames: [] From 37e9aa9052b3a6b940d9bc4bfa7861f7d0679d54 Mon Sep 17 00:00:00 2001 From: nithyamani Date: Tue, 17 May 2022 15:05:06 +0530 Subject: [PATCH 04/23] edited github yml --- .github/workflows/github-actions-demo.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index 722d88d..dbdc61c 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -4,7 +4,11 @@ jobs: Explore-GitHub-Actions: runs-on: ubuntu-latest steps: - - name: Install dependencies + - name: 'Checkout the repository' + uses: actions/checkout@v2 + + - name: 'Install dependencies' run: npm install - - name: Run test + + - name: 'Run test' run: npx percy exec -- npm run percy-test \ No newline at end of file From fd11c734010e0c5e8aa253ef7a5094f6472b27fb Mon Sep 17 00:00:00 2001 From: nithyamani Date: Tue, 17 May 2022 15:09:56 +0530 Subject: [PATCH 05/23] starting localhost server in yml --- .github/workflows/github-actions-demo.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index dbdc61c..3381acf 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -8,7 +8,10 @@ jobs: uses: actions/checkout@v2 - name: 'Install dependencies' - run: npm install + run: npm install + - name: 'Start localhost server' + run: cd resources && python3 -m http.server 3000 & + - name: 'Run test' run: npx percy exec -- npm run percy-test \ No newline at end of file From d41611968c2225d30ed0c7672a5fc38205e53e90 Mon Sep 17 00:00:00 2001 From: nithyamani Date: Tue, 17 May 2022 15:16:23 +0530 Subject: [PATCH 06/23] added token in yml --- .github/workflows/github-actions-demo.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index 3381acf..a83963b 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -1,5 +1,8 @@ name: GitHub Actions Demo on: [push] +env: + PERCY_TOKEN: 912886eb00740a8dd9e5164d50453e9033294e9600cc473ed7e55ee3f9ff8e2e + jobs: Explore-GitHub-Actions: runs-on: ubuntu-latest @@ -12,6 +15,6 @@ jobs: - name: 'Start localhost server' run: cd resources && python3 -m http.server 3000 & - + - name: 'Run test' run: npx percy exec -- npm run percy-test \ No newline at end of file From 30588387112b52d68b404e27d6984ed19a945065 Mon Sep 17 00:00:00 2001 From: nithyamani Date: Tue, 17 May 2022 15:21:18 +0530 Subject: [PATCH 07/23] removed token from yml --- .github/workflows/github-actions-demo.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index a83963b..eed6ae1 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -1,7 +1,5 @@ name: GitHub Actions Demo on: [push] -env: - PERCY_TOKEN: 912886eb00740a8dd9e5164d50453e9033294e9600cc473ed7e55ee3f9ff8e2e jobs: Explore-GitHub-Actions: From ac7f498f20c9fbf3d7b5f0ec5c2b0fd8efbaf79c Mon Sep 17 00:00:00 2001 From: nithyamani Date: Tue, 17 May 2022 15:23:17 +0530 Subject: [PATCH 08/23] printing token value from secret --- .github/workflows/github-actions-demo.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index eed6ae1..16a139e 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -8,6 +8,9 @@ jobs: - name: 'Checkout the repository' uses: actions/checkout@v2 + - name: 'Print token value' + run: echo ${{ secrets.PERCY_TOKEN }} + - name: 'Install dependencies' run: npm install From 80bb454255775d24fe84f4dfa2f45fd6738c523d Mon Sep 17 00:00:00 2001 From: nithyamani Date: Tue, 17 May 2022 15:27:12 +0530 Subject: [PATCH 09/23] fetching token value from secret --- .github/workflows/github-actions-demo.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index 16a139e..992114e 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -1,6 +1,7 @@ name: GitHub Actions Demo on: [push] - +env: + PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }} jobs: Explore-GitHub-Actions: runs-on: ubuntu-latest @@ -8,9 +9,6 @@ jobs: - name: 'Checkout the repository' uses: actions/checkout@v2 - - name: 'Print token value' - run: echo ${{ secrets.PERCY_TOKEN }} - - name: 'Install dependencies' run: npm install From d9414ec74956882014bac497de98cd40a30c998d Mon Sep 17 00:00:00 2001 From: nithyamani Date: Tue, 17 May 2022 15:34:30 +0530 Subject: [PATCH 10/23] changed backgrund color --- resources/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/style.css b/resources/style.css index aaae29d..58628ba 100644 --- a/resources/style.css +++ b/resources/style.css @@ -1,5 +1,5 @@ body{ - background: #5CA4A9; + background: #024f93; background-size:cover; } .paragraph{ From 0ccf798934bcf2b68082ef36422925fdd133c048 Mon Sep 17 00:00:00 2001 From: nithyamani Date: Wed, 25 May 2022 14:38:57 +0530 Subject: [PATCH 11/23] changed background color --- resources/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/style.css b/resources/style.css index 58628ba..95834f2 100644 --- a/resources/style.css +++ b/resources/style.css @@ -1,5 +1,5 @@ body{ - background: #024f93; + background: #171738; background-size:cover; } .paragraph{ From 5bbfa773f4c5d44f182ea6dfd1b4e76a24bb74a5 Mon Sep 17 00:00:00 2001 From: nithyamani Date: Wed, 25 May 2022 14:41:54 +0530 Subject: [PATCH 12/23] corrected yml --- .github/workflows/github-actions-demo.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index 7d5c25e..f679e2e 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -12,10 +12,8 @@ jobs: - name: 'Install dependencies' run: npm install - uses: actions/checkout@v3 - - name: 'Install dependencies' - run: npm install --force + run: npm install - name: 'Start localhost server' run: cd resources && python3 -m http.server 3000 & From 8c5465b18b6fa5d8f6904e208d6bedfe39c509b4 Mon Sep 17 00:00:00 2001 From: nithyamani Date: Wed, 25 May 2022 14:42:31 +0530 Subject: [PATCH 13/23] corrected yml --- .github/workflows/github-actions-demo.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index f679e2e..d44402c 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -13,7 +13,7 @@ jobs: run: npm install - name: 'Install dependencies' - run: npm install + run: npm install --force - name: 'Start localhost server' run: cd resources && python3 -m http.server 3000 & From 87495555c8259e8e7e91588cc29265ca3bdce130 Mon Sep 17 00:00:00 2001 From: nithyamani Date: Wed, 25 May 2022 14:43:21 +0530 Subject: [PATCH 14/23] corrected yml --- .github/workflows/github-actions-demo.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index d44402c..fd364cd 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -8,10 +8,7 @@ jobs: steps: - name: 'Checkout the repository' uses: actions/checkout@v2 - - - name: 'Install dependencies' - run: npm install - + - name: 'Install dependencies' run: npm install --force From bd22f9306bb398970a2938ec0fa7ef2e62dcfda8 Mon Sep 17 00:00:00 2001 From: nithyamani Date: Fri, 5 Aug 2022 13:15:10 +0530 Subject: [PATCH 15/23] updated percy cli version --- .percy.yml | 7 +- cypress.json | 3 + cypress/integration/cypress.json | 1 + .../integration/cypress/fixtures/example.json | 5 + .../1-getting-started/todo.spec.js | 143 +++++++++ .../2-advanced-examples/actions.spec.js | 299 ++++++++++++++++++ .../2-advanced-examples/aliasing.spec.js | 39 +++ .../2-advanced-examples/assertions.spec.js | 176 +++++++++++ .../2-advanced-examples/connectors.spec.js | 97 ++++++ .../2-advanced-examples/cookies.spec.js | 77 +++++ .../2-advanced-examples/cypress_api.spec.js | 200 ++++++++++++ .../2-advanced-examples/files.spec.js | 87 +++++ .../2-advanced-examples/local_storage.spec.js | 52 +++ .../2-advanced-examples/location.spec.js | 32 ++ .../2-advanced-examples/misc.spec.js | 104 ++++++ .../2-advanced-examples/navigation.spec.js | 56 ++++ .../network_requests.spec.js | 163 ++++++++++ .../2-advanced-examples/querying.spec.js | 114 +++++++ .../spies_stubs_clocks.spec.js | 203 ++++++++++++ .../2-advanced-examples/traversal.spec.js | 121 +++++++ .../2-advanced-examples/utilities.spec.js | 108 +++++++ .../2-advanced-examples/viewport.spec.js | 59 ++++ .../2-advanced-examples/waiting.spec.js | 31 ++ .../2-advanced-examples/window.spec.js | 22 ++ cypress/integration/cypress/plugins/index.js | 22 ++ .../integration/cypress/support/commands.js | 25 ++ cypress/integration/cypress/support/index.js | 20 ++ cypress/integration/e2e/cypress.json | 1 + .../e2e/cypress/fixtures/example.json | 5 + .../1-getting-started/todo.spec.js | 143 +++++++++ .../2-advanced-examples/actions.spec.js | 299 ++++++++++++++++++ .../2-advanced-examples/aliasing.spec.js | 39 +++ .../2-advanced-examples/assertions.spec.js | 176 +++++++++++ .../2-advanced-examples/connectors.spec.js | 97 ++++++ .../2-advanced-examples/cookies.spec.js | 77 +++++ .../2-advanced-examples/cypress_api.spec.js | 200 ++++++++++++ .../2-advanced-examples/files.spec.js | 87 +++++ .../2-advanced-examples/local_storage.spec.js | 52 +++ .../2-advanced-examples/location.spec.js | 32 ++ .../2-advanced-examples/misc.spec.js | 104 ++++++ .../2-advanced-examples/navigation.spec.js | 56 ++++ .../network_requests.spec.js | 163 ++++++++++ .../2-advanced-examples/querying.spec.js | 114 +++++++ .../spies_stubs_clocks.spec.js | 203 ++++++++++++ .../2-advanced-examples/traversal.spec.js | 121 +++++++ .../2-advanced-examples/utilities.spec.js | 108 +++++++ .../2-advanced-examples/viewport.spec.js | 59 ++++ .../2-advanced-examples/waiting.spec.js | 31 ++ .../2-advanced-examples/window.spec.js | 22 ++ .../integration/e2e/cypress/plugins/index.js | 22 ++ .../e2e/cypress/support/commands.js | 25 ++ .../integration/e2e/cypress/support/index.js | 20 ++ cypress/integration/e2e/end_to_end.spec.ts | 6 +- cypress/integration/e2e/sample-percy.spec.ts | 17 +- package.json | 9 +- run_conf/bstack-single.json | 7 +- 56 files changed, 4542 insertions(+), 19 deletions(-) create mode 100644 cypress/integration/cypress.json create mode 100644 cypress/integration/cypress/fixtures/example.json create mode 100644 cypress/integration/cypress/integration/1-getting-started/todo.spec.js create mode 100644 cypress/integration/cypress/integration/2-advanced-examples/actions.spec.js create mode 100644 cypress/integration/cypress/integration/2-advanced-examples/aliasing.spec.js create mode 100644 cypress/integration/cypress/integration/2-advanced-examples/assertions.spec.js create mode 100644 cypress/integration/cypress/integration/2-advanced-examples/connectors.spec.js create mode 100644 cypress/integration/cypress/integration/2-advanced-examples/cookies.spec.js create mode 100644 cypress/integration/cypress/integration/2-advanced-examples/cypress_api.spec.js create mode 100644 cypress/integration/cypress/integration/2-advanced-examples/files.spec.js create mode 100644 cypress/integration/cypress/integration/2-advanced-examples/local_storage.spec.js create mode 100644 cypress/integration/cypress/integration/2-advanced-examples/location.spec.js create mode 100644 cypress/integration/cypress/integration/2-advanced-examples/misc.spec.js create mode 100644 cypress/integration/cypress/integration/2-advanced-examples/navigation.spec.js create mode 100644 cypress/integration/cypress/integration/2-advanced-examples/network_requests.spec.js create mode 100644 cypress/integration/cypress/integration/2-advanced-examples/querying.spec.js create mode 100644 cypress/integration/cypress/integration/2-advanced-examples/spies_stubs_clocks.spec.js create mode 100644 cypress/integration/cypress/integration/2-advanced-examples/traversal.spec.js create mode 100644 cypress/integration/cypress/integration/2-advanced-examples/utilities.spec.js create mode 100644 cypress/integration/cypress/integration/2-advanced-examples/viewport.spec.js create mode 100644 cypress/integration/cypress/integration/2-advanced-examples/waiting.spec.js create mode 100644 cypress/integration/cypress/integration/2-advanced-examples/window.spec.js create mode 100644 cypress/integration/cypress/plugins/index.js create mode 100644 cypress/integration/cypress/support/commands.js create mode 100644 cypress/integration/cypress/support/index.js create mode 100644 cypress/integration/e2e/cypress.json create mode 100644 cypress/integration/e2e/cypress/fixtures/example.json create mode 100644 cypress/integration/e2e/cypress/integration/1-getting-started/todo.spec.js create mode 100644 cypress/integration/e2e/cypress/integration/2-advanced-examples/actions.spec.js create mode 100644 cypress/integration/e2e/cypress/integration/2-advanced-examples/aliasing.spec.js create mode 100644 cypress/integration/e2e/cypress/integration/2-advanced-examples/assertions.spec.js create mode 100644 cypress/integration/e2e/cypress/integration/2-advanced-examples/connectors.spec.js create mode 100644 cypress/integration/e2e/cypress/integration/2-advanced-examples/cookies.spec.js create mode 100644 cypress/integration/e2e/cypress/integration/2-advanced-examples/cypress_api.spec.js create mode 100644 cypress/integration/e2e/cypress/integration/2-advanced-examples/files.spec.js create mode 100644 cypress/integration/e2e/cypress/integration/2-advanced-examples/local_storage.spec.js create mode 100644 cypress/integration/e2e/cypress/integration/2-advanced-examples/location.spec.js create mode 100644 cypress/integration/e2e/cypress/integration/2-advanced-examples/misc.spec.js create mode 100644 cypress/integration/e2e/cypress/integration/2-advanced-examples/navigation.spec.js create mode 100644 cypress/integration/e2e/cypress/integration/2-advanced-examples/network_requests.spec.js create mode 100644 cypress/integration/e2e/cypress/integration/2-advanced-examples/querying.spec.js create mode 100644 cypress/integration/e2e/cypress/integration/2-advanced-examples/spies_stubs_clocks.spec.js create mode 100644 cypress/integration/e2e/cypress/integration/2-advanced-examples/traversal.spec.js create mode 100644 cypress/integration/e2e/cypress/integration/2-advanced-examples/utilities.spec.js create mode 100644 cypress/integration/e2e/cypress/integration/2-advanced-examples/viewport.spec.js create mode 100644 cypress/integration/e2e/cypress/integration/2-advanced-examples/waiting.spec.js create mode 100644 cypress/integration/e2e/cypress/integration/2-advanced-examples/window.spec.js create mode 100644 cypress/integration/e2e/cypress/plugins/index.js create mode 100644 cypress/integration/e2e/cypress/support/commands.js create mode 100644 cypress/integration/e2e/cypress/support/index.js diff --git a/.percy.yml b/.percy.yml index 936354a..c7c169c 100644 --- a/.percy.yml +++ b/.percy.yml @@ -7,9 +7,12 @@ snapshot: minHeight: 1024 #percyCSS: ".change-font{display: none;} .fixed-header{display: none;}" discovery: - allowedHostnames: [] + allowedHostnames: ["*.devs.rnd.live.backbaseservices.com", "ui-ang-showcase-app.devs.rnd.live.backbaseservices.com"] disallowedHostnames: [] - networkIdleTimeout: 100 + networkIdleTimeout: 750 + launch-options: + headless: false + disableCache: false upload: files: "**/*.{png,jpg,jpeg}" ignore: "" diff --git a/cypress.json b/cypress.json index fb8d783..878d478 100644 --- a/cypress.json +++ b/cypress.json @@ -20,6 +20,9 @@ "json":false, "timestamp" : "mm/dd/yyyy_HH:MM:ss" }, + "env": { + "SAMPLE_ENV": "demouser" + }, "component": { "componentFolder": "src", "testFiles": "**/*spec.{js,jsx,ts,tsx}" diff --git a/cypress/integration/cypress.json b/cypress/integration/cypress.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/cypress/integration/cypress.json @@ -0,0 +1 @@ +{} diff --git a/cypress/integration/cypress/fixtures/example.json b/cypress/integration/cypress/fixtures/example.json new file mode 100644 index 0000000..02e4254 --- /dev/null +++ b/cypress/integration/cypress/fixtures/example.json @@ -0,0 +1,5 @@ +{ + "name": "Using fixtures to represent data", + "email": "hello@cypress.io", + "body": "Fixtures are a great way to mock data for responses to routes" +} diff --git a/cypress/integration/cypress/integration/1-getting-started/todo.spec.js b/cypress/integration/cypress/integration/1-getting-started/todo.spec.js new file mode 100644 index 0000000..4768ff9 --- /dev/null +++ b/cypress/integration/cypress/integration/1-getting-started/todo.spec.js @@ -0,0 +1,143 @@ +/// + +// Welcome to Cypress! +// +// This spec file contains a variety of sample tests +// for a todo list app that are designed to demonstrate +// the power of writing tests in Cypress. +// +// To learn more about how Cypress works and +// what makes it such an awesome testing tool, +// please read our getting started guide: +// https://on.cypress.io/introduction-to-cypress + +describe('example to-do app', () => { + beforeEach(() => { + // Cypress starts out with a blank slate for each test + // so we must tell it to visit our website with the `cy.visit()` command. + // Since we want to visit the same URL at the start of all our tests, + // we include it in our beforeEach function so that it runs before each test + cy.visit('https://example.cypress.io/todo') + }) + + it('displays two todo items by default', () => { + // We use the `cy.get()` command to get all elements that match the selector. + // Then, we use `should` to assert that there are two matched items, + // which are the two default items. + cy.get('.todo-list li').should('have.length', 2) + + // We can go even further and check that the default todos each contain + // the correct text. We use the `first` and `last` functions + // to get just the first and last matched elements individually, + // and then perform an assertion with `should`. + cy.get('.todo-list li').first().should('have.text', 'Pay electric bill') + cy.get('.todo-list li').last().should('have.text', 'Walk the dog') + }) + + it('can add new todo items', () => { + // We'll store our item text in a variable so we can reuse it + const newItem = 'Feed the cat' + + // Let's get the input element and use the `type` command to + // input our new list item. After typing the content of our item, + // we need to type the enter key as well in order to submit the input. + // This input has a data-test attribute so we'll use that to select the + // element in accordance with best practices: + // https://on.cypress.io/selecting-elements + cy.get('[data-test=new-todo]').type(`${newItem}{enter}`) + + // Now that we've typed our new item, let's check that it actually was added to the list. + // Since it's the newest item, it should exist as the last element in the list. + // In addition, with the two default items, we should have a total of 3 elements in the list. + // Since assertions yield the element that was asserted on, + // we can chain both of these assertions together into a single statement. + cy.get('.todo-list li') + .should('have.length', 3) + .last() + .should('have.text', newItem) + }) + + it('can check off an item as completed', () => { + // In addition to using the `get` command to get an element by selector, + // we can also use the `contains` command to get an element by its contents. + // However, this will yield the