arrow-left Back to topicQuizProjectsCheck yourself1.Your setup project creates a test user and saves auth state. The chromium and firefox projects both depend on it. The setup project's test fails. What happens to the chromium and firefox tests?Chromium and firefox tests run anyway using whatever auth state exists from a previous runChromium and firefox tests are skipped — Playwright won't run tests from a project if its dependency project failedChromium and firefox tests run but each test gets a fresh login instead of using the saved auth state2.What is a 'project' in the context of playwright.config.ts?A separate npm package that contains a subset of testsA named configuration block in the projects array that determines which tests run and with what browser/use settingsA GitHub Actions job that runs a subset of the test suiteA test file that exports a project configuration object3.What does spreading devices['Desktop Chrome'] into a project's use block do?It downloads the Chrome browser binary for that projectIt applies a preset of Chrome-specific settings: viewport size, user agent, default device scale factor, and browser channelIt restricts the project to only run on machines that have Chrome installedIt enables Chrome-specific APIs like the Chrome DevTools Protocol4.You want Chromium and Firefox projects to run tests from all files, but a third 'Mobile Safari' project should only run files matching **/*.mobile.spec.ts. How do you configure this?Add a testFilter array to the Mobile Safari project listing the allowed file patternsSet testMatch: '**/*.mobile.spec.ts' on the Mobile Safari project — it overrides the global testMatch for that project onlyAdd a @mobile tag to matching test files and run the Mobile Safari project with --grep @mobileMove all mobile tests into a separate testDir and point the Mobile Safari project's testDir to that folder5.A setting in the global use block conflicts with a setting in a specific project's use block. Which value wins?The global use block always wins — project-level settings are ignoredThe project-level use block wins — it overrides the global setting for that projectPlaywright merges both blocks using a deep merge — no setting wins, they combinePlaywright throws a configuration error when there is a conflict6.How do you configure a teardown project that cleans up test data after all tests finish?Add afterAll: 'cleanup' to the top-level playwright.config.ts objectAdd teardown: 'cleanup' to the setup project, and create a separate 'cleanup' project with testMatch pointing to teardown filesSet globalTeardown to a teardown file path in playwright.config.tsUse afterAll inside the test file and it will automatically run after the last test in the project7.You run npx playwright test --project=chromium. Which projects execute?Only the chromium project — dependency projects are skippedThe chromium project and any projects listed in its dependencies arrayAll projects run regardless of the --project flagOnly projects whose name starts with 'chromium'8.Which CLI command runs only the project named 'firefox' from a multi-project configuration?npx playwright test --browser=firefoxnpx playwright test --project=firefoxnpx playwright test --run=firefoxnpx playwright test --filter-project=firefoxSubmit answersarrow-left PreviousConfiguration (use)ReportersNext arrow-right