Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions cypress/support/api/tenant.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { DEFAULT_LOCALE_OBJECT } from '../constants';

const localeConfigName = 'tenantLocaleSettings';

Cypress.Commands.add('getConfigForTenantByName', (configName) => {
cy.okapiRequest({
method: 'GET',
Expand Down Expand Up @@ -71,11 +69,10 @@ Cypress.Commands.add('getTenantsApi', () => {
});

Cypress.Commands.add('setDefaultLocaleApi', () => {
cy.getConfigForTenantByName(localeConfigName).then((config) => {
if (config) {
const updatedConfig = { ...config };
updatedConfig.value = DEFAULT_LOCALE_OBJECT;
cy.updateConfigForTenantById(config.id, updatedConfig);
}
return cy.okapiRequest({
method: 'PUT',
path: 'locale',
isDefaultSearchParamsRequired: false,
body: DEFAULT_LOCALE_OBJECT,
});
});
10 changes: 8 additions & 2 deletions cypress/support/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -1243,8 +1243,14 @@ export const CLASSIFICATION_IDENTIFIER_TYPES = {
UDC: 'e8662436-75a8-4984-bebc-531e38c774a0',
};

export const DEFAULT_LOCALE_STRING = '{"locale":"en-US","timezone":"UTC","currency":"USD"}';
export const DEFAULT_LOCALE_OBJECT = { locale: 'en-US', timezone: 'UTC', currency: 'USD' };
export const DEFAULT_LOCALE_STRING =
'{"locale":"en-US","timezone":"UTC","currency":"USD","numberingSystem":"latn"}';
export const DEFAULT_LOCALE_OBJECT = {
locale: 'en-US',
timezone: 'UTC',
currency: 'USD',
numberingSystem: 'latn',
};

export const BULK_EDIT_TABLE_COLUMN_HEADERS = {
INVENTORY_HOLDINGS: {
Expand Down
Loading