Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add SocialIcon unit tests #936

Open
wants to merge 41 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
0ddc957
test: add unit tests for SocialIcon component
devin-ai-integration[bot] Jan 28, 2025
6892469
test: improve SocialIcon test coverage for hover states and transitions
devin-ai-integration[bot] Jan 28, 2025
95a6769
fix: add missing closing brace in SocialIcon test
devin-ai-integration[bot] Jan 28, 2025
459e8f4
test: add test case for SocialIcon without ColoredIcon prop
devin-ai-integration[bot] Jan 28, 2025
0fbc3a2
test: add test case for transition styles
devin-ai-integration[bot] Jan 28, 2025
1f66ef5
test: fix style assertions in SocialIcon tests
devin-ai-integration[bot] Jan 28, 2025
52a7b59
test: improve SocialIcon test coverage with style and hover assertions
devin-ai-integration[bot] Jan 28, 2025
9e2303c
test: update style assertions to match testing library expectations
devin-ai-integration[bot] Jan 28, 2025
c81decd
test: update style assertions to use object format consistently
devin-ai-integration[bot] Jan 28, 2025
d1d4e07
test: update style assertions to use string values for opacity and th…
devin-ai-integration[bot] Jan 28, 2025
1beb6e5
test: update style assertions with complete style properties
devin-ai-integration[bot] Jan 28, 2025
efae99d
test: add theme-based style assertions for width and height
devin-ai-integration[bot] Jan 28, 2025
4f05fbb
test: add comprehensive hover state transition tests
devin-ai-integration[bot] Jan 28, 2025
6321771
test: update style assertions to use individual checks and RGB values
devin-ai-integration[bot] Jan 28, 2025
e345eff
test: update remaining style assertions to use individual checks and …
devin-ai-integration[bot] Jan 28, 2025
2790319
test: add key prop and component type assertions
devin-ai-integration[bot] Jan 28, 2025
a2000fc
test: add test case for undefined color behavior
devin-ai-integration[bot] Jan 28, 2025
fe249d2
test: add comprehensive style assertions for StyledColoredIcon
devin-ai-integration[bot] Jan 28, 2025
4754f72
test: add additional test cases for theme spacing and transitions
devin-ai-integration[bot] Jan 28, 2025
524c26b
test: update style assertions to use toHaveAttribute with stringConta…
devin-ai-integration[bot] Jan 28, 2025
2b2c9e0
test: update remaining style assertions to use toHaveStyle
devin-ai-integration[bot] Jan 29, 2025
ee08844
test: update style assertions to use theme values and consistent obje…
devin-ai-integration[bot] Jan 29, 2025
02370a8
test: update remaining style assertions to use theme values
devin-ai-integration[bot] Jan 29, 2025
7710336
test: update remaining style assertions to use getComputedStyle
devin-ai-integration[bot] Jan 29, 2025
7de8c34
test: add transition timing assertions
devin-ai-integration[bot] Jan 29, 2025
e64dad6
test: update style assertions to use toHaveStyle for more reliable te…
devin-ai-integration[bot] Jan 29, 2025
582c0f2
test: update remaining style assertions to use toHaveStyle
devin-ai-integration[bot] Jan 29, 2025
7dc2a74
test: update remaining style assertions to use toHaveStyle consistently
devin-ai-integration[bot] Jan 29, 2025
c03681d
test: update coverage configuration with thresholds and reporters
devin-ai-integration[bot] Jan 29, 2025
1d9f2c4
test: add lcov reporter and coverage directory configuration
devin-ai-integration[bot] Jan 29, 2025
707f9f0
test: update style assertions to target correct styled components
devin-ai-integration[bot] Jan 29, 2025
1472600
test: add sonar coverage reporter and improve coverage configuration
devin-ai-integration[bot] Jan 29, 2025
3f38879
chore: add sonar-project.properties for coverage reporting
devin-ai-integration[bot] Jan 29, 2025
692424b
ci: add SonarCloud coverage reporting step
devin-ai-integration[bot] Jan 29, 2025
8c3e5dc
ci: update SonarCloud configuration for better coverage reporting
devin-ai-integration[bot] Jan 29, 2025
ca4a1d6
ci: update coverage reporting with v4 upload-artifact
devin-ai-integration[bot] Jan 29, 2025
367450f
ci: fix coverage path handling for SonarCloud
devin-ai-integration[bot] Jan 29, 2025
720969f
test: update style assertions to use getComputedStyle instead of toHa…
devin-ai-integration[bot] Jan 29, 2025
4c88b0c
test: update style assertions to use getComputedStyle with comprehens…
devin-ai-integration[bot] Jan 29, 2025
6dbf07c
ci: improve coverage artifact handling and path fixing for SonarCloud
devin-ai-integration[bot] Jan 29, 2025
1440c02
ci: improve coverage configuration and reporting
devin-ai-integration[bot] Jan 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,31 @@ jobs:

- run: pnpm test:coverage

- name: Upload coverage reports
uses: actions/upload-artifact@v4
with:
name: coverage-reports
path: |
coverage/
coverage/lcov.info
coverage/coverage-final.json
retention-days: 14

- name: Fix coverage paths for SonarCloud
run: |
sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace@g' coverage/lcov.info
cp coverage/lcov.info coverage/coverage-final.json .
ls -la coverage/
cat coverage/lcov.info
echo "Coverage files:"
find coverage -type f -ls

- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

build-stateless:
runs-on: ubuntu-latest
steps:
Expand Down
19 changes: 19 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
sonar.projectKey=ensdomains_ens-app-v3
sonar.organization=ensdomains

# Source and test files
sonar.sources=src
sonar.tests=src
sonar.test.inclusions=src/**/*.test.ts,src/**/*.test.tsx
sonar.exclusions=src/**/*.test.ts,src/**/*.test.tsx,src/**/*.d.ts

# Coverage configuration
sonar.javascript.lcov.reportPaths=coverage/lcov.info
sonar.coverage.exclusions=src/**/*.test.ts,src/**/*.test.tsx,src/**/*.d.ts,src/**/*.stories.tsx
sonar.javascript.coverage.reportPaths=coverage/coverage-final.json
sonar.typescript.coverage.reportPaths=coverage/coverage-final.json
sonar.coverage.reportPaths=coverage/coverage-final.json

# Other configuration
sonar.sourceEncoding=UTF-8
sonar.verbose=true
Loading
Loading