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

Time Zone indication in Conference program #138

Merged
merged 3 commits into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ jobs:
with:
fetch-depth: 1

- uses: nanasess/setup-chromedriver@v2
with:
chromedriver-version: 119.0.6045.105

- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION }}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!-- replace '.programme-time' -->

<div class="column medium-2 programme-time">
<%= gpc_time_format start_time %> – <%= gpc_time_format end_time %>
<%= gpc_time_zone(start_time) %>
</div>
31 changes: 31 additions & 0 deletions spec/system/conference_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# frozen_string_literal: true

require "rails_helper"
require "selenium/webdriver"

describe "Visit a conference", type: :system do
let(:organization) { create :organization }
Expand Down Expand Up @@ -76,4 +77,34 @@
it_behaves_like "no links"
end
end

context "when conference program show" do
let(:organization) { create :organization, time_zone: "UTC" }
let!(:component) { create(:component, manifest_name: :meetings, participatory_space: conference) }
let!(:conference_speakers) { create_list(:conference_speaker, 3, :with_meeting, conference: conference, meetings_component: component) }
let(:meetings) { Decidim::ConferenceMeeting.where(component: component) }
let!(:user) { create(:user, :confirmed, organization: organization, time_zone: timezone) }
let(:timezone) { "CET" }

context "when the user is logged in" do
before do
sign_in user
visit decidim_conferences.conference_conference_program_path(conference, component)
end

it "shows user's time zone" do
expect(page).to have_content("CET")
end
end

context "when the user is not logged in" do
before do
visit decidim_conferences.conference_conference_program_path(conference, component)
end

it "shows the organization's time zone" do
expect(page).to have_content("UTC")
end
end
end
end
Loading