Skip to content
Snippets Groups Projects

Create modal for the logout button (1 point)

Merged Ina Martini requested to merge feat/26/create-modal-for-the-logout-button-1-points into dev
3 files
+ 55
15
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -10,13 +10,7 @@ describe('ModalComponent', () => {
@@ -10,13 +10,7 @@ describe('ModalComponent', () => {
props: {
props: {
title: 'Test Title',
title: 'Test Title',
message: 'Test Message',
message: 'Test Message',
button1: 'Test button',
isModalOpen: true
isModalOpen: true,
showButton: true,
showInput: false,
typeValue: 'text',
inputPlaceholder: 'Placeholder',
isInputValid: true
}
}
})
})
})
})
@@ -24,4 +18,20 @@ describe('ModalComponent', () => {
@@ -24,4 +18,20 @@ describe('ModalComponent', () => {
it('opens modal when button is clicked', async () => {
it('opens modal when button is clicked', async () => {
expect(wrapper.props().isModalOpen).toBe(true)
expect(wrapper.props().isModalOpen).toBe(true)
})
})
 
 
it('title should be: Test Title', () => {
 
expect(wrapper.find('.title').text()).toBe('Test Title')
 
})
 
 
it('title should not be: Wrong Title', () => {
 
expect(wrapper.find('.title').text()).not.toBe('Wrong Title')
 
})
 
 
it('message should be: Test Message', () => {
 
expect(wrapper.find('.message').text()).toBe('Test Message')
 
})
 
 
it('message should not be: Wrong Message', () => {
 
expect(wrapper.find('.message').text()).not.toBe('Wrong Message')
 
})
})
})
Loading