-
Notifications
You must be signed in to change notification settings - Fork 77
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
[WIP] Ptitloup/add selenium test #955
Draft
ptitloup
wants to merge
58
commits into
EsupPortail:develop
Choose a base branch
from
ptitloup:ptitloup/add_selenium_test
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
58 commits
Select commit
Hold shift + click to select a range
b7f0719
add selenium test in pod main app, add selenium, geckodriver and fire…
ptitloup 3ecb4e1
rename selenium integration test to not run it with other tests
ptitloup 7083b9e
add integration test in pod workflow action
ptitloup 676f2cf
try : add comment if accessibilty is ok
ptitloup 3631e52
try : echo pa11y
ptitloup 05ef9e2
try : pa11y no error
ptitloup 192fd56
try : add permissions
ptitloup ac6877a
try : test comment
ptitloup f08759c
classic usage of actions comment
ptitloup cdd5afe
classic usage of actions comment - add permissions
ptitloup d9d9407
classic usage of actions comment - add GITHUB TOKEN
ptitloup 635cf3b
add permissions and test issues
ptitloup 1872b38
change order
ptitloup 4ad22b3
try curl
ptitloup 6a3c128
try script
ptitloup b8a6506
try script with issue
ptitloup 1f89280
try script with issue and read permissions
ptitloup 822516e
try another use curl
ptitloup 101f4de
try another use curl 2
ptitloup 2576eb5
pull request target
ptitloup b794c66
pull request target 2
ptitloup 13edd02
pull request target add type and branche
ptitloup 32d88c2
pull request target remove type
ptitloup 4655644
pull request target star
ptitloup 780a19a
pull request target another try
ptitloup bcbd751
test pull-request-target-branch-action
ptitloup 4c07fd6
test all types
ptitloup 36f00d7
remove pull_request_targat
ptitloup ee39dd3
little test
ptitloup 7feb000
add integration test in pod workflow - remove add comment
ptitloup 1750786
add python 3.8 and 3.10 in matrix test
ptitloup ed79b40
add directory to store side selenium. rename test selenium suite and …
ptitloup 5e47555
Implement selenium integration tests
AymericJak f86d25c
Fix conflicts
AymericJak 826f14b
Add USE_DEBUG_TOOLBAR parameter
AymericJak aadaca6
Add automatic compilation when merging
AymericJak 5eb3861
Add custom commands
AymericJak 0dc7a7c
Simplify function run()
AymericJak d110424
Add initial datas
AymericJak 23389a5
Add documentation
AymericJak 81a134e
Improve code
AymericJak 5aff4ed
Styling & Linting
AymericJak db414c3
Fix conflicts and change import path of override_settings
AymericJak fc58774
Rework SeleniumTestCase and it's execution
AymericJak 87aadde
Test tearDownClass
AymericJak 65487d5
Change suite_url
AymericJak ff0a6a3
Add connexion test and improve code
AymericJak 441e9b3
Add order for tests
AymericJak 209520e
update branch
ptitloup c9d1f05
Fix conflicts
AymericJak 7d889d9
Add pause function
AymericJak d4b1311
Improve gitignore
AymericJak 13e83ea
Merge branch 'ptitloup/add_selenium_test' of https://github.com/ptitl…
ptitloup 8cdddd5
fix click and clear for simulate typing text function
ptitloup f8c8bb5
Merge branch 'develop' of https://github.com/EsupPortail/Esup-Pod int…
ptitloup a8c4494
add side for subtitles and fix load web vtt from old caption
ptitloup 3f57994
workon selenium side - add simple side and staff side.
ptitloup 8a14fef
workon selenium python test instead of side selenium files
ptitloup File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,10 +17,12 @@ jobs: | |
git config user.email [email protected] | ||
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} | ||
|
||
# Prettify js+css code with prettier | ||
# Prettify .js | .json | .side | .css files with prettier | ||
- name: Running prettier | ||
run: | | ||
npx prettier --write pod/*/static/**/*.js | ||
npx prettier --write pod/*/static/**/*.json | ||
npx prettier --write --parser json pod/**/*.side | ||
npx prettier --write pod/*/static/**/*.css | ||
|
||
- name: Check for modified files | ||
|
@@ -67,3 +69,17 @@ jobs: | |
run: | | ||
git commit -am "Auto-update configuration files" | ||
git push | ||
|
||
# Compile lang files | ||
- name: Compile lang files in fr and nl | ||
run: make compilelang | ||
|
||
- name: Check for modified files | ||
id: compilelang-git-check | ||
run: echo modified=$(if git diff --quiet; then echo "false"; else echo "true"; fi) >> $GITHUB_OUTPUT | ||
|
||
- name: Push lang compilation changes | ||
if: steps.compilelang-git-check.outputs.modified == 'true' | ||
run: | | ||
git commit -am "Compile lang files" | ||
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
185 changes: 185 additions & 0 deletions
185
pod/completion/integration_tests/tests/subtitles_staff.side
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,185 @@ | ||
{ | ||
"id": "9ea49e3a-2f6e-49aa-b1c7-975e8c0f70d3", | ||
"version": "2.0", | ||
"name": "pod-front", | ||
"url": "http://localhost:9090/", | ||
"tests": [{ | ||
"id": "pod-sous-titres-mode-edition", | ||
"name": "Untitled", | ||
"commands": [{ | ||
"id": "bb668b94-3724-482f-b0e9-ba055f0e3000", | ||
"comment": "Ouvre la page de complétion", | ||
"command": "open", | ||
"target": "/video/completion/0002-video-staff/", | ||
"targets": [], | ||
"value": "" | ||
}, { | ||
"id": "833e6f0f-cfb0-494d-b62f-4dd944b3df42", | ||
"comment": "Ouvre l'accordéon des sous-titres", | ||
"command": "click", | ||
"target": "id=section_track", | ||
"targets": [ | ||
["id=section_track", "id"], | ||
["linkText=Sous-titres et légendes", "linkText"], | ||
["css=#section_track", "css:finder"], | ||
["xpath=//a[contains(text(),'Sous-titres et légendes')]", "xpath:link"], | ||
["xpath=//a[@id='section_track']", "xpath:attributes"], | ||
["xpath=//div[@id='accordeon']/li[3]/a", "xpath:idRelative"], | ||
["xpath=(//a[contains(@href, '#')])[3]", "xpath:href"], | ||
["xpath=//div/li[3]/a", "xpath:position"], | ||
["xpath=//a[contains(.,'Sous-titres et légendes ')]", "xpath:innerText"] | ||
], | ||
"value": "" | ||
}, { | ||
"id": "9292c6ab-76d7-43d6-9102-cf80e772acac", | ||
"comment": "", | ||
"command": "waitForElementVisible", | ||
"target": "linkText=Outil de création de fichier de sous-titres/légende", | ||
"targets": [ | ||
["linkText=Outil de création de fichier de sous-titres/légende", "linkText"], | ||
["css=p > .btn", "css:finder"], | ||
["xpath=//a[contains(text(),'Outil de création de fichier de sous-titres/légende')]", "xpath:link"], | ||
["xpath=//div[@id='accordeon']/li[4]/div/p/a", "xpath:idRelative"], | ||
["xpath=//a[contains(@href, '/video/completion/caption_maker/0002-video-staff/')]", "xpath:href"], | ||
["xpath=//p/a", "xpath:position"], | ||
["xpath=//a[contains(.,'Outil de création de fichier de sous-titres/légende')]", "xpath:innerText"] | ||
], | ||
"value": "30000" | ||
}, { | ||
"id": "18f5e568-9ae1-4e43-920d-8e7aca81aa83", | ||
"comment": "Clique sur le bouton pour ouvrir l'outil de création de sous-titres", | ||
"command": "click", | ||
"target": "linkText=Outil de création de fichier de sous-titres/légende", | ||
"targets": [ | ||
["linkText=Outil de création de fichier de sous-titres/légende", "linkText"], | ||
["css=p > .btn", "css:finder"], | ||
["xpath=//a[contains(text(),'Outil de création de fichier de sous-titres/légende')]", "xpath:link"], | ||
["xpath=//div[@id='accordeon']/li[4]/div/p/a", "xpath:idRelative"], | ||
["xpath=//a[contains(@href, '/video/completion/caption_maker/33955-bbb/')]", "xpath:href"], | ||
["xpath=//p/a", "xpath:position"], | ||
["xpath=//a[contains(.,'Outil de création de fichier de sous-titres/légende')]", "xpath:innerText"] | ||
], | ||
"value": "" | ||
}, { | ||
"id": "80aceab9-1cac-42ce-ba1e-e4e0ffb5fa27", | ||
"comment": "Clique sur le bouton pour ajouter un sous-titre", | ||
"command": "click", | ||
"target": "id=addSubtitle", | ||
"targets": [ | ||
["id=addSubtitle", "id"], | ||
["css=#addSubtitle", "css:finder"], | ||
["xpath=//button[@id='addSubtitle']", "xpath:attributes"], | ||
["xpath=//div[@id='newCaptionsEditor']/button", "xpath:idRelative"], | ||
["xpath=//div[2]/div[2]/button", "xpath:position"], | ||
["xpath=//button[contains(.,' Ajouter un(e) légende / sous-titre')]", "xpath:innerText"] | ||
], | ||
"value": "" | ||
}, { | ||
"id": "042569e8-f390-40c1-a04f-413c88519950", | ||
"comment": "Sélectionne le champ des sous-titres", | ||
"command": "click", | ||
"target": "name=captionTextInput", | ||
"targets": [ | ||
["id=c40389510", "id"], | ||
["name=captionTextInput", "name"], | ||
["css=#c40389510", "css:finder"], | ||
["xpath=//textarea[@id='c40389510']", "xpath:attributes"], | ||
["xpath=//div[@id='newCaptionsEditor']/form/div[2]/textarea", "xpath:idRelative"], | ||
["xpath=//div[2]/textarea", "xpath:position"] | ||
], | ||
"value": "" | ||
}, { | ||
"id": "3f6c5cb2-d467-4e35-9d55-3b69bba7dd13", | ||
"comment": "Écrit le contenu du sous-titre", | ||
"command": "type", | ||
"target": "name=captionTextInput", | ||
"targets": [ | ||
["id=c40389510", "id"], | ||
["name=captionTextInput", "name"], | ||
["css=#c40389510", "css:finder"], | ||
["xpath=//textarea[@id='c40389510']", "xpath:attributes"], | ||
["xpath=//div[@id='newCaptionsEditor']/form/div[2]/textarea", "xpath:idRelative"], | ||
["xpath=//div[2]/textarea", "xpath:position"] | ||
], | ||
"value": "Texte initial" | ||
}, { | ||
"id": "ffed3160-9509-4730-8478-c0c6543419a2", | ||
"comment": "Change le mode d'édition", | ||
"command": "click", | ||
"target": "id=switchOldEditMode", | ||
"targets": [ | ||
["id=switchOldEditMode", "id"], | ||
["css=#switchOldEditMode", "css:finder"], | ||
["xpath=//button[@id='switchOldEditMode']", "xpath:attributes"], | ||
["xpath=//div[@id='pod-mainContent']/div[2]/div/div/div/div[7]/button", "xpath:idRelative"], | ||
["xpath=//div[7]/button", "xpath:position"], | ||
["xpath=//button[contains(.,' Changer le mode d’édition')]", "xpath:innerText"] | ||
], | ||
"value": "" | ||
}, { | ||
"id": "50f96a38-c5bd-49bb-babe-47227a1a022e", | ||
"comment": "Sélectionne le champ des sous-titres", | ||
"command": "click", | ||
"target": "id=captionContent", | ||
"targets": [ | ||
["id=captionContent", "id"], | ||
["css=#captionContent", "css:finder"], | ||
["xpath=//textarea[@id='captionContent']", "xpath:attributes"], | ||
["xpath=//div[@id='rawCaptionsEditor']/textarea", "xpath:idRelative"], | ||
["xpath=//div[2]/div/textarea", "xpath:position"] | ||
], | ||
"value": "" | ||
}, { | ||
"id": "0ee2ab41-f02e-4a7f-a865-4caf1500d8ed", | ||
"comment": "Modifie le contenu du sous-titre", | ||
"command": "type", | ||
"target": "id=captionContent", | ||
"targets": [ | ||
["id=captionContent", "id"], | ||
["css=#captionContent", "css:finder"], | ||
["xpath=//textarea[@id='captionContent']", "xpath:attributes"], | ||
["xpath=//div[@id='rawCaptionsEditor']/textarea", "xpath:idRelative"], | ||
["xpath=//div[2]/div/textarea", "xpath:position"] | ||
], | ||
"value": "WEBVTT\\n\\n00:00.000 --> 00:02.000\\nTexte corrigé" | ||
}, { | ||
"id": "0bd7bfef-23b1-4eee-82aa-e8e10daf2541", | ||
"comment": "Reviens au mode d'édition par défaut", | ||
"command": "click", | ||
"target": "id=switchOldEditMode", | ||
"targets": [ | ||
["id=switchOldEditMode", "id"], | ||
["css=#switchOldEditMode", "css:finder"], | ||
["xpath=//button[@id='switchOldEditMode']", "xpath:attributes"], | ||
["xpath=//div[@id='pod-mainContent']/div[2]/div/div/div/div[7]/button", "xpath:idRelative"], | ||
["xpath=//div[7]/button", "xpath:position"], | ||
["xpath=//button[contains(.,' Changer le mode d’édition')]", "xpath:innerText"] | ||
], | ||
"value": "" | ||
}, { | ||
"id": "bf33e57c-b117-4d43-ba0f-ce246565ed15", | ||
"comment": "Récupère la valeur du champ du sous-titre", | ||
"command": "storeValue", | ||
"target": "name=captionTextInput", | ||
"targets": [], | ||
"value": "sousTitre" | ||
}, { | ||
"id": "ee3f5108-139c-4e56-8ecd-5f4fe90208ad", | ||
"comment": "Vérifie si la valeur modifiée est bien prise en compte d'un mode d'édition à l'autre", | ||
"command": "assert", | ||
"target": "sousTitre", | ||
"targets": [], | ||
"value": "Texte corrigé" | ||
}] | ||
}], | ||
"suites": [{ | ||
"id": "pod-front", | ||
"name": "Esup Pod test selenium", | ||
"persistSession": false, | ||
"parallel": false, | ||
"timeout": 300, | ||
"tests": ["pod-sous-titres-mode-edition"] | ||
}], | ||
"urls": ["http://localhost:9090/"], | ||
"plugins": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"commands": [ | ||
{ | ||
"id": "pod-accept-cookies", | ||
"comment": "Valide les cookies du navigateur", | ||
"command": "click", | ||
"target": "id=okcookie", | ||
"targets": [], | ||
"value": "" | ||
} | ||
] | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je suggère cette approche pour gérer Selenium avec une image docker.
https://github.com/SeleniumHQ/docker-selenium
Quelques avantages (permet de):
Désavantage:
Issue: docker/roadmap#238
Roadmap State(Considering): https://github.com/docker/roadmap/projects/1#card-85911349
Il y a, cependant, des solutions de contournement, que je n'ai pas explorées, exemple pour Mac: https://github.com/chipmk/docker-mac-net-connect