mirror of
https://github.com/kucherenko/jscpd.git
synced 2026-09-19 08:11:03 +08:00
64e471e2b0
Adds 92 new tests (178 → 270 total) with zero source-file modifications: - packages/finder: 13 new test files covering all reporters, subscribers, validators, hooks, utils, options, cloneFound, getFilesToDetect, and InFilesDetector; shared buildClone() factory helper - apps/jscpd: 3 new test files (options-unit, print, store) plus extensions to formats, modes, and options integration tests - vitest.config.ts added to both packages to restrict coverage.include to src/** only, eliminating bin/ and prism.js noise - Fixes 3 tokenizer bugs (trailing space in format lookup, tokenization edge cases) uncovered by the new format fixture suite - Adds fixture files for 40+ language formats to support formats.test.ts
69 lines
1.9 KiB
Plaintext
69 lines
1.9 KiB
Plaintext
*** Settings ***
|
|
Library SeleniumLibrary
|
|
Library Collections
|
|
Library String
|
|
Resource ../resources/common.robot
|
|
|
|
Suite Setup Open Browser ${BASE_URL} ${BROWSER}
|
|
Suite Teardown Close All Browsers
|
|
Test Setup Go To Login Page
|
|
Test Teardown Clear Session
|
|
|
|
*** Variables ***
|
|
${BASE_URL} http://localhost:3000
|
|
${BROWSER} chrome
|
|
${VALID_USER} testuser@example.com
|
|
${VALID_PASS} SecurePass123!
|
|
|
|
*** Test Cases ***
|
|
Successful Login With Valid Credentials
|
|
[Documentation] Verify user can log in with valid credentials
|
|
[Tags] smoke authentication
|
|
Enter Username ${VALID_USER}
|
|
Enter Password ${VALID_PASS}
|
|
Click Login Button
|
|
Wait Until Page Contains Welcome back
|
|
Page Should Contain Dashboard
|
|
Current URL Should Contain /dashboard
|
|
|
|
User Can Log Out After Login
|
|
[Documentation] Verify user can log out successfully
|
|
[Tags] authentication
|
|
Enter Username ${VALID_USER}
|
|
Enter Password ${VALID_PASS}
|
|
Click Login Button
|
|
Wait Until Page Contains Dashboard
|
|
Click Button id:logout-btn
|
|
Wait Until Page Contains Sign in
|
|
Current URL Should Contain /login
|
|
|
|
Session Expires After Inactivity
|
|
[Documentation] Verify session times out correctly
|
|
[Tags] authentication security
|
|
Enter Username ${VALID_USER}
|
|
Enter Password ${VALID_PASS}
|
|
Click Login Button
|
|
Wait Until Page Contains Dashboard
|
|
Sleep 31m
|
|
Reload Page
|
|
Current URL Should Contain /login
|
|
|
|
*** Keywords ***
|
|
Go To Login Page
|
|
Go To ${BASE_URL}/login
|
|
Wait Until Page Contains Element id:login-form
|
|
|
|
Enter Username
|
|
[Arguments] ${username}
|
|
Input Text id:email ${username}
|
|
|
|
Enter Password
|
|
[Arguments] ${password}
|
|
Input Text id:password ${password}
|
|
|
|
Click Login Button
|
|
Click Button id:submit-btn
|
|
|
|
Clear Session
|
|
Delete All Cookies
|