All rights reserved. 19 Testing Rocket https://kentcdodds.com/blog/write-tests https://madewithvuejs.com/blog/how-to-learn-vue-js-testing-the-ultimate-guide
All rights reserved. 26 Project structure Split by Feature or Domain Nuxt app User domain Product domain Catalog domain extends pages components config
All rights reserved. 39 Component Testing Vue External System CRUD Component A Component B Mock https://vuejs.org/guide/scaling-up/testing#component-testing
All rights reserved. 46 Bad test !! import { test, expect } from '@playwright/test'; test('add item to list', async ({ page }) => { await page.goto('http://localhost:5173'); await page.fill('#title', '2x4 DIPA Melvin'); await page.click('#add-button'); const item = page.locator('.item:nth-child(1)'); await expect(item).toBeVisible(); }); Coupling from test framework and User interface
All rights reserved. 50 Better test import { test } from '../../drivers/virtual/driver'; test("add item to list", async ({ driver }) => { await driver.goTo("/"); await driver.findByTestId("title").type("2x4 DIPA Melvin"); await driver.findByTestId("add-button").click(); await driver .findByText("2x4 DIPA Melvin", { withinTestId: "active items" }) .shouldBeVisible(); }); Decoupling from test framework and User interface
All rights reserved. 51 3 levels of UI test automation https://gojko.net/2010/04/13/how-to-implement-ui-testing-without-shooting-yourself-in-the-foot-2/
All rights reserved. 55 Component Testing Vue External System CRUD Component A Component B Mock https://vuejs.org/guide/scaling-up/testing#component-testing
All rights reserved. 56 Vue app Component Testing Mock Mock Service Worker Testing framework library https://testing-library.com/docs/vue-testing-library/intro Vue Test Utils https://github.com/vuejs/test-utils