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

45 - Add a comment to a film extract #193

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

EnzoSimonoviciUTT
Copy link

We, BRAËMS Jerôme, VERNET William, GONG Tony and SIMONOVICI Enzo, hereby grant to Hyperglosae maintainers the right to publish our contribution under the terms of any licenses the Free Software Foundation classifies as Free Software Licenses.

@EnzoSimonoviciUTT
Copy link
Author

@benel le test fonctionne localement mais pas sur github

@benel
Copy link
Member

benel commented Jun 5, 2024

@EnzoSimonoviciUTT

I don't know how it comes that it work on your computer but I found this related discussion about using multiline regex in RSpec match():

https://stackoverflow.com/questions/5239997/regex-how-to-match-multiple-lines

@benel
Copy link
Member

benel commented Jun 5, 2024

@EnzoSimonoviciUTT @jeromeBRM @ToGoSleep

If you trace the test step by step by using page.save_screenshot, it appears that the problem (or a part of it) is already in the previous test step: the YouTube video is not loaded yet, and (therefore?) , pressing CTRL+SPACE has no effect.

You may find a way to wait for YouTube to be loaded:

  • either by making the test wait for javascript to be loaded,
  • or by making the test wait for the tooltip to be displayed ("Appuyer pour marquer le début") and make the tooltp wait for the video to be loaded.

@@ -40,3 +40,8 @@
Quand("je clique sur la référence temporelle {string} avec pour commentaire {string}") do |timecode, comment|
find(:xpath, "//p[contains(., \"#{timecode}\")]", match: :first).click
end

Quand("j’ajoute un timecode dans la glose ouverte") do
find("body").send_keys([:control, :space])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait for the video to be loaded.

end

Alors('le texte à la fin du commentaire contient la nouvelle référence temporelle') do
expect(find('.editable.content').text).to match(/[0-9:.]+ --> [0-9:.]+\n<TEXT>/)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • You should test the value of the textarea instead.
  • Test the regex to be sure:
    • it is multiline,
    • the dot match only the real dot and not any character.

@benel benel changed the title Feature 45 : Add a comment to a film extract 45 - Add a comment to a film extract Jun 8, 2024
@benel
Copy link
Member

benel commented Jun 10, 2024

@jeromeBRM @EnzoSimonoviciUTT @ToGoSleep

Do not forget to tell me if you are stuck and need help between class sessions.

@EnzoSimonoviciUTT EnzoSimonoviciUTT force-pushed the feature-45 branch 7 times, most recently from 2dd87c5 to f7b3df7 Compare June 11, 2024 15:26
Co-authored-by: Jerome BRAEMS <[email protected]>
Co-authored-by: Tony GONG <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants