v2
11/16/2021 by flacodev -00
Setup HTML - click to add setup HTML
Setup JS - click to add setup JavaScript
delete caserun single casemove downdrag and drop case


ready



const routing = {};
function createDiv (entry) {
  const div = document.createElement('div')
  div.classList.add('exchange')
  div.id = entry.exchange
  const img = document.createElement('img')
  img.src = `/static/img/${entry.img}.png`
  img.alt = entry.name
  img.classList.add('logo-image')
  div.appendChild(img)
  const link = document.createElement('a')
  link.href = entry.url
  link.classList.add('name')
  link.innerText = entry.name
  div.appendChild(link)
  const routing = document.createElement('span')
  routing.innerText = entry.routing ? entry.routing : ''
  div.appendChild(routing)
  const price = document.createElement('span')
  price.innerText = entry.price
  price.classList.add('price')
  div.appendChild(price)
  return div
}


for(let i = 0, len = 100; i < len; i++) {
	const entry = {
		price: 10,
		img: 'happy',
		name: 'happy',
		routing: 'yes',
	    url: 'happy' + i,
	    exchange: '€'	
	}
	const div = createDiv(entry);
}
delete caserun single casemove updrag and drop case


ready



let routing = {}
const createDiv = ({ exchange, img, name, url, routing: entryRouting, price }) => {      
  return `
  <div class="exchange" id="${exchange}">
    <img class="logo-image" src="/static/img/${img}.png" alt="${name}">
    <a class="exchange-name" href="${url}">${name}</a>
    <span>${routing.innerText = entryRouting || ''}</span>
    <span class="price">${price}</span>
   </div>
  `;
}

for(let i = 0, len = 100; i < len; i++) {
	const entry = {
		price: 10,
		img: 'happy',
		name: 'happy',
		routing: 'yes',
	    url: 'happy' + i,
	    exchange: '€'	
	}
	const div = createDiv(entry);
}
Test Case - click to add another test case
Teardown JS - click to add teardown JavaScript
Output (DOM) - click to monitor output (DOM) while test is running
RUN