From 4acdcb2e7724f8c222f9884ac0f6927148ff2cb6 Mon Sep 17 00:00:00 2001 From: Jay Date: Fri, 20 Oct 2023 12:03:14 +0530 Subject: [PATCH] add cypress test for list component --- src/components/List/List.test.js | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/src/components/List/List.test.js b/src/components/List/List.test.js index 9e9fbb93..1eb2e9ae 100644 --- a/src/components/List/List.test.js +++ b/src/components/List/List.test.js @@ -1,7 +1,28 @@ +import React from 'react'; import List from './index'; describe('List', () => { - it('TODO', () => { - expect(true).to.equal(true); + it('test list is rendered with items in primary theme', () => { + cy.mount( + + Alpha + Bravo + Charlie + Delta + + ) + + cy.get('.tyk-list__wrapper') + .get('ul') + .should('have.class', 'tyk-list') + + cy.contains("LABEL").should('exist'); + cy.contains("Alpha").should('exist'); + cy.contains("Bravo").should('exist'); + cy.contains("Charlie").should('exist'); + cy.contains("Delta").should('exist'); }); -}); +}); \ No newline at end of file