clear logs, added logger, replace cebab to camelcase

This commit is contained in:
2024-04-02 12:32:17 +03:00
parent 28c13c00ec
commit 2b2ad786b2
28 changed files with 145 additions and 184 deletions

View File

@@ -70,7 +70,6 @@ describe("tests EditServiceCard component", () => {
const selectedService = store.getters['services/selectedService']
const wrapper = mount(EditServiceCard, {
// shallow: true,
global: {
plugins: [store]
},

View File

@@ -42,16 +42,16 @@ describe("tests Service Card component", () => {
const resServices = [
{
"id": 1,
"created_at": "2024-03-06T17:31:31.948355541+03:00",
"updated_at": "2024-03-06T17:31:31.948355541+03:00",
"deleted_at": null,
"createdAt": "2024-03-06T17:31:31.948355541+03:00",
"updatedAt": "2024-03-06T17:31:31.948355541+03:00",
"deletedAt": null,
"name": "jsonplaceholder.typicode.com",
"port": 9965,
"proxy_ip": "172.25.78.153",
"device_ip": "https://jsonplaceholder.typicode.com/",
"internet_uri": "localhost",
"proxyIp": "172.25.78.153",
"deviceIp": "https://jsonplaceholder.typicode.com/",
"internetUri": "localhost",
"description": "localhost",
"is_online": true
"isOnline": true
},
]
@@ -75,7 +75,6 @@ describe("tests Service Card component", () => {
test('Service Card mounted with vuex', async () => {
const wrapper = mount(ServiceCard, {
// shallow: true,
global: {
plugins: [store]
},
@@ -85,8 +84,6 @@ describe("tests Service Card component", () => {
},
})
// console.log('wrapper.html', wrapper.html())
await serviceOfServices.fetchServices()
store.commit('services/setServicesState', 'active')
@@ -177,8 +174,6 @@ describe("tests Service Card component", () => {
},
})
// console.log('wrapper.html', wrapper.html())
await wrapper.get('[test-id="canelButton"]').trigger('click')
expect(wrapper.html()).not.toContain('Отменить')
@@ -202,8 +197,6 @@ describe("tests Service Card component", () => {
},
})
// console.log('wrapper.html', wrapper.vm.status)
const defaultStatus = wrapper.vm.status
expect(defaultStatus.title).toContain('disable')
@@ -281,19 +274,14 @@ describe("tests Service Card component", () => {
},
})
// console.log('wrapper.html', wrapper.html())
const defaultIsDelete = wrapper.vm.isDelete
expect(defaultIsDelete).toBe(false)
await wrapper.get('.ri-close-line').trigger('click') // Рендер отрисовывает только с помощью триггером
// wrapper.vm.deleteService(true)
const updatedIsDelete = wrapper.vm.isDelete
// console.log('wrapper.html', wrapper.html())
expect(updatedIsDelete).toBe(true)
expect(wrapper.html()).toContain('Отменить')

View File

@@ -69,42 +69,42 @@ describe("tests Services List component", () => {
const resServices = [
{
"id": 1,
"created_at": "2024-03-06T17:31:31.948355541+03:00",
"updated_at": "2024-03-06T17:31:31.948355541+03:00",
"deleted_at": null,
"createdAt": "2024-03-06T17:31:31.948355541+03:00",
"updatedAt": "2024-03-06T17:31:31.948355541+03:00",
"deletedAt": null,
"name": "jsonplaceholder.typicode.com",
"port": 9965,
"proxy_ip": "172.25.78.153",
"device_ip": "https://jsonplaceholder.typicode.com/",
"internet_uri": "localhost",
"proxyIp": "172.25.78.153",
"deviceIp": "https://jsonplaceholder.typicode.com/",
"internetUri": "localhost",
"description": "localhost",
"is_online": true
"isOnline": true
},
{
"id": 2,
"created_at": "2024-03-07T11:43:51.026265459+03:00",
"updated_at": "2024-03-07T13:35:12.506368972+03:00",
"deleted_at": null,
"createdAt": "2024-03-07T11:43:51.026265459+03:00",
"updatedAt": "2024-03-07T13:35:12.506368972+03:00",
"deletedAt": null,
"name": "new 2",
"port": 4548,
"proxy_ip": "172.25.78.151",
"device_ip": "172.25.78.151",
"internet_uri": "",
"proxyIp": "172.25.78.151",
"deviceIp": "172.25.78.151",
"internetUri": "",
"description": "new site 2",
"is_online": true
"isOnline": true
},
{
"id": 3,
"created_at": "2024-03-07T11:43:51.027148541+03:00",
"updated_at": "2024-03-07T13:35:24.919273428+03:00",
"deleted_at": null,
"createdAt": "2024-03-07T11:43:51.027148541+03:00",
"updatedAt": "2024-03-07T13:35:24.919273428+03:00",
"deletedAt": null,
"name": "new 3",
"port": 2527,
"proxy_ip": "172.25.78.151",
"device_ip": "172.25.78.151",
"internet_uri": "",
"proxyIp": "172.25.78.151",
"deviceIp": "172.25.78.151",
"internetUri": "",
"description": "new site 3...",
"is_online": true
"isOnline": true
}
]
@@ -123,7 +123,6 @@ describe("tests Services List component", () => {
test('Services List mounted with vuex', async () => {
const wrapper = mount(ServicesList, {
// shallow: true,
global: {
plugins: [store]
},
@@ -137,8 +136,6 @@ describe("tests Services List component", () => {
},
})
// console.log('wrapper.vm', wrapper.vm)
await serviceOfServices.fetchServices()
const uploadServices = store.getters['services/services']

View File

@@ -20,7 +20,6 @@ const users = {
state.notIncludedSiteUsersList = []
},
saveUsersOffSite({commit}, users) {
console.log(users)
commit('setUsersOffSite', users)
}
},

View File

@@ -285,7 +285,7 @@ describe("tests UserEditor component", () => {
})
// await wrapper.setData({ showNewPassword: true })
// console.log('passwordField', passwordField.attributes().type)
// expect(passwordField.attributes().type).toBe(true)
wrapper.vm.togglePass()