Skip to content

Instantly share code, notes, and snippets.

View nadvolod's full-sized avatar
🏖️
Just living the good life

Nikolay Advolodkin nadvolod

🏖️
Just living the good life
View GitHub Profile
@nadvolod
nadvolod / vision-board-requirements.md
Last active September 1, 2025 15:14
vision board requirements for LLMs

Vision Board Bliss - Requirements Document

Overview

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.

Core Features

1. User Authentication & Management

  • Sign Up/Login: Email-based authentication via Supabase Auth
  • User Sessions: Persistent authentication with secure session management
@nadvolod
nadvolod / xpath-selectors.ts
Created July 30, 2025 16:09
Xpath selector is okay. Brittle selectors are the problem
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
@nadvolod
nadvolod / guidelines.md
Last active July 16, 2025 20:13
Prompt guidelines for vibe coding

Project Development Guidelines

Automated Testing Guidelines

Test Scope

  • Only create positive tests unless explicitly requested to add negative tests or edge cases
  • Focus on happy path scenarios that verify features work as expected
  • One positive test per feature is sufficient unless more comprehensive testing is specifically requested

Test Execution

@nadvolod
nadvolod / data-driven.spec.ts
Last active May 21, 2025 19:07
Data driven testing w/ pw
// ❌ 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) {
@nadvolod
nadvolod / data-driven.ts
Last active May 21, 2025 11:38
Data-driven test using Playwright
// 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>
@nadvolod
nadvolod / .gitconfig
Created February 16, 2025 17:24
My favorite .gitconfig aliases
# 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;
@nadvolod
nadvolod / TestOrderDependency.java
Created February 20, 2024 13:07
Test ordering problem
// Problem: Test order dependency
@FixMethodOrder(MethodSorters.NAME_ASCENDING) // This ensures the test methods are executed in lexicographical order by their names
public class TestOrderDependency {
private static WebDriver driver;
@BeforeClass
public static void setUpClass() throws Exception {
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("browserName", "chrome");