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

Space admins can create "Menu/Product Groups" and reorder them for display on their marketplace #2361

Merged
merged 31 commits into from
May 24, 2024
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
baed227
Adds tag sorting capability and updates product displays
rosschapman May 8, 2024
1ba0fea
Update app/furniture/marketplace/tags/_form.html.erb
rosschapman May 9, 2024
d7c5421
Improve naming, de-composition and testing of Marketplace::Tag scopes.
anaulin May 11, 2024
010a988
Replace `Marketplace.products_with_no_group_tags` with a scope on
anaulin May 11, 2024
cd5cd4b
Add tagged products to seeds' marketplace.
anaulin May 11, 2024
749db95
Fix lint issues.
anaulin May 11, 2024
7906242
Scopes tag position to bazaar
rosschapman May 14, 2024
616f72f
Merge branch 'main' into tag-sections
rosschapman May 14, 2024
f9372dc
Update app/furniture/marketplace/menu_component.html.erb
rosschapman May 14, 2024
c3a29f9
rolled back
rosschapman May 15, 2024
e7e23ba
Bump nokogiri from 1.16.4 to 1.16.5 (#2404)
dependabot[bot] May 14, 2024
71123b8
Bump postcss-preset-env from 9.5.11 to 9.5.13 (#2402)
dependabot[bot] May 14, 2024
2e89771
Bump aws-sdk-s3 from 1.149.1 to 1.150.0 (#2401)
dependabot[bot] May 14, 2024
b89747d
Remove obsolete docker-compose top-level `version` keyword (#2400)
anaulin May 14, 2024
4f70ea3
Bump square.rb from 37.0.0.20240417 to 38.0.0.20240515 (#2407)
dependabot[bot] May 15, 2024
27d5a36
Bump positioning from 0.2.1 to 0.2.2 (#2410)
dependabot[bot] May 21, 2024
fce6282
Bump rexml from 3.2.6 to 3.2.8 (#2409)
dependabot[bot] May 21, 2024
cdb734c
Bump standard from 1.35.1 to 1.36.0 (#2406)
dependabot[bot] May 21, 2024
161dedd
Bump aws-sdk-s3 from 1.150.0 to 1.151.0 (#2405)
dependabot[bot] May 21, 2024
97ff443
Bump rubocop-rails from 2.24.1 to 2.25.0 (#2411)
dependabot[bot] May 22, 2024
feb54e3
Bump selenium-webdriver from 4.20.1 to 4.21.1 (#2412)
dependabot[bot] May 22, 2024
aae219d
Removes Bazaar association from Tags (#2408)
rosschapman May 23, 2024
cf1e499
Runs yarn after merge
rosschapman May 23, 2024
7bdbd5b
Merge branch 'main' into tag-sections
rosschapman May 23, 2024
94ea17d
Updates styling and adds test placeholder
rosschapman May 23, 2024
a02cd6e
Adds specs
rosschapman May 23, 2024
c42c307
Update seeds
rosschapman May 23, 2024
2b9b494
Merge branch 'main' into tag-sections
rosschapman May 24, 2024
a4bae6b
Oops, add missing dep
rosschapman May 24, 2024
c3a496a
Updates spec
rosschapman May 24, 2024
e6e6b35
Merge branch 'main' into tag-sections
rosschapman May 24, 2024
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
Prev Previous commit
Next Next commit
Updates spec
rosschapman committed May 24, 2024
commit c3a496a2f016948d06c56c2ba0893edf367aefb5
12 changes: 9 additions & 3 deletions spec/furniture/marketplace/tag_spec.rb
Original file line number Diff line number Diff line change
@@ -20,15 +20,21 @@
describe ".by_position" do
subject(:by_position) { described_class.by_position }

let!(:second_tag) { create(:marketplace_tag, position: 2) }
let!(:first_tag) { create(:marketplace_tag, position: 1) }
let(:marketplace) { create(:marketplace) }
let!(:menu_tags) do
# The positioning gem won't let us manually assign positions on creation
create_list(:marketplace_tag, 3, :group, marketplace: marketplace).tap do |tags|
tags[0].update(position: :last)
tags[2].update(position: :first)
end
end

before do
freeze_time # Freeze time so that the `updated_at` values are the same
end

it "sorts tags by ascending position" do
expect(by_position).to eq([first_tag, second_tag])
expect(by_position).to eq([menu_tags[2], menu_tags[1], menu_tags[0]])
end
end
end