Based on Clean Code by Robert C. Martin (summarized). Use this as a checklist when proposing or reviewing code.
- Expressive naming
- Use intention-revealing, precise names (
elapsedMs, notd).
Vision Board Bliss is a web-based application that allows users to create, manage, and track personal goals through visual vision boards. The application combines goal management with achievement tracking and social sharing capabilities.
| test('XPath as syntax vs locator strategy', async ({ page }) => { | |
| await page.goto('https://example.com/app'); | |
| // ✅ Test ID strategy - using XPath syntax | |
| await page.locator('//button[@data-testid="submit-order"]').click(); | |
| // ✅ Test ID strategy - using CSS syntax | |
| await page.locator('[data-testid="submit-order"]').click(); | |
| // ✅ Accessibility strategy - using XPath syntax |
| // ❌ duplicate test name | |
| for (const user of testUsers) { | |
| test(`GET users`, async({request}) => { | |
| const response = await request.get(`https://jsonplaceholder.typicode.com/posts/${user.id}`) | |
| // assertions here | |
| }) | |
| } | |
| // ✅ each test within a describe block has a unique name | |
| for (const user of testUsers) { |
| // Data-driven test that runs once for each data entry | |
| test.describe('Login functionality', () => { | |
| test(`Login as ${user.username}`, async ({ page }) => { | |
| // Navigate to login page | |
| await page.goto('https://example.com/login'); | |
| // Fill the form | |
| //{ username: 'standardUser', password: 'secret1', expectedPage: '/dashboard' } | |
| //{ username: 'adminUser', password: 'admin123', expectedPage: '/admin' }, | |
| await page.fill('input[name="username"]', user.username); |
| (base) nikks-mbp:platform nikolay$ pnpm create wdio@latest . | |
| -:...........................-:. | |
| + + | |
| `` + `...` `...` + ` | |
| ./+/ + .:://:::` `::///::` ` + ++/. | |
| .+oo+ + /:+ooo+-/ /-+ooo+-/ ./ + +oo+. | |
| -ooo+ + /-+ooo+-/ /-+ooo+-/ .: + +ooo. | |
| -+o+ + `::///:-` `::///::` + +o+- | |
| ``. /. ````` ````` .: .`` |
| <AccordionEntry label="Error" variant="error"> | |
| <div className="whitespace-pre-wrap break-words"> | |
| {testResult.error.message} | |
| </div> | |
| </AccordionEntry> |
| # Status - quick overview | |
| git config --global alias.st status | |
| git config --global alias.s "status -s" | |
| # Committing | |
| git config --global alias.co commit | |
| git config --global alias.cm "commit -m" | |
| git config --global alias.ca "commit --amend" | |
| # Branch management |
| package com.saucelabs.saucebindings.junit5.examples.without; | |
| import java.net.MalformedURLException; | |
| import java.net.URL; | |
| import java.util.HashMap; | |
| import java.util.Map; | |
| import org.junit.jupiter.api.BeforeEach; | |
| import org.junit.jupiter.api.Test; | |
| import org.junit.jupiter.api.TestInfo; | |
| import org.junit.jupiter.api.extension.ExtensionContext; |