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 entering rooms feature, except branded domain #92

Merged
merged 3 commits into from
Aug 17, 2020

Conversation

user512
Copy link
Contributor

@user512 user512 commented Aug 17, 2020

Skipping branded domain test case for now because it requires testing on Heroku review app or any deployed instance or etc/host setup, will test branded domain after setting up CI.

Also allow unique room slug by workspace scope so same room name in different workspace can have same room slug.

Now that we have unique room slug by workspace scope, to ensure unique Jitsi room name, Jitsi room name is now constructed using workspaceSlug--roomSlug format.
This unique Jitsi room logic seems important and the fact that we don't have test around this seems scary but then the logic seems solid.

@user512 user512 temporarily deployed to convene-pr-92 August 17, 2020 04:47 Inactive
@user512 user512 changed the title test entering room features Test entering rooms feature, except branded domain Aug 17, 2020
@user512 user512 requested review from zspencer and cjoulain August 17, 2020 04:49
* With this setup, System Test and System Test Branded Domain workspaces
can have same slug when room names are the same
* Skip branded domain cases for now, pending CI setup and test on Heroku review app
@user512 user512 force-pushed the test-entering-room-features branch from 69a831f to 38c64e3 Compare August 17, 2020 04:51
@user512 user512 temporarily deployed to convene-pr-92 August 17, 2020 04:51 Inactive
* Now that we have unique room slug by workspace scope,
to ensure unique jitsi room name, jitsi room name is now constructed using
`workspaceSlug--roomSlug` format.
@user512 user512 temporarily deployed to convene-pr-92 August 17, 2020 05:04 Inactive
@@ -12,7 +12,7 @@ class Room < ApplicationRecord

# FriendlyId's does the legwork to make the slug uri-friendly
extend FriendlyId
friendly_id :name, use: :slugged
friendly_id :name, use: :scoped, scope: :workspace
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Nice call. Perhaps adding a comment near the implementation or test linking to the docs would provide a breadcrumb for folks to follow in the future without having to immediately go through search.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call.

await this.driver.wait(until.elementLocated(By.css("[name='jitsiConferenceFrame0']")));
return await this.driver.findElement(By.css("[name='jitsiConferenceFrame0']"));
await this.driver.wait(until.elementLocated(By.css("[name*='jitsiConferenceFrame']")));
return await this.driver.findElement(By.css("[name*='jitsiConferenceFrame']"));
Copy link
Contributor Author

@user512 user512 Aug 17, 2020

Choose a reason for hiding this comment

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

Relax the selector a bit because when entering a second room, we will have jitsiConferenceFrame1 instead.

Copy link
Member

Choose a reason for hiding this comment

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

Hmm, that's concerning. Does that mean we're inserting a new iFrame every time we switch rooms? Is there a possibility for leaking Video/Audio to a room unintentionally then?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Legit concern, will fix in the next pr.

Copy link
Member

@zspencer zspencer left a comment

Choose a reason for hiding this comment

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

This is great! Thank you Tom!

@@ -12,7 +12,7 @@ class Room < ApplicationRecord

# FriendlyId's does the legwork to make the slug uri-friendly
extend FriendlyId
friendly_id :name, use: :slugged
friendly_id :name, use: :scoped, scope: :workspace
Copy link
Member

Choose a reason for hiding this comment

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

Nice call. Perhaps adding a comment near the implementation or test linking to the docs would provide a breadcrumb for folks to follow in the future without having to immediately go through search.


def video_room_name(workspace, room)
"#{workspace.slug}--#{room.slug}"
end
Copy link
Member

Choose a reason for hiding this comment

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

Could we put this on the Room class, perhaps with a method name like cross_system_unique_identifer or something to indicate that it's used to figure out how to reference the particular room across Jitsi/DOM/etc? It's almost like a URI but not quite...

Also, are the two dashes semantically meaningful? My understanding of the direction that semantic HTML/CSS are trending towards is that: or _ seperates ideas, - seperates words, -- gives you a state.

Copy link
Member

Choose a reason for hiding this comment

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

Apparently this is called "block element modifier" http://getbem.com/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes and great name suggestion.

Given I am in a Room
When I tap a different Room in the Room Picker
Then I am in the Room
Given the Workspace Member is in the "System Test" Workspace and in the "Listed Room 1" Room
Copy link
Member

Choose a reason for hiding this comment

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

Good call on moving this to the Workspace Member instead of I to make it more clear who the actor is.

await this.driver.wait(until.elementLocated(By.css("[name='jitsiConferenceFrame0']")));
return await this.driver.findElement(By.css("[name='jitsiConferenceFrame0']"));
await this.driver.wait(until.elementLocated(By.css("[name*='jitsiConferenceFrame']")));
return await this.driver.findElement(By.css("[name*='jitsiConferenceFrame']"));
Copy link
Member

Choose a reason for hiding this comment

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

Hmm, that's concerning. Does that mean we're inserting a new iFrame every time we switch rooms? Is there a possibility for leaking Video/Audio to a room unintentionally then?

@zspencer zspencer merged commit 608658e into development Aug 17, 2020
@zspencer zspencer deleted the test-entering-room-features branch August 17, 2020 18:00
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.

2 participants