Skip to content

Commit 3c422d2

Browse files
Merge pull request #31 from ShootingKing-AM/multi-test
[Test] Implement all feature tests and some fixes
2 parents e1e79ad + 369c46b commit 3c422d2

104 files changed

Lines changed: 6845 additions & 140 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/test-e2e.yml

Lines changed: 43 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: Run Tests
3434
run: |
3535
# npm run test
36-
npm run test-wdio
36+
sudo npm run test-wdio
3737
3838
ls -alh
3939
ls -alh tests/test_config/
@@ -92,24 +92,54 @@ jobs:
9292
echo "# 📷 Screenshots of tests:" >> comment.md
9393
echo "" >> comment.md
9494
95-
for ss_test in tests/test_config/*.png logs/*.png; do
95+
for ss_test in logs/**/; do
9696
ss_test_desc=$(basename "$ss_test" .png)
97-
98-
# echo "<details><summary>$ss_test_desc</summary>" >> comment.md
99-
# echo '<p float="left">' >> comment.md
100-
# cml-publish "$ss_test" | sed -E 's/.+/<img width="90%" src="\0"\/>/' >> comment.md
101-
# # echo "![](./$ss_test)" >> comment.md
102-
# echo '</p></details>' >> comment.md
97+
98+
if [ "$ss_test_desc" == "test-reports" ]; then
99+
continue
100+
fi
103101
104102
echo "" >> comment.md
105-
echo "### $ss_test_desc" >> comment.md
103+
echo "#### $ss_test_desc" >> comment.md
106104
echo "" >> comment.md
107-
echo '<p float="left">' >> comment.md
108-
cml-publish "$ss_test" | sed -E 's/.+/<img width="90%" src="\0"\/>/' >> comment.md
109-
# echo "![](./$ss_test)" >> comment.md
110-
echo '</p>' >> comment.md
105+
106+
echo '<details><summary>Pre Test</summary>' >> comment.md
107+
108+
for ss in "$ss_test"*Pre*.png; do
109+
echo '<p float="left">' >> comment.md
110+
cml-publish "$ss" | sed -E 's/.+/<img width="45%" src="\0"\/>/' >> comment.md
111+
echo '</p>' >> comment.md
112+
done
113+
114+
echo '</details><details><summary>Post Test</summary>' >> comment.md
115+
116+
for ss in "$ss_test"*Post*.png; do
117+
echo '<p float="left">' >> comment.md
118+
cml-publish "$ss" | sed -E 's/.+/<img width="45%" src="\0"\/>/' >> comment.md
119+
echo '</p>' >> comment.md
120+
done
121+
122+
echo '</details>' >> comment.md
111123
done
112124
125+
# for ss_test in tests/test_config/*.png logs/*.png; do
126+
# ss_test_desc=$(basename "$ss_test" .png)
127+
128+
# # echo "<details><summary>$ss_test_desc</summary>" >> comment.md
129+
# # echo '<p float="left">' >> comment.md
130+
# # cml-publish "$ss_test" | sed -E 's/.+/<img width="90%" src="\0"\/>/' >> comment.md
131+
# # # echo "![](./$ss_test)" >> comment.md
132+
# # echo '</p></details>' >> comment.md
133+
134+
# echo "" >> comment.md
135+
# echo "### $ss_test_desc" >> comment.md
136+
# echo "" >> comment.md
137+
# echo '<p float="left">' >> comment.md
138+
# cml-publish "$ss_test" | sed -E 's/.+/<img width="90%" src="\0"\/>/' >> comment.md
139+
# # echo "![](./$ss_test)" >> comment.md
140+
# echo '</p>' >> comment.md
141+
# done
142+
113143
if [ "$EVENT" == 'pull_request' ]
114144
then
115145
sha=${{ github.event.pull_request.head.sha}}

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,11 @@ Vagrantfile
273273

274274
*.cid
275275

276+
# Obsidian-to-Anki plugin Specifc
276277
# Complied Plugin Outputs
277278
main.js
278279

279-
tests/test_config
280-
tests/test_vault
280+
tests/test_config/*
281+
tests/test_vault/*
282+
tests/specs_gen/*
283+
tests/test_outputs/*

0 commit comments

Comments
 (0)