qltyfolio/suite-group.sql
SELECT 'dynamic' AS component, sqlpage.run_sql('shell/shell.sql') AS properties;
-- not including breadcrumbs from sqlpage_aide_navigation
-- not including page title from sqlpage_aide_navigation
--Define tabs
SELECT
'tab' AS component,
TRUE AS center;
--Tab 1: Test Suite list
SELECT
'Test Plan List' AS title,
sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/qltyfolio/suite-group?tab=test_suites' AS link,
$tab = 'test_suites' AS active;
--Tab 2: Test case list
SELECT
'Test Case List' AS title,
sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/qltyfolio/suite-group?tab=test_cases' AS link,
$tab = 'test_cases' AS active;
--Tab 3: Meta Tags Missing URLs
SELECT
'Test Run List' AS title,
$tab = 'test_run' AS active;
SELECT
case when $tab = 'test_suites' THEN 'list'
END AS component;
SELECT
' **Name** : ' || rn.name AS description_md,
'
**Description** : ' || rn."description" AS description_md,
'
**Created By** : ' || rn.created_by AS description_md,
'
**Created At** : ' || rn.created_at AS description_md,
'
**Priority** : ' || rn.linked_requirements AS description_md,
'
' || rn.body AS description_md
FROM test_suites rn WHERE id = $id;
--Define component type based on active tab
SELECT
CASE
WHEN $tab = 'test_cases' THEN 'table'
WHEN $tab = 'test_suites' THEN 'table'
WHEN $tab = 'test_run' THEN 'table'
END AS component,
TRUE AS sort,
--TRUE AS search,
'URL' AS align_left,
'title' AS align_left,
'group' as markdown,
'id' as markdown,
'count' as markdown;
--Conditional content based on active tab
--Tab - specific content for "test_suites"
SELECT
'[' || test_case_id || '](' || sqlpage.environment_variable('SQLPAGE_SITE_PREFIX') || '/qltyfolio/test-detail.sql?tab=actual-result&id='|| test_case_id || ')' as id,
test_case_title AS "title",
group_name AS "group",
created_by as "Created By",
formatted_test_case_created_at as "Created On",
priority as "Priority"
FROM test_cases
WHERE $tab = 'test_cases' and group_id = $id
order by test_case_id;
--Tab - specific content for "test_run"
SELECT
name AS "Property Name"
FROM groups
WHERE $tab = 'test_run';