Tell us about E2E testing with Playwright: how was the testing system organized, how was it launched, how did you interact with the backend, and how did you ensure reproducibility of test data?
Frontend
Write a function to calculate the median of an array of numbers.
Review of role assignment to a Vue 2 user ```javascript export default { data() { return { user: { name: 'Ivan' } }; }, methods: { setRole(role) { this.user.role = role; } } } ```
There is an array of 200 ids. You need to make a request to /api/users/:id for each. Write a function that performs the requests, but no more than N simultaneously, and returns the results in the order of the input array.
Review of Nuxt 2 device detection mixin ```javascript export default { data() { return { isMobile: window.innerWidth < 768 } } } ```
What interesting cases or non-standard situations have you encountered while working with Playwright?
How can you cache pages/responses in a Nuxt application to reduce load? Have you worked with Redis or Nitro caching?
What could be the reasons for a long white screen during SSR (Nuxt)? How to diagnose and solve the problem of high Time to First Byte?
Tell me about the transition from Vue 2 to Vue 3: what has changed (VueX to Pinia, Options API to Composition API, Vue.extend to defineComponent, new Vue to createApp, etc.)?
Tell me about optimizing page performance in Nuxt: what challenges have you faced, what problems have you solved, and how did you do it?
async function loadUsers(ids) { const users = [] ids.forEach(async id => { const res = await fetch(`/api/users/${id}`) const user = await res.json() users.push(user) }) return users } Identify the problem with this code and suggest how to fix it.
function debounce(fn, delay) { let timer return function (...args) { clearTimeout(timer) timer = setTimeout(() => fn(args), delay) } }
Nuxt mixin review 2 - resize listener ```javascript export default { data() { return { width: 0 } }, mounted() { window.addEventListener('resize', this.onResize) this.onResize() }, methods: { onResize() { this.width = window.innerWidth } } } ```
Tell me about the build tool when migrating from Vue 2 to Vue 3: it was Webpack (Vue CLI), now it's Vite. Were there any interesting corner cases, configuration conflicts, or things you had to rewrite?