diff --git a/config/shared.config.js b/config/shared.config.js index ac3829c..e9c2fdc 100644 --- a/config/shared.config.js +++ b/config/shared.config.js @@ -12,9 +12,9 @@ const webpack = require('webpack'); const isBuild = process.env.NODE_ENV === 'production'; -// only run git when HUB_UI_VERSION is NOT provided +// only run git when PULP_UI_VERSION is NOT provided const gitCommit = - process.env.HUB_UI_VERSION || + process.env.PULP_UI_VERSION || execSync('git rev-parse HEAD', { encoding: 'utf-8' }).trim(); const docsURL = 'https://docs.pulpproject.org/'; diff --git a/cypress/e2e/approval-modal/approval-multiple-repos-list.js b/cypress/e2e/approval-modal/approval-multiple-repos-list.js index abc3c97..2e10b1e 100644 --- a/cypress/e2e/approval-modal/approval-multiple-repos-list.js +++ b/cypress/e2e/approval-modal/approval-multiple-repos-list.js @@ -81,11 +81,11 @@ describe('Approval Dashboard process with multiple repos', () => { it('should test paging', () => { openModal(); - cy.contains('.modal-body .hub-toolbar', '1 - 10 of 11'); + cy.contains('.modal-body .pulp-toolbar', '1 - 10 of 11'); cy.contains('.modal-body', 'repo1'); cy.contains('.modal-body', 'published'); - cy.get('.modal-body .hub-toolbar [data-action="next"]').click(); - cy.contains('.modal-body .hub-toolbar', '11 - 11 of 11'); + cy.get('.modal-body .pulp-toolbar [data-action="next"]').click(); + cy.contains('.modal-body .pulp-toolbar', '11 - 11 of 11'); cy.contains('.modal-body', 'repo9'); }); @@ -117,7 +117,7 @@ describe('Approval Dashboard process with multiple repos', () => { openModal(); // deselect all - cy.get('.hub-toolbar [aria-label="Select"] svg').click(); + cy.get('.pulp-toolbar [aria-label="Select"] svg').click(); cy.contains('a', 'Deselect all (0 items)').click(); reposList.forEach((repo) => { cy.contains('[aria-label="Label group category"]', repo).should( @@ -126,7 +126,7 @@ describe('Approval Dashboard process with multiple repos', () => { }); // select page - cy.get('.hub-toolbar [aria-label="Select"] svg').click(); + cy.get('.pulp-toolbar [aria-label="Select"] svg').click(); cy.contains('a', 'Select page (10 items)').click(); cy.contains('.pf-v5-c-label.pf-m-overflow', 'more').click(); @@ -145,7 +145,7 @@ describe('Approval Dashboard process with multiple repos', () => { cy.contains('Clear all filters').click(); // deselect page and repo9 should remain here - cy.get('.hub-toolbar [aria-label="Select"] svg').click(); + cy.get('.pulp-toolbar [aria-label="Select"] svg').click(); cy.contains('a', 'Deselect page (10 items)').click(); reposList.forEach((repo) => { diff --git a/cypress/e2e/approval-modal/approval-multiple-repos.js b/cypress/e2e/approval-modal/approval-multiple-repos.js index c4af254..268564f 100644 --- a/cypress/e2e/approval-modal/approval-multiple-repos.js +++ b/cypress/e2e/approval-modal/approval-multiple-repos.js @@ -127,7 +127,7 @@ describe('Approval Dashboard process with multiple repos', () => { rejectItem('published'); // 2 items should be left there - cy.contains('.hub-toolbar', '1 - 2 of 2'); + cy.contains('.pulp-toolbar', '1 - 2 of 2'); cy.get('[data-cy="ApprovalRow-rejected-namespace-collection1"]'); cy.get('[data-cy="ApprovalRow-repo2-namespace-collection1"]'); cy.get('[data-cy="ApprovalRow-repo1-namespace-collection1"]').should( @@ -149,7 +149,7 @@ describe('Approval Dashboard process with multiple repos', () => { cy.visit(`${uiPrefix}approval-dashboard`); cy.contains('Clear all filters').click(); - cy.contains('.hub-toolbar', '1 - 2 of 2'); + cy.contains('.pulp-toolbar', '1 - 2 of 2'); cy.get('[data-cy="ApprovalRow-repo2-namespace-collection1"]'); cy.get('[data-cy="ApprovalRow-repo1-namespace-collection1"]'); cy.get('[data-cy="ApprovalRow-published-namespace-collection1"]').should( diff --git a/cypress/e2e/approval/approval-dashboard-list.js b/cypress/e2e/approval/approval-dashboard-list.js index 2c6e62f..64830b1 100644 --- a/cypress/e2e/approval/approval-dashboard-list.js +++ b/cypress/e2e/approval/approval-dashboard-list.js @@ -119,11 +119,11 @@ describe('Approval Dashboard list tests for sorting, paging and filtering', () = '[data-cy="body"] [data-cy="compound_filter"] a', 'Collection name', ).click(); - cy.get('[data-cy="body"] .hub-toolbar input').type( + cy.get('[data-cy="body"] .pulp-toolbar input').type( 'approval_dashboard_collection_test0{enter}', ); - cy.get('[data-cy="body"] .hub-toolbar button:first').click(); + cy.get('[data-cy="body"] .pulp-toolbar button:first').click(); cy.contains( '[data-cy="body"] [data-cy="compound_filter"] a', 'Namespace', diff --git a/cypress/e2e/approval/approval-process.js b/cypress/e2e/approval/approval-process.js index 90b8168..dcb6b79 100644 --- a/cypress/e2e/approval/approval-process.js +++ b/cypress/e2e/approval/approval-process.js @@ -25,7 +25,7 @@ describe('Approval Dashboard process', () => { cy.visit(`${uiPrefix}approval-dashboard`); cy.contains('[data-cy^="ApprovalRow"]', 'Needs review'); cy.contains('[data-cy^="ApprovalRow"] button', 'Sign and approve').click(); - cy.contains('.body', 'No results found', { timeout: 8000 }); + cy.contains('.pulp-section', 'No results found', { timeout: 8000 }); cy.visit(`${uiPrefix}approval-dashboard`); cy.contains('button', 'Clear all filters').click(); cy.contains('[data-cy^="ApprovalRow"]', 'Signed and approved'); diff --git a/cypress/e2e/collections/collection-detail.js b/cypress/e2e/collections/collection-detail.js index 1e2f804..137da0c 100644 --- a/cypress/e2e/collections/collection-detail.js +++ b/cypress/e2e/collections/collection-detail.js @@ -76,25 +76,25 @@ describe('Collection detail', () => { // better synchronization, wait for the rest of the page to load if (tab.name == 'Documentation') { - cy.contains('.hub-docs-container', 'Documentation'); + cy.contains('.pulp-docs-container', 'Documentation'); } if (tab.name == 'Import log') { - cy.contains('.body', 'Approval status', { + cy.contains('.pulp-section', 'Approval status', { timeout: 10000, }); } if (tab.name == 'Contents') { - cy.contains('.body', 'Description'); + cy.contains('.pulp-section', 'Description'); } if (tab.name == 'Dependencies') { - cy.contains('.body', 'No dependencies'); + cy.contains('.pulp-section', 'No dependencies'); } if (tab.name == 'Install') { - cy.contains('.body', 'License'); + cy.contains('.pulp-section', 'License'); } }); }); @@ -102,11 +102,11 @@ describe('Collection detail', () => { it('should have working UI on install tab', () => { cy.visit(baseURL); // should have Install, License and Installation strings, and correct docs link - cy.get('.body').contains('Install'); - cy.get('.body').contains('License'); - cy.get('.body').contains('Installation'); + cy.get('.pulp-section').contains('Install'); + cy.get('.pulp-section').contains('License'); + cy.get('.pulp-section').contains('Installation'); - cy.get('.body').contains( + cy.get('.pulp-section').contains( `a[href="${uiPrefix}repo/published/collection_detail_test_namespace/collection_detail_test_collection/docs/"]`, 'Go to documentation', ); @@ -131,37 +131,37 @@ describe('Collection detail', () => { it('should have working UI on docs tab', () => { cy.visit(`${baseURL}/docs`); // should have the search field - cy.get('.body').get('input[aria-label="find-content"'); + cy.get('.pulp-section').get('input[aria-label="find-content"'); // should have Readme menu item - cy.get('.hub-docs-sidebar').contains('Readme'); + cy.get('.pulp-docs-sidebar').contains('Readme'); // should still show the readme when searching readme cy.get('input[aria-label="find-content"').type('readme'); - cy.get('.hub-docs-sidebar').contains('Readme'); + cy.get('.pulp-docs-sidebar').contains('Readme'); // should not display readme if searching for no entry cy.get('input[aria-label="find-content"').type('no entry'); - cy.get('.hub-docs-sidebar').not(':contains("Readme")'); + cy.get('.pulp-docs-sidebar').not(':contains("Readme")'); }); it('should have a search field and the table headers on contents tab', () => { cy.visit(`${baseURL}/content`); - cy.get('.body').get('input[aria-label="find-content"'); - cy.get('.body').contains('th', 'Name'); - cy.get('.body').contains('th', 'Type'); - cy.get('.body').contains('th', 'Description'); + cy.get('.pulp-section').get('input[aria-label="find-content"'); + cy.get('.pulp-section').contains('th', 'Name'); + cy.get('.pulp-section').contains('th', 'Type'); + cy.get('.pulp-section').contains('th', 'Description'); }); it('should display import log tab', () => { cy.visit(`${baseURL}/import-log`); - cy.get('.body').get('.title-bar'); - cy.get('.body').get('.message-list'); + cy.get('.pulp-section').get('.title-bar'); + cy.get('.pulp-section').get('.message-list'); }); it('should display "No Dependencies" when opening the tab', () => { cy.visit(`${baseURL}/dependencies`); - cy.get('.body').contains('Dependencies'); - cy.get('.body').contains('No dependencies'); + cy.get('.pulp-section').contains('Dependencies'); + cy.get('.pulp-section').contains('No dependencies'); }); }); diff --git a/cypress/e2e/collections/collections-list.js b/cypress/e2e/collections/collections-list.js index 5c65f70..ba95abb 100644 --- a/cypress/e2e/collections/collections-list.js +++ b/cypress/e2e/collections/collections-list.js @@ -5,9 +5,9 @@ const uiPrefix = Cypress.env('uiPrefix'); describe('Collections list Tests', () => { function deprecate(list) { - const container = list ? '.hub-list' : '.hub-cards'; + const container = list ? '.pulp-list' : '.pulp-cards'; - cy.get('[data-cy=hub-list-toolbar]') + cy.get('[data-cy=pulp-list-toolbar]') .get('[aria-label="keywords"]:first') .type('my_collection0{enter}'); cy.get(container).contains('my_collection2').should('not.exist'); @@ -92,31 +92,31 @@ describe('Collections list Tests', () => { it('paging', () => { // there should be 11 items in db, 10 per page + 1 view more cy.get('.collection-container') - .get('.hub-c-card-collection-container') + .get('.pulp-c-card-collection-container') .should('have.length', 11); - cy.get('.hub-cards').get('[aria-label="Go to next page"]:first').click(); + cy.get('.pulp-cards').get('[aria-label="Go to next page"]:first').click(); cy.get('.collection-container') - .get('.hub-c-card-collection-container') + .get('.pulp-c-card-collection-container') .should('have.length', 1); }); it('filter', () => { - cy.get('.hub-cards') + cy.get('.pulp-cards') .get('[aria-label="keywords"]:first') .type('my_collection0{enter}'); - cy.get('.hub-cards').contains('my_collection0'); - cy.get('.hub-cards').contains('my_collection1').should('not.exist'); + cy.get('.pulp-cards').contains('my_collection0'); + cy.get('.pulp-cards').contains('my_collection1').should('not.exist'); }); it('set page size', () => { - cy.get('.hub-cards') + cy.get('.pulp-cards') .get('[data-ouia-component-type="PF5/Pagination"] button:first') .click(); - cy.get('.hub-cards').get('[data-action="per-page-20"]').click(); + cy.get('.pulp-cards').get('[data-action="per-page-20"]').click(); cy.get('.collection-container') - .get('.hub-c-card-collection-container') + .get('.pulp-c-card-collection-container') .should('have.length', 11); }); @@ -128,11 +128,11 @@ describe('Collections list Tests', () => { it('Can delete collection in collection list', () => { cy.get('[data-cy="view_type_list"] svg').click(); - cy.get('[data-cy=hub-list-toolbar]') + cy.get('[data-cy=pulp-list-toolbar]') .get('[aria-label="keywords"]:first') .type('my_collection0{enter}'); - cy.get('.hub-list').contains('my_collection2').should('not.exist'); - cy.get('.hub-list').contains('my_collection0'); + cy.get('.pulp-list').contains('my_collection2').should('not.exist'); + cy.get('.pulp-list').contains('my_collection0'); cy.get('.collection-container [aria-label="Actions"]').click(); cy.contains('Delete collection from system').click(); @@ -146,12 +146,12 @@ describe('Collections list Tests', () => { it('Can delete collection in namespace collection list', () => { cy.visit(`${uiPrefix}namespaces/my_namespace`); - cy.get('[data-cy=hub-list-toolbar]') + cy.get('[data-cy=pulp-list-toolbar]') .get('[aria-label="keywords"]:first') .type('my_collection1{enter}'); - cy.get('.body').contains('my_collection1'); - cy.get('.body [aria-label="Actions"]').click(); + cy.get('.pulp-section').contains('my_collection1'); + cy.get('.pulp-section [aria-label="Actions"]').click(); cy.contains('Delete collection from system').click(); cy.get('[data-cy=modal_checkbox] input').click(); cy.get('[data-cy=delete-button] button').click(); diff --git a/cypress/e2e/namespaces/group-list.js b/cypress/e2e/namespaces/group-list.js index ebb6acc..f393868 100644 --- a/cypress/e2e/namespaces/group-list.js +++ b/cypress/e2e/namespaces/group-list.js @@ -30,39 +30,39 @@ describe('Group list tests for sorting, paging and filtering', () => { }); it('paging', () => { - cy.get('.body').contains(items[0]); + cy.get('.pulp-section').contains(items[0]); - cy.get('.body').get('[aria-label="Go to next page"]:first').click(); - cy.get('.body').contains(items[10]); + cy.get('.pulp-section').get('[aria-label="Go to next page"]:first').click(); + cy.get('.pulp-section').contains(items[10]); - cy.get('.body').get('[aria-label="Go to next page"]:first').click(); - cy.get('.body').contains(items[20]); + cy.get('.pulp-section').get('[aria-label="Go to next page"]:first').click(); + cy.get('.pulp-section').contains(items[20]); }); it('sorting', () => { - cy.get('.body').get('[data-cy="sort_name"]').click(); - cy.get('.body tbody tr:first td:first').contains(items[20]); - cy.get('.body').contains(items[0]).should('not.exist'); + cy.get('.pulp-section').get('[data-cy="sort_name"]').click(); + cy.get('.pulp-section tbody tr:first td:first').contains(items[20]); + cy.get('.pulp-section').contains(items[0]).should('not.exist'); }); it('filter', () => { - cy.get('.body') + cy.get('.pulp-section') .get('[placeholder="Filter by group name"]:first') .type('group_test0{enter}'); - cy.get('.body').contains('group_test0'); - cy.get('.body').contains('group_test1').should('not.exist'); + cy.get('.pulp-section').contains('group_test0'); + cy.get('.pulp-section').contains('group_test1').should('not.exist'); }); it('set page size', () => { - cy.get('.body') + cy.get('.pulp-section') .get('[data-ouia-component-type="PF5/Pagination"] button:first') .click(); - cy.get('.body').contains('20 per page').click(); + cy.get('.pulp-section').contains('20 per page').click(); range(20).forEach((i) => { - cy.get('.body').contains(items[i]); + cy.get('.pulp-section').contains(items[i]); }); - cy.get('.body').contains(items[20]).should('not.exist'); + cy.get('.pulp-section').contains(items[20]).should('not.exist'); }); }); diff --git a/cypress/e2e/namespaces/group-management.js b/cypress/e2e/namespaces/group-management.js index 96b8a8e..b14dd0a 100644 --- a/cypress/e2e/namespaces/group-management.js +++ b/cypress/e2e/namespaces/group-management.js @@ -63,7 +63,7 @@ function removeUserFromGroupManually(groupName, userName) { cy.contains('[data-cy=main-tabs]', userName).should('not.exist'); } -describe('Hub Group Management Tests', () => { +describe('Pulp Group Management Tests', () => { before(() => { cy.deleteTestGroups(); cy.deleteTestGroups(); diff --git a/cypress/e2e/namespaces/group-roles.js b/cypress/e2e/namespaces/group-roles.js index 683399d..fdf5aac 100644 --- a/cypress/e2e/namespaces/group-roles.js +++ b/cypress/e2e/namespaces/group-roles.js @@ -60,7 +60,7 @@ describe('Group Roles Tests', () => { cy.get('[data-cy=add-roles]').click(); cy.get( - '.hub-custom-wizard-layout [data-ouia-component-type="PF5/Pagination"] button:first', + '.pulp-custom-wizard-layout [data-ouia-component-type="PF5/Pagination"] button:first', ).click(); cy.contains('100 per page').click(); @@ -118,9 +118,9 @@ describe('Group Roles Tests', () => { cy.get('[data-cy=add-roles]').click(); cy.get( - '.hub-custom-wizard-layout [data-ouia-component-type="PF5/Pagination"] button:first', + '.pulp-custom-wizard-layout [data-ouia-component-type="PF5/Pagination"] button:first', ).click(); - cy.get('.hub-custom-wizard-layout').contains('100 per page').click(); + cy.get('.pulp-custom-wizard-layout').contains('100 per page').click(); cy.get( `[data-cy="RoleListTable"] [data-cy="RoleListTable-CheckboxRow-row-${testRole.name}"] [type="checkbox"]`, @@ -137,12 +137,12 @@ describe('Group Roles Tests', () => { .click(); cy.get('.pf-v5-c-wizard').contains('Selected roles'); - cy.get(`[data-cy="HubPermission-${testContainerRole.name}"]`); + cy.get(`[data-cy="PulpPermission-${testContainerRole.name}"]`); cy.contains('Next').click(); - cy.get('.hub-custom-wizard-layout').contains(groupName); - cy.get('.hub-custom-wizard-layout').contains(testContainerRole.name); + cy.get('.pulp-custom-wizard-layout').contains(groupName); + cy.get('.pulp-custom-wizard-layout').contains(testContainerRole.name); cy.get('.pf-v5-c-wizard__footer > button') .contains('Add') diff --git a/cypress/e2e/namespaces/menu.js b/cypress/e2e/namespaces/menu.js index 0cc705f..a371893 100644 --- a/cypress/e2e/namespaces/menu.js +++ b/cypress/e2e/namespaces/menu.js @@ -1,4 +1,4 @@ -describe('Hub Menu Tests', () => { +describe('Pulp Menu Tests', () => { const username = 'nopermission'; const password = 'n0permissi0n'; diff --git a/cypress/e2e/namespaces/namespace-detail.js b/cypress/e2e/namespaces/namespace-detail.js index 0e76e1d..8baf540 100644 --- a/cypress/e2e/namespaces/namespace-detail.js +++ b/cypress/e2e/namespaces/namespace-detail.js @@ -30,7 +30,7 @@ describe('Namespace detail screen', () => { cy.get( '[data-cy="CollectionListItem"]:first button[aria-label="Actions"]', ).click(); - cy.contains('.body ul a', 'Deprecate').click(); + cy.contains('.pulp-section ul a', 'Deprecate').click(); // Reload the page cy.visit(`${uiPrefix}namespaces/namespace_detail_test`); diff --git a/cypress/e2e/namespaces/namespace-edit.js b/cypress/e2e/namespaces/namespace-edit.js index c12455e..4f74a9c 100644 --- a/cypress/e2e/namespaces/namespace-edit.js +++ b/cypress/e2e/namespaces/namespace-edit.js @@ -95,7 +95,7 @@ describe('Edit a namespace', () => { ); cy.get('#description').clear().type('A namespace description'); saveButton().click(); - cy.get('.hub-header-bottom').should('contain', 'A namespace description'); + cy.get('.pulp-header-bottom').should('contain', 'A namespace description'); }); it('tests the Links field', () => { diff --git a/cypress/e2e/namespaces/profile.js b/cypress/e2e/namespaces/profile.js index dcdc498..1d825be 100644 --- a/cypress/e2e/namespaces/profile.js +++ b/cypress/e2e/namespaces/profile.js @@ -31,7 +31,7 @@ describe('My Profile Tests', () => { 'password', 'password-confirm', ]; - cy.get('.body').within(() => { + cy.get('.pulp-section').within(() => { // restricted to text input types because there's a checkbox now for the // 'super user' option, but it's disabled. cy.get('input[type="text"]').each(($el) => { diff --git a/cypress/e2e/namespaces/rbac-access.js b/cypress/e2e/namespaces/rbac-access.js index dcec6d2..8c27cf8 100644 --- a/cypress/e2e/namespaces/rbac-access.js +++ b/cypress/e2e/namespaces/rbac-access.js @@ -92,7 +92,7 @@ function testAccessTab({ ).click(); cy.get('strong').contains('Selected group'); - cy.get('.hub-permission').contains('access_group'); + cy.get('.pulp-permission').contains('access_group'); cy.get('footer button').contains('Next').click(); @@ -105,7 +105,7 @@ function testAccessTab({ ).click(); cy.get('strong').contains('Selected roles'); - cy.get('.hub-permission').contains(role); + cy.get('.pulp-permission').contains(role); cy.get('footer button').contains('Next').click(); @@ -113,8 +113,8 @@ function testAccessTab({ cy.get('strong').contains('access_group'); cy.get('strong').contains(role); - cy.get('.hub-permission strong').contains(permissionGroup); - cy.get('.hub-permission').contains(permission); + cy.get('.pulp-permission strong').contains(permissionGroup); + cy.get('.pulp-permission').contains(permission); cy.get('footer button').contains('Add').click(); cy.get('.pf-v5-c-alert__title') diff --git a/cypress/e2e/namespaces/rbac.js b/cypress/e2e/namespaces/rbac.js index 78a3ac7..caf62d8 100644 --- a/cypress/e2e/namespaces/rbac.js +++ b/cypress/e2e/namespaces/rbac.js @@ -72,12 +72,12 @@ describe('RBAC test for user without permissions', () => { // cannot View user cy.menuMissing('User Access > Users'); cy.visit(`${uiPrefix}users`); - cy.contains('You do not have access to Automation Hub'); + cy.contains('You do not have access to Pulp UI'); // cannot Add user cy.contains('Create').should('not.exist'); cy.visit(`${uiPrefix}users/create`); - cy.contains('You do not have access to Automation Hub'); + cy.contains('You do not have access to Pulp UI'); // cannot Change and Delete user cy.visit(`${uiPrefix}users`); @@ -90,7 +90,7 @@ describe('RBAC test for user without permissions', () => { // cannot View group cy.menuMissing('User Access > Groups'); cy.visit(`${uiPrefix}group-list`); - cy.contains('You do not have access to Automation Hub'); + cy.contains('You do not have access to Pulp UI'); // cannot Add group cy.contains('Create').should('not.exist'); diff --git a/cypress/e2e/namespaces/task-list.js b/cypress/e2e/namespaces/task-list.js index c523178..c93f4dd 100644 --- a/cypress/e2e/namespaces/task-list.js +++ b/cypress/e2e/namespaces/task-list.js @@ -8,9 +8,7 @@ describe('Task table contains correct headers and filter', () => { cy.contains('Repositories'); - cy.intercept('POST', `${apiPrefix}content/rh-certified/v3/sync/`).as( - 'sync', - ); + cy.intercept('POST', `${apiPrefix}content/certified/v3/sync/`).as('sync'); cy.intercept('GET', `${apiPrefix}_ui/v1/remotes/?*`).as('remotes'); diff --git a/cypress/e2e/namespaces/task-management-detail.js b/cypress/e2e/namespaces/task-management-detail.js index 2727d86..1597180 100644 --- a/cypress/e2e/namespaces/task-management-detail.js +++ b/cypress/e2e/namespaces/task-management-detail.js @@ -8,9 +8,7 @@ describe('Task detail', () => { cy.contains('Repositories'); - cy.intercept('POST', `${apiPrefix}content/rh-certified/v3/sync/`).as( - 'sync', - ); + cy.intercept('POST', `${apiPrefix}content/certified/v3/sync/`).as('sync'); cy.intercept('GET', `${apiPrefix}_ui/v1/remotes/?*`).as('remotes'); diff --git a/cypress/e2e/namespaces/user-dashboard.js b/cypress/e2e/namespaces/user-dashboard.js index 25712e7..f03c6d8 100644 --- a/cypress/e2e/namespaces/user-dashboard.js +++ b/cypress/e2e/namespaces/user-dashboard.js @@ -1,4 +1,4 @@ -describe('Hub User Management Tests', () => { +describe('Pulp User Management Tests', () => { describe('prevents super-user and self deletion', () => { it("the super-user can't delete themselves", () => { cy.login(); diff --git a/cypress/e2e/namespaces/user-list.js b/cypress/e2e/namespaces/user-list.js index d16937a..a8d189f 100644 --- a/cypress/e2e/namespaces/user-list.js +++ b/cypress/e2e/namespaces/user-list.js @@ -45,39 +45,39 @@ describe('User list tests for sorting, paging and filtering', () => { }); it('paging', () => { - cy.get('.body').contains(items[0]); + cy.get('.pulp-section').contains(items[0]); - cy.get('.body').get('[aria-label="Go to next page"]:first').click(); - cy.get('.body').contains(items[10]); + cy.get('.pulp-section').get('[aria-label="Go to next page"]:first').click(); + cy.get('.pulp-section').contains(items[10]); - cy.get('.body').get('[aria-label="Go to next page"]:first').click(); - cy.get('.body').contains(items[20]); + cy.get('.pulp-section').get('[aria-label="Go to next page"]:first').click(); + cy.get('.pulp-section').contains(items[20]); }); it('sorting', () => { - cy.get('.body').get('[data-cy="sort_username"]').click(); - cy.get('.body tbody tr:first td:first').contains(items[20]); - cy.get('.body').contains(items[0]).should('not.exist'); + cy.get('.pulp-section').get('[data-cy="sort_username"]').click(); + cy.get('.pulp-section tbody tr:first td:first').contains(items[20]); + cy.get('.pulp-section').contains(items[0]).should('not.exist'); }); it('filter', () => { - cy.get('.body') + cy.get('.pulp-section') .get('[aria-label="username__contains"]:first') .type('user_test0{enter}'); - cy.get('.body').contains('user_test0'); - cy.get('.body').contains('user_test1').should('not.exist'); + cy.get('.pulp-section').contains('user_test0'); + cy.get('.pulp-section').contains('user_test1').should('not.exist'); }); it('set page size', () => { - cy.get('.body') + cy.get('.pulp-section') .get('[data-ouia-component-type="PF5/Pagination"] button:first') .click(); - cy.get('.body').contains('20 per page').click(); + cy.get('.pulp-section').contains('20 per page').click(); range(20).forEach((i) => { - cy.get('.body').contains(items[i]); + cy.get('.pulp-section').contains(items[i]); }); - cy.get('.body').contains(items[20]).should('not.exist'); + cy.get('.pulp-section').contains(items[20]).should('not.exist'); }); }); diff --git a/cypress/e2e/repo/container-signing.js b/cypress/e2e/repo/container-signing.js index ce451a2..8d3c2f6 100644 --- a/cypress/e2e/repo/container-signing.js +++ b/cypress/e2e/repo/container-signing.js @@ -52,7 +52,7 @@ describe('Container Signing', () => { cy.login(); cy.visit(`${uiPrefix}containers/remote1`); cy.contains('[data-cy="column-section"]', 'remote1'); - cy.contains('.hub-header-bottom', 'Unsigned', { + cy.contains('.pulp-header-bottom', 'Unsigned', { timeout: 10000, }); @@ -61,7 +61,7 @@ describe('Container Signing', () => { cy.get('button[aria-label="Actions"]').click(); cy.contains('.pf-v5-c-dropdown ul li a', 'Sign').click(); cy.contains('Signing started for container "remote1'); - cy.contains('.hub-header-bottom', 'Signed', { + cy.contains('.pulp-header-bottom', 'Signed', { timeout: 30000, }); }); @@ -70,7 +70,7 @@ describe('Container Signing', () => { cy.login(); cy.visit(`${uiPrefix}containers/remote2`); cy.contains('[data-cy="column-section"]', 'remote2'); - cy.contains('.hub-header-bottom', 'Unsigned', { + cy.contains('.pulp-header-bottom', 'Unsigned', { timeout: 10000, }); @@ -83,14 +83,14 @@ describe('Container Signing', () => { cy.login(); cy.visit(`${uiPrefix}containers/local1`); cy.contains('[data-cy="column-section"]', 'local1'); - cy.contains('.hub-header-bottom', 'Unsigned', { + cy.contains('.pulp-header-bottom', 'Unsigned', { timeout: 10000, }); cy.get('button[aria-label="Actions"]').click(); cy.contains('.pf-v5-c-dropdown ul li a', 'Sign').click(); cy.contains('Signing started for container "local1'); - cy.contains('.hub-header-bottom', 'Signed', { + cy.contains('.pulp-header-bottom', 'Signed', { timeout: 30000, }); }); @@ -100,9 +100,6 @@ describe('Container Signing', () => { cy.visit(`${uiPrefix}containers/local1`); // this is now covered by alert that should not be here in the future cy.get('button[aria-label="Actions"]').click({ force: true }); - cy.contains('[role=menu] li a', 'Use in Controller') - .should('have.attr', 'href') - .and('match', /^http.*\/execution-environments\/add.*local1%3Alatest$/); cy.contains('[role=menu] li', 'Sign').should('not.exist'); }); }); diff --git a/cypress/e2e/repo/repository-list.js b/cypress/e2e/repo/repository-list.js index a1aaecd..7d73431 100644 --- a/cypress/e2e/repo/repository-list.js +++ b/cypress/e2e/repo/repository-list.js @@ -35,7 +35,7 @@ describe('Repository', () => { ).click(); cy.contains('repoListTest1'); - cy.contains('rh-certified'); + cy.contains('certified'); cy.contains('validated'); cy.contains('repoListTest3'); cy.contains('community').should('not.exist'); @@ -46,7 +46,7 @@ describe('Repository', () => { cy.contains('[data-cy="ListPage-AnsibleRepositoryList"]', '11 of 11'); cy.contains('repoListTest1').should('not.exist'); - cy.contains('rh-certified').should('not.exist'); + cy.contains('certified').should('not.exist'); cy.contains('validated').should('not.exist'); cy.contains('repoListTest3').should('not.exist'); cy.contains('community'); @@ -60,7 +60,7 @@ describe('Repository', () => { ).click(); cy.contains('repoListTest1'); - cy.contains('rh-certified'); + cy.contains('certified'); cy.contains('validated').should('not.exist'); cy.contains('repoListTest3'); cy.contains('community'); @@ -70,7 +70,7 @@ describe('Repository', () => { ).click(); cy.contains('repoListTest1').should('not.exist'); - cy.contains('rh-certified').should('not.exist'); + cy.contains('certified').should('not.exist'); cy.contains('validated'); cy.contains('repoListTest3').should('not.exist'); cy.contains('community').should('not.exist'); @@ -88,7 +88,7 @@ describe('Repository', () => { }); cy.contains('community').should('not.exist'); cy.contains('validated').should('not.exist'); - cy.contains('rh-certified').should('not.exist'); + cy.contains('certified').should('not.exist'); cy.get('[data-cy="compound_filter"] input') .clear() @@ -98,7 +98,7 @@ describe('Repository', () => { cy.contains('repoListTest1').should('not.exist'); cy.contains('community').should('not.exist'); cy.contains('validated').should('not.exist'); - cy.contains('rh-certified').should('not.exist'); + cy.contains('certified').should('not.exist'); cy.contains('Clear all filters').click(); @@ -107,7 +107,7 @@ describe('Repository', () => { cy.contains('repoListTest1'); cy.contains('community').should('not.exist'); cy.contains('validated'); - cy.contains('rh-certified'); + cy.contains('certified'); cy.get('[data-cy="compound_filter"] input').clear().type('test{enter}'); @@ -117,7 +117,7 @@ describe('Repository', () => { cy.contains('community').should('not.exist'); cy.contains('validated').should('not.exist'); - cy.contains('rh-certified').should('not.exist'); + cy.contains('certified').should('not.exist'); }); it('tests deletion', () => { diff --git a/cypress/e2e/repo/repository.js b/cypress/e2e/repo/repository.js index 18624a8..c654f4f 100644 --- a/cypress/e2e/repo/repository.js +++ b/cypress/e2e/repo/repository.js @@ -87,7 +87,7 @@ function versionCheck(version) { if (withRemote) { // add remote cy.get('[data-cy="remote"] button').click(); - cy.contains('[data-cy="remote"]', 'rh-certified'); + cy.contains('[data-cy="remote"]', 'certified'); cy.contains('[data-cy="remote"]', 'community'); cy.contains( '[data-cy="remote"] button', diff --git a/cypress/e2e/screenshots/screenshots.js b/cypress/e2e/screenshots/screenshots.js index 1c13527..6f1cfe4 100644 --- a/cypress/e2e/screenshots/screenshots.js +++ b/cypress/e2e/screenshots/screenshots.js @@ -46,7 +46,7 @@ describe('screenshots', () => { screenshot('/tasks', { blackout: ['time'] }); screenshot('/signature-keys', { - blackout: ['time', '[data-cy=hub-signature-list-fingerprint]'], + blackout: ['time', '[data-cy=pulp-signature-list-fingerprint]'], }); screenshot('/users', { blackout: ['time'] }); diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 2f160be..888c025 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -19,9 +19,9 @@ const name2element = (name) => { const [first, last] = name.split(' > '); return last ? cy.get( - `#page-sidebar [data-cy="hub-menu-section-${first}"] [data-cy="hub-menu-item-${last}"]`, + `#page-sidebar [data-cy="pulp-menu-section-${first}"] [data-cy="pulp-menu-item-${last}"]`, ) - : cy.get(`#page-sidebar [data-cy="hub-menu-item-${first}"]`); + : cy.get(`#page-sidebar [data-cy="pulp-menu-item-${first}"]`); }; Cypress.Commands.add('menuPresent', {}, (name) => { @@ -194,7 +194,7 @@ Cypress.Commands.add( cy.get('input[id="upstreamName"]').type(upstream_name); cy.get( - '.hub-formgroup-registry .pf-v5-c-form-control.pf-v5-c-select__toggle-typeahead input', + '.pulp-formgroup-registry .pf-v5-c-form-control.pf-v5-c-select__toggle-typeahead input', ) .click() .type(registry); @@ -318,7 +318,7 @@ Cypress.Commands.add('deleteContainers', {}, () => { Cypress.Commands.add('deleteRepositories', {}, () => { const initRepos = [ 'validated', - 'rh-certified', + 'certified', 'community', 'published', 'rejected', diff --git a/src/actions/ansible-repository-delete.tsx b/src/actions/ansible-repository-delete.tsx index 95dc10c..d97756b 100644 --- a/src/actions/ansible-repository-delete.tsx +++ b/src/actions/ansible-repository-delete.tsx @@ -40,12 +40,12 @@ export const ansibleRepositoryDeleteAction = Action({ disabled: ({ name }) => { if ( [ - 'rh-certified', - 'validated', + 'certified', 'community', 'published', - 'staging', 'rejected', + 'staging', + 'validated', ].includes(name) ) { return t`Protected repositories cannot be deleted.`; diff --git a/src/api/active-user.ts b/src/api/active-user.ts index 098ab87..a8b7005 100644 --- a/src/api/active-user.ts +++ b/src/api/active-user.ts @@ -19,9 +19,6 @@ class API extends HubAPI { return this.http.put(this.apiPath, data); } - // insights has some asinine way of loading tokens that involves forcing the - // page to refresh before loading the token that can't be done witha single - // API request. getToken(): Promise<{ data: { token: string } }> { return this.http.post('v3/auth/token/', {}); } diff --git a/src/app.scss b/src/app.scss index bc3386a..0dda308 100644 --- a/src/app.scss +++ b/src/app.scss @@ -1,33 +1,18 @@ -.body { +// Patternfly expects the root Page component to be the height of the browser window +body, +#root { + height: 100%; +} + +.pulp-section { background-color: white; padding: 16px; } -.clickable { +.pulp-clickable { cursor: pointer; } -#page-sidebar > div { - padding-top: 0; -} - -#page-sidebar { - border-top: solid var(--pf-v5-global--BorderWidth--sm) - var(--pf-v5-global--palette--black-800); -} - -.hub-nav-title { - &.pf-v5-c-nav__section:first-child { - padding-top: 0; - } - - & > .pf-v5-c-nav__section-title { - font-size: var(--pf-v5-c-nav__link--FontSize); - height: 50px; - margin-bottom: 0; - } -} - // this was getting applied globally when it was in the collection-info.scss file // which means other components now rely on it, so I'm just going move it here // so that it's explicitly setting these styles globally. @@ -45,31 +30,16 @@ pre { } } -// Patternfly expects the root Page component to be the height of the browser window -body, -#root { - height: 100%; -} - -// insights mode Sidenav/Navigation overrides this for all navitems, restoring in main -.pf-v5-c-page__main { - .pf-v5-c-nav__list > .pf-v5-c-nav__item:not(:first-child) { - border-top: 0; - } -} - // list screen toolbars -.hub-toolbar { +.pulp-toolbar { display: flex; justify-content: space-between; align-items: center; } -// inline alert inside pf-v5-c-content has big title and extra margin -.hub-content-alert-fix { - .pf-v5-c-alert__title { - margin: 0; - font-size: var(--pf-v5-c-alert__title--FontSize); - font-weight: var(--pf-v5-c-alert__title--FontWeight); - } +// inline alert inside pf-v5-c-content has big title and extra margin otherwise +.pf-v5-c-content .pf-v5-c-alert__title { + margin: 0; + font-size: var(--pf-v5-c-alert__title--FontSize); + font-weight: var(--pf-v5-c-alert__title--FontWeight); } diff --git a/src/components/base-header.tsx b/src/components/base-header.tsx index 642ff0c..dfacebe 100644 --- a/src/components/base-header.tsx +++ b/src/components/base-header.tsx @@ -68,7 +68,7 @@ export const BaseHeader = ({ {versionControl || null} {children ? ( -
+
+
{container.description}