Removing trailing slashes (#12658)
Fix inconsistent domain URL formats : removing the last / that was caused by URL method Standardize URL formatting to ensure consistent links storage and retrieval of domain URLs across the application. Will improve the dedpulicates in the links Note: there is another temporary issue from google that was solved on the 13th of june https://groups.google.com/g/adwords-api/c/tRSQMRZrJYM but we consider this out of this scope Fixes #12621
This commit is contained in:
@ -1 +1,2 @@
|
||||
export const TEST_PRIMARY_LINK_URL = 'https://test.com/';
|
||||
export const TEST_PRIMARY_LINK_URL_WIITHOUT_TRAILING_SLASH = 'https://test.com';
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
import { TEST_COMPANY_1_ID } from 'test/integration/constants/test-company-ids.constants';
|
||||
import { TEST_PERSON_1_ID } from 'test/integration/constants/test-person-ids.constants';
|
||||
import { TEST_PRIMARY_LINK_URL } from 'test/integration/constants/test-primary-link-url.constant';
|
||||
import {
|
||||
TEST_PRIMARY_LINK_URL,
|
||||
TEST_PRIMARY_LINK_URL_WIITHOUT_TRAILING_SLASH,
|
||||
} from 'test/integration/constants/test-primary-link-url.constant';
|
||||
import { TIM_ACCOUNT_ID } from 'test/integration/graphql/integration.constants';
|
||||
import { makeRestAPIRequest } from 'test/integration/rest/utils/make-rest-api-request.util';
|
||||
import { deleteAllRecords } from 'test/integration/utils/delete-all-records';
|
||||
@ -136,7 +139,7 @@ describe('Core REST API Create One endpoint', () => {
|
||||
|
||||
expect(createdPerson.company).toBeDefined();
|
||||
expect(createdPerson.company.domainName.primaryLinkUrl).toBe(
|
||||
TEST_PRIMARY_LINK_URL,
|
||||
TEST_PRIMARY_LINK_URL_WIITHOUT_TRAILING_SLASH,
|
||||
);
|
||||
expect(createdPerson.company.people).not.toBeDefined();
|
||||
});
|
||||
|
||||
@ -5,7 +5,10 @@ import {
|
||||
TEST_PERSON_3_ID,
|
||||
TEST_PERSON_4_ID,
|
||||
} from 'test/integration/constants/test-person-ids.constants';
|
||||
import { TEST_PRIMARY_LINK_URL } from 'test/integration/constants/test-primary-link-url.constant';
|
||||
import {
|
||||
TEST_PRIMARY_LINK_URL,
|
||||
TEST_PRIMARY_LINK_URL_WIITHOUT_TRAILING_SLASH,
|
||||
} from 'test/integration/constants/test-primary-link-url.constant';
|
||||
import { makeRestAPIRequest } from 'test/integration/rest/utils/make-rest-api-request.util';
|
||||
import { deleteAllRecords } from 'test/integration/utils/delete-all-records';
|
||||
import { generateRecordName } from 'test/integration/utils/generate-record-name';
|
||||
@ -453,7 +456,7 @@ describe('Core REST API Find Many endpoint', () => {
|
||||
|
||||
expect(person.company).toBeDefined();
|
||||
expect(person.company.domainName.primaryLinkUrl).toBe(
|
||||
TEST_PRIMARY_LINK_URL,
|
||||
TEST_PRIMARY_LINK_URL_WIITHOUT_TRAILING_SLASH,
|
||||
);
|
||||
|
||||
expect(person.company.people).not.toBeDefined();
|
||||
|
||||
@ -3,7 +3,10 @@ import {
|
||||
NOT_EXISTING_TEST_PERSON_ID,
|
||||
TEST_PERSON_1_ID,
|
||||
} from 'test/integration/constants/test-person-ids.constants';
|
||||
import { TEST_PRIMARY_LINK_URL } from 'test/integration/constants/test-primary-link-url.constant';
|
||||
import {
|
||||
TEST_PRIMARY_LINK_URL,
|
||||
TEST_PRIMARY_LINK_URL_WIITHOUT_TRAILING_SLASH,
|
||||
} from 'test/integration/constants/test-primary-link-url.constant';
|
||||
import { makeRestAPIRequest } from 'test/integration/rest/utils/make-rest-api-request.util';
|
||||
import { deleteAllRecords } from 'test/integration/utils/delete-all-records';
|
||||
import { generateRecordName } from 'test/integration/utils/generate-record-name';
|
||||
@ -106,7 +109,7 @@ describe('Core REST API Find One endpoint', () => {
|
||||
|
||||
expect(person.company).toBeDefined();
|
||||
expect(person.company.domainName.primaryLinkUrl).toBe(
|
||||
TEST_PRIMARY_LINK_URL,
|
||||
TEST_PRIMARY_LINK_URL_WIITHOUT_TRAILING_SLASH,
|
||||
);
|
||||
expect(person.company.people).not.toBeDefined();
|
||||
});
|
||||
|
||||
@ -1,12 +1,15 @@
|
||||
import { TEST_COMPANY_1_ID } from 'test/integration/constants/test-company-ids.constants';
|
||||
import {
|
||||
NOT_EXISTING_TEST_PERSON_ID,
|
||||
TEST_PERSON_1_ID,
|
||||
} from 'test/integration/constants/test-person-ids.constants';
|
||||
import {
|
||||
TEST_PRIMARY_LINK_URL,
|
||||
TEST_PRIMARY_LINK_URL_WIITHOUT_TRAILING_SLASH,
|
||||
} from 'test/integration/constants/test-primary-link-url.constant';
|
||||
import { makeRestAPIRequest } from 'test/integration/rest/utils/make-rest-api-request.util';
|
||||
import { generateRecordName } from 'test/integration/utils/generate-record-name';
|
||||
import { TEST_COMPANY_1_ID } from 'test/integration/constants/test-company-ids.constants';
|
||||
import { TEST_PRIMARY_LINK_URL } from 'test/integration/constants/test-primary-link-url.constant';
|
||||
import { deleteAllRecords } from 'test/integration/utils/delete-all-records';
|
||||
import { generateRecordName } from 'test/integration/utils/generate-record-name';
|
||||
|
||||
describe('Core REST API Update One endpoint', () => {
|
||||
const updatedData = {
|
||||
@ -96,7 +99,7 @@ describe('Core REST API Update One endpoint', () => {
|
||||
|
||||
expect(updatedPerson.company).toBeDefined();
|
||||
expect(updatedPerson.company.domainName.primaryLinkUrl).toBe(
|
||||
TEST_PRIMARY_LINK_URL,
|
||||
TEST_PRIMARY_LINK_URL_WIITHOUT_TRAILING_SLASH,
|
||||
);
|
||||
expect(updatedPerson.company.people).not.toBeDefined();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user