Move features along in deprecation status ✂️ (#20315)

* Move features along in deprecation status

* Remove unnecessary tests
This commit is contained in:
Ben Halpern 2023-11-07 09:50:08 -05:00 committed by GitHub
parent 64fd4e7800
commit a4a1de964d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 3 additions and 101 deletions

View file

@ -5,7 +5,6 @@ module Constants
Customization
Notifications
Account
Billing
Organization
Extensions
].freeze

View file

@ -26,7 +26,6 @@ class AdminMenu
scope :customization, "tools-line", [
item(name: "config"),
item(name: "html variants", controller: "html_variants"),
item(name: "billboards"),
item(name: "navigation links"),
item(name: "pages"),

View file

@ -1,6 +1,6 @@
<%= form_for(Settings::Community.new,
url: admin_settings_communities_path,
html: { data: { action: "submit->config#updateConfigurationSettings" } }) do |f| %>
html: { data: { action: "submit->config#updateConfigurationSettings" }, class: "hidden" }) do |f| %>
<details class="crayons-card">
<summary class="crayons-subtitle-2 p-6">Community Content</summary>
<div class="p-6 pt-0">

View file

@ -1,6 +1,6 @@
<%= form_for(Settings::General.new,
url: admin_settings_general_settings_path,
html: { data: { action: "submit->config#updateConfigurationSettings" } }) do |f| %>
html: { data: { action: "submit->config#updateConfigurationSettings" }, class: "hidden" }) do |f| %>
<details class="crayons-card">
<summary class="crayons-subtitle-2 p-6">Credits</summary>
<div class="p-6 pt-0">

View file

@ -9,7 +9,6 @@
<%= render partial: "forms/api_tokens" %>
<%= render partial: "forms/authentication" %>
<%= render partial: "forms/campaign" %>
<%= render partial: "forms/community" %>
<%= render partial: "forms/credits" %>
<%= render partial: "forms/emails" %>

View file

@ -17,9 +17,4 @@
<span class="color-base-60 block fs-base"><%= t("views.dashboard.summary.listings") %></span>
</div>
<%- end %>
<div class="crayons-card crayons-card--secondary p-3 m:p-6">
<strong class="fs-2xl m:fs-3xl lh-tight color-base-90"><%= @user.unspent_credits_count %></strong>
<span class="color-base-60 block fs-base"><%= t("views.dashboard.summary.credits") %></span>
</div>
</div>

View file

@ -1,65 +0,0 @@
describe('Campaign Section', () => {
beforeEach(() => {
cy.testSetup();
cy.fixture('users/adminUser.json').as('user');
cy.get('@user').then((user) => {
cy.loginUser(user);
});
});
describe('sidebar image setting', () => {
it('rejects an invalid image URL', () => {
cy.get('@user').then(() => {
cy.visit('/admin/customization/config');
cy.get('#new_settings_campaign').as('campaignSectionForm');
cy.get('@campaignSectionForm').findByText('Campaign').click();
cy.get('@campaignSectionForm')
.findByPlaceholderText('Used at the top of the campaign sidebar')
.type('example.com/image.png');
cy.get('@campaignSectionForm').findByText('Update Settings').click();
cy.url().should('contains', '/admin/customization/config');
cy.findByTestId('snackbar').within(() => {
cy.findByRole('alert').should(
'have.text',
'Validation failed: Sidebar image is not a valid URL',
);
});
});
});
it('accepts a valid image URL', () => {
cy.get('@user').then(() => {
cy.visit('/admin/customization/config');
cy.get('#new_settings_campaign').as('campaignSectionForm');
cy.get('@campaignSectionForm').findByText('Campaign').click();
cy.get('@campaignSectionForm')
.findByPlaceholderText('Used at the top of the campaign sidebar')
.type('https://example.com/image.png');
cy.get('@campaignSectionForm').findByText('Update Settings').click();
cy.url().should('contains', '/admin/customization/config');
cy.findByTestId('snackbar').within(() => {
cy.findByRole('alert').should(
'have.text',
'Successfully updated settings.',
);
});
// Page reloaded so need to get a new reference to the form.
cy.get('#new_settings_campaign').as('campaignSectionForm');
cy.get('#settings_campaign_sidebar_image').should(
'have.value',
'https://example.com/image.png',
);
});
});
});
});

View file

@ -1,6 +1,6 @@
require "rails_helper"
RSpec.describe "Dashboard", js: true do
RSpec.describe "Dashboard", :js do
let(:tag) { create(:tag) }
let(:organization) { create(:organization) }
let(:podcast) { create(:podcast) }
@ -9,31 +9,6 @@ RSpec.describe "Dashboard", js: true do
let(:user1) { collection.user }
let(:user2) { create(:user) }
context "when looking at analytics counters" do
before do
sign_in user1
end
it "shows the count of unspent credits and listings created" do
Credit.add_to(user1, 2)
Credits::Buy.call(
purchaser: user1,
purchase: listing,
cost: 1,
)
Credit.counter_culture_fix_counts
user1.reload
visit dashboard_path
within "main#main-content > header" do
expect(page).to have_text(/1\nCredits available/)
expect(page).to have_text(/1\nListings created/)
end
end
end
context "when looking at actions panel" do
before do
stub_const(