skills/hack23/cia/e2e-testing

e2e-testing

SKILL.md

E2E Testing Skill

Purpose

Test complete user workflows and UI interactions using Selenium/Playwright.

When to Use

  • ✅ Testing user registration/login flows
  • ✅ Testing complex multi-step workflows
  • ✅ Testing UI rendering and interactions
  • ✅ Cross-browser compatibility testing

Selenium WebDriver Pattern

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = ApplicationContext.class)
public class LoginE2ETest {
    private WebDriver driver;
    
    @Before
    public void setup() {
        driver = new ChromeDriver();
    }
    
    @Test
    public void shouldLoginSuccessfully() {
        driver.get("http://localhost:8080/login");
        driver.findElement(By.id("username")).sendKeys("testuser");
        driver.findElement(By.id("password")).sendKeys("password");
        driver.findElement(By.id("login-btn")).click();
        
        assertThat(driver.getCurrentUrl()).contains("/dashboard");
    }
}

Page Object Model

public class LoginPage {
    private WebDriver driver;
    
    @FindBy(id = "username")
    private WebElement usernameField;
    
    @FindBy(id = "password")
    private WebElement passwordField;
    
    @FindBy(id = "login-btn")
    private WebElement loginButton;
    
    public void login(String username, String password) {
        usernameField.sendKeys(username);
        passwordField.sendKeys(password);
        loginButton.click();
    }
}

References

Weekly Installs
5
Repository
hack23/cia
GitHub Stars
213
First Seen
12 days ago
Installed on
opencode5
gemini-cli5
claude-code5
github-copilot5
codex5
amp5