Open filters in side panel (#13304)

In this PR:

- Open filters in the side panel for **workflows**
- Open filters in the side panel for **workflow versions**
- Preparation for opening filters in the side panel for **workflow
runs**
- Add many tests to increase the coverage

Remaining to do:

- Open filters in the side panel for **workflow runs**
- Upon filter creation, open it in the side panel

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
Baptiste Devessier
2025-07-23 10:30:08 +02:00
committed by GitHub
parent eeade6e94c
commit 924e599cba
60 changed files with 2071 additions and 1509 deletions

View File

@ -0,0 +1,70 @@
import { WorkspaceUrls } from '~/generated/graphql';
import { getWorkspaceUrl } from '../getWorkspaceUrl';
describe('getWorkspaceUrl', () => {
it('should return customUrl when it is defined', () => {
const workspaceUrls: WorkspaceUrls = {
customUrl: 'https://custom.example.com',
subdomainUrl: 'https://subdomain.twenty.com',
};
const result = getWorkspaceUrl(workspaceUrls);
expect(result).toBe('https://custom.example.com');
});
it('should return subdomainUrl when customUrl is null', () => {
const workspaceUrls: WorkspaceUrls = {
customUrl: null,
subdomainUrl: 'https://subdomain.twenty.com',
};
const result = getWorkspaceUrl(workspaceUrls);
expect(result).toBe('https://subdomain.twenty.com');
});
it('should return subdomainUrl when customUrl is undefined', () => {
const workspaceUrls: WorkspaceUrls = {
customUrl: undefined,
subdomainUrl: 'https://subdomain.twenty.com',
};
const result = getWorkspaceUrl(workspaceUrls);
expect(result).toBe('https://subdomain.twenty.com');
});
it('should return customUrl when both customUrl and subdomainUrl are defined', () => {
const workspaceUrls: WorkspaceUrls = {
customUrl: 'https://my-company.com',
subdomainUrl: 'https://mycompany.twenty.com',
};
const result = getWorkspaceUrl(workspaceUrls);
expect(result).toBe('https://my-company.com');
});
it('should return empty string when customUrl is empty string', () => {
const workspaceUrls: WorkspaceUrls = {
customUrl: '',
subdomainUrl: 'https://subdomain.twenty.com',
};
const result = getWorkspaceUrl(workspaceUrls);
expect(result).toBe('');
});
it('should return subdomainUrl when customUrl is explicitly undefined', () => {
const workspaceUrls: WorkspaceUrls = {
customUrl: undefined,
subdomainUrl: 'https://subdomain.twenty.com',
};
const result = getWorkspaceUrl(workspaceUrls);
expect(result).toBe('https://subdomain.twenty.com');
});
});