refactor(editor): Go to upgrade page (#5994)
* refactor(editor): Go to upgrade page * test(editor): add UI store upgrade link tests * fix(editor): update execution filter links * fix(editor): update unit test * fix(editor): update unit test * fix(editor): remove unused variables
This commit is contained in:
@@ -12,10 +12,6 @@ import type { IWorkflowShortResponse, ExecutionFilterType } from '@/Interface';
|
||||
|
||||
Vue.use(PiniaVuePlugin);
|
||||
|
||||
const CLOUD_HOST = 'https://app.n8n.cloud';
|
||||
const PRODUCTION_SUBSCRIPTION_HOST = 'https://subscription.n8n.io';
|
||||
const DEVELOPMENT_SUBSCRIPTION_HOST = 'https://staging-subscription.n8n.io';
|
||||
|
||||
const defaultFilterState: ExecutionFilterType = {
|
||||
status: 'all',
|
||||
workflowId: 'all',
|
||||
@@ -62,17 +58,17 @@ const renderOptions: RenderOptions<ExecutionFilter> = {
|
||||
|
||||
describe('ExecutionFilter', () => {
|
||||
test.each([
|
||||
['development', 'default', DEVELOPMENT_SUBSCRIPTION_HOST, false, workflowsData],
|
||||
['development', 'default', '', true, workflowsData],
|
||||
['development', 'cloud', CLOUD_HOST, false, undefined],
|
||||
['development', 'cloud', '', true, undefined],
|
||||
['production', 'cloud', CLOUD_HOST, false, workflowsData],
|
||||
['production', 'cloud', '', true, undefined],
|
||||
['production', 'default', PRODUCTION_SUBSCRIPTION_HOST, false, undefined],
|
||||
['production', 'default', '', true, workflowsData],
|
||||
['development', 'default', false, workflowsData],
|
||||
['development', 'default', true, workflowsData],
|
||||
['development', 'cloud', false, undefined],
|
||||
['development', 'cloud', true, undefined],
|
||||
['production', 'cloud', false, workflowsData],
|
||||
['production', 'cloud', true, undefined],
|
||||
['production', 'default', false, undefined],
|
||||
['production', 'default', true, workflowsData],
|
||||
])(
|
||||
'renders in %s environment on %s deployment with advancedExecutionFilters %s and workflows %s',
|
||||
async (environment, deployment, plansLinkUrlBase, advancedExecutionFilters, workflows) => {
|
||||
async (environment, deployment, advancedExecutionFilters, workflows) => {
|
||||
initialState[STORES.SETTINGS].settings.license.environment = environment;
|
||||
initialState[STORES.SETTINGS].settings.deployment.type = deployment;
|
||||
initialState[STORES.SETTINGS].settings.enterprise.advancedExecutionFilters =
|
||||
@@ -86,11 +82,7 @@ describe('ExecutionFilter', () => {
|
||||
await userEvent.click(getByTestId('executions-filter-button'));
|
||||
await userEvent.hover(getByTestId('execution-filter-saved-data-key-input'));
|
||||
|
||||
if (!advancedExecutionFilters) {
|
||||
expect(getByTestId('executions-filter-view-plans-link').getAttribute('href')).contains(
|
||||
plansLinkUrlBase,
|
||||
);
|
||||
} else {
|
||||
if (advancedExecutionFilters) {
|
||||
expect(queryByTestId('executions-filter-view-plans-link')).not.toBeInTheDocument();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user