Datasets:
File size: 86,596 Bytes
dbe005a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 | import { test, expect } from '@playwright/test';
test.describe('Functional - homepage', () => {
test('homepage: title matches GT', async ({ page }) => {
await page.goto('/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('cresvia');
});
test('homepage: h1 "Grow your money quietly, on au"', async ({ page }) => {
await page.goto('/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Grow your money quietly, on autopilot' || t.startsWith('Grow your money quietly, on autopilot'))).toBeTruthy();
});
test('homepage: h1 "Invest with fewer tax headache"', async ({ page }) => {
await page.goto('/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Invest with fewer tax headaches' || t.startsWith('Invest with fewer tax headaches'))).toBeTruthy();
});
test('homepage: h2 "Hands-off investing"', async ({ page }) => {
await page.goto('/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Hands-off investing' || t.startsWith('Hands-off investing'))).toBeTruthy();
});
test('homepage: nav link "Individuals"', async ({ page }) => {
await page.goto('/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Individuals' || t.startsWith('Individuals')), 'link text in nav').toBeTruthy();
});
test('homepage: nav link "Employers"', async ({ page }) => {
await page.goto('/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Employers' || t.startsWith('Employers')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('work')), 'href fragment present').toBeTruthy();
});
test('homepage: nav link "Advisors"', async ({ page }) => {
await page.goto('/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Advisors' || t.startsWith('Advisors')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('advisors')), 'href fragment present').toBeTruthy();
});
test('homepage: nav link "Automated investing A globally"', async ({ page }) => {
await page.goto('/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Automated investing A globally diversified mix, with all tra' || t.startsWith('Automated investing A globally diversified mix, with all tra')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('investing')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - a10', () => {
test('a10: title matches GT', async ({ page }) => {
await page.goto('/a10/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('automated investing');
});
test('a10: h1 "Wealth on autopilot"', async ({ page }) => {
await page.goto('/a10/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Wealth on autopilot' || t.startsWith('Wealth on autopilot'))).toBeTruthy();
});
test('a10: h2 "Welcome to a smarter way to in"', async ({ page }) => {
await page.goto('/a10/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Welcome to a smarter way to invest' || t.startsWith('Welcome to a smarter way to invest'))).toBeTruthy();
});
test('a10: h2 "The fundamentals of investing"', async ({ page }) => {
await page.goto('/a10/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'The fundamentals of investing' || t.startsWith('The fundamentals of investing'))).toBeTruthy();
});
test('a10: h2 "Debt feels heavy. Your plan do"', async ({ page }) => {
await page.goto('/a10/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Debt feels heavy. Your plan doesn\'t have to.' || t.startsWith('Debt feels heavy. Your plan doesn\'t have to.'))).toBeTruthy();
});
test('a10: nav link "Households"', async ({ page }) => {
await page.goto('/a10/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Households' || t.startsWith('Households')), 'link text in nav').toBeTruthy();
});
test('a10: nav link "Businesses"', async ({ page }) => {
await page.goto('/a10/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Businesses' || t.startsWith('Businesses')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('work')), 'href fragment present').toBeTruthy();
});
test('a10: nav link "Planners"', async ({ page }) => {
await page.goto('/a10/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Planners' || t.startsWith('Planners')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('advisors')), 'href fragment present').toBeTruthy();
});
test('a10: nav link "Hands-off investing Broadly di"', async ({ page }) => {
await page.goto('/a10/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Hands-off investing Broadly diversified across markets, with' || t.startsWith('Hands-off investing Broadly diversified across markets, with')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('investing')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - affiliate_partner_offer', () => {
test('affiliate_partner_offer: title matches GT', async ({ page }) => {
await page.goto('/affiliate-partner-offer/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('special offer');
});
test('affiliate_partner_offer: h1 "New member offer Grow faster w"', async ({ page }) => {
await page.goto('/affiliate-partner-offer/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'New member offer Grow faster with a boost on your balance' || t.startsWith('New member offer Grow faster with a boost on your balance'))).toBeTruthy();
});
test('affiliate_partner_offer: h2 "See how Cresvia’s Cash Reserve"', async ({ page }) => {
await page.goto('/affiliate-partner-offer/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'See how Cresvia’s Cash Reserve stacks up' || t.startsWith('See how Cresvia’s Cash Reserve stacks up'))).toBeTruthy();
});
test('affiliate_partner_offer: h2 "What makes Cresvia’s Cash Rese"', async ({ page }) => {
await page.goto('/affiliate-partner-offer/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'What makes Cresvia’s Cash Reserve better?' || t.startsWith('What makes Cresvia’s Cash Reserve better?'))).toBeTruthy();
});
test('affiliate_partner_offer: h2 "Unlock a higher APY."', async ({ page }) => {
await page.goto('/affiliate-partner-offer/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Unlock a higher APY.' || t.startsWith('Unlock a higher APY.'))).toBeTruthy();
});
test('affiliate_partner_offer: nav link "For members"', async ({ page }) => {
await page.goto('/affiliate-partner-offer/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'For members' || t.startsWith('For members')), 'link text in nav').toBeTruthy();
});
test('affiliate_partner_offer: nav link "Companies"', async ({ page }) => {
await page.goto('/affiliate-partner-offer/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Companies' || t.startsWith('Companies')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('work')), 'href fragment present').toBeTruthy();
});
test('affiliate_partner_offer: nav link "Planners"', async ({ page }) => {
await page.goto('/affiliate-partner-offer/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Planners' || t.startsWith('Planners')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('advisors')), 'href fragment present').toBeTruthy();
});
test('affiliate_partner_offer: nav link "Automated portfolios Broadly d"', async ({ page }) => {
await page.goto('/affiliate-partner-offer/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Automated portfolios Broadly diversified worldwide, with eve' || t.startsWith('Automated portfolios Broadly diversified worldwide, with eve')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('investing')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - award_disclosures', () => {
test('award_disclosures: title matches GT', async ({ page }) => {
await page.goto('/award-disclosures/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('award disclosures');
});
test('award_disclosures: h1 "Award Disclosures"', async ({ page }) => {
await page.goto('/award-disclosures/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Award Disclosures' || t.startsWith('Award Disclosures'))).toBeTruthy();
});
test('award_disclosures: h3 "Accounts"', async ({ page }) => {
await page.goto('/award-disclosures/');
const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Accounts' || t.startsWith('Accounts'))).toBeTruthy();
});
test('award_disclosures: h3 "Tools"', async ({ page }) => {
await page.goto('/award-disclosures/');
const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Tools' || t.startsWith('Tools'))).toBeTruthy();
});
test('award_disclosures: h3 "Service"', async ({ page }) => {
await page.goto('/award-disclosures/');
const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Service' || t.startsWith('Service'))).toBeTruthy();
});
test('award_disclosures: nav link "Individuals"', async ({ page }) => {
await page.goto('/award-disclosures/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Individuals' || t.startsWith('Individuals')), 'link text in nav').toBeTruthy();
});
test('award_disclosures: nav link "Employers"', async ({ page }) => {
await page.goto('/award-disclosures/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Employers' || t.startsWith('Employers')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('work')), 'href fragment present').toBeTruthy();
});
test('award_disclosures: nav link "Advisors"', async ({ page }) => {
await page.goto('/award-disclosures/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Advisors' || t.startsWith('Advisors')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('advisors')), 'href fragment present').toBeTruthy();
});
test('award_disclosures: nav link "Automated investing A globally"', async ({ page }) => {
await page.goto('/award-disclosures/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Automated investing A globally diversified portfolio with tr' || t.startsWith('Automated investing A globally diversified portfolio with tr')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('investing')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - b4a_homepage_lets_talk', () => {
test('b4a_homepage_lets_talk: title matches GT', async ({ page }) => {
await page.goto('/b4a-homepage-lets-talk/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('cresvia advisor solutions');
});
test('b4a_homepage_lets_talk: h1 "Grow your practice with ease"', async ({ page }) => {
await page.goto('/b4a-homepage-lets-talk/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Grow your practice with ease' || t.startsWith('Grow your practice with ease'))).toBeTruthy();
});
test('b4a_homepage_lets_talk: h2 "Technology that keeps pace wit"', async ({ page }) => {
await page.goto('/b4a-homepage-lets-talk/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Technology that keeps pace with you.' || t.startsWith('Technology that keeps pace with you.'))).toBeTruthy();
});
test('b4a_homepage_lets_talk: h2 "See Cresvia Advisor Solutions "', async ({ page }) => {
await page.goto('/b4a-homepage-lets-talk/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'See Cresvia Advisor Solutions in action.' || t.startsWith('See Cresvia Advisor Solutions in action.'))).toBeTruthy();
});
test('b4a_homepage_lets_talk: h2 "Service and support built to g"', async ({ page }) => {
await page.goto('/b4a-homepage-lets-talk/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Service and support built to grow your RIA.' || t.startsWith('Service and support built to grow your RIA.'))).toBeTruthy();
});
test('b4a_homepage_lets_talk: nav link "Individuals"', async ({ page }) => {
await page.goto('/b4a-homepage-lets-talk/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Individuals' || t.startsWith('Individuals')), 'link text in nav').toBeTruthy();
});
test('b4a_homepage_lets_talk: nav link "Employers"', async ({ page }) => {
await page.goto('/b4a-homepage-lets-talk/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Employers' || t.startsWith('Employers')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('work')), 'href fragment present').toBeTruthy();
});
test('b4a_homepage_lets_talk: nav link "Advisors"', async ({ page }) => {
await page.goto('/b4a-homepage-lets-talk/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Advisors' || t.startsWith('Advisors')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('advisors')), 'href fragment present').toBeTruthy();
});
test('b4a_homepage_lets_talk: header link "Cresvia for Advisor Solutions "', async ({ page }) => {
await page.goto('/b4a-homepage-lets-talk/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Cresvia for Advisor Solutions LogoCresvia' || t.startsWith('Cresvia for Advisor Solutions LogoCresvia')), 'link text in header').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('advisors')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - cresvia_checking_disclosure', () => {
test('cresvia_checking_disclosure: title matches GT', async ({ page }) => {
await page.goto('/cresvia-checking-disclosure/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('everyday checking disclosure');
});
test('cresvia_checking_disclosure: h1 "Cresvia Checking Disclosure"', async ({ page }) => {
await page.goto('/cresvia-checking-disclosure/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Cresvia Checking Disclosure' || t.startsWith('Cresvia Checking Disclosure'))).toBeTruthy();
});
test('cresvia_checking_disclosure: h3 "Accounts"', async ({ page }) => {
await page.goto('/cresvia-checking-disclosure/');
const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Accounts' || t.startsWith('Accounts'))).toBeTruthy();
});
test('cresvia_checking_disclosure: h3 "Tools"', async ({ page }) => {
await page.goto('/cresvia-checking-disclosure/');
const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Tools' || t.startsWith('Tools'))).toBeTruthy();
});
test('cresvia_checking_disclosure: h3 "Service"', async ({ page }) => {
await page.goto('/cresvia-checking-disclosure/');
const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Service' || t.startsWith('Service'))).toBeTruthy();
});
test('cresvia_checking_disclosure: nav link "Individuals"', async ({ page }) => {
await page.goto('/cresvia-checking-disclosure/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Individuals' || t.startsWith('Individuals')), 'link text in nav').toBeTruthy();
});
test('cresvia_checking_disclosure: nav link "Employers"', async ({ page }) => {
await page.goto('/cresvia-checking-disclosure/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Employers' || t.startsWith('Employers')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('work')), 'href fragment present').toBeTruthy();
});
test('cresvia_checking_disclosure: nav link "Advisors"', async ({ page }) => {
await page.goto('/cresvia-checking-disclosure/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Advisors' || t.startsWith('Advisors')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('advisors')), 'href fragment present').toBeTruthy();
});
test('cresvia_checking_disclosure: nav link "Hands-off investing Broadly di"', async ({ page }) => {
await page.goto('/cresvia-checking-disclosure/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Hands-off investing Broadly diversified holdings, with every' || t.startsWith('Hands-off investing Broadly diversified holdings, with every')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('investing')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - catalant', () => {
test('catalant: title matches GT', async ({ page }) => {
await page.goto('/catalant/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('automated investing');
});
test('catalant: h1 "Effortless investing"', async ({ page }) => {
await page.goto('/catalant/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Effortless investing' || t.startsWith('Effortless investing'))).toBeTruthy();
});
test('catalant: h1 "\$0 in management fees for six "', async ({ page }) => {
await page.goto('/catalant/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === '\$0 in management fees for six months' || t.startsWith('\$0 in management fees for six months'))).toBeTruthy();
});
test('catalant: h2 "A trusted name in automated mo"', async ({ page }) => {
await page.goto('/catalant/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'A trusted name in automated money management, blending smart technology with real human expertise.' || t.startsWith('A trusted name in automated money management, blending smart technology with real human expertise.'))).toBeTruthy();
});
test('catalant: h2 "Investing built around your go"', async ({ page }) => {
await page.goto('/catalant/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Investing built around your goals.' || t.startsWith('Investing built around your goals.'))).toBeTruthy();
});
test('catalant: nav link "Individuals"', async ({ page }) => {
await page.goto('/catalant/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Individuals' || t.startsWith('Individuals')), 'link text in nav').toBeTruthy();
});
test('catalant: nav link "Employers"', async ({ page }) => {
await page.goto('/catalant/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Employers' || t.startsWith('Employers')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('work')), 'href fragment present').toBeTruthy();
});
test('catalant: nav link "Advisors"', async ({ page }) => {
await page.goto('/catalant/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Advisors' || t.startsWith('Advisors')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('advisors')), 'href fragment present').toBeTruthy();
});
test('catalant: nav link "Automated investing Broadly di"', async ({ page }) => {
await page.goto('/catalant/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Automated investing Broadly diversified, with all trading, r' || t.startsWith('Automated investing Broadly diversified, with all trading, r')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('investing')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - concierge', () => {
test('concierge: title matches GT', async ({ page }) => {
await page.goto('/concierge/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('personal concierge');
});
test('concierge: h1 "Get going with an advisor at y"', async ({ page }) => {
await page.goto('/concierge/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Get going with an advisor at your side' || t.startsWith('Get going with an advisor at your side'))).toBeTruthy();
});
test('concierge: h2 "Money decisions can feel compl"', async ({ page }) => {
await page.goto('/concierge/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Money decisions can feel complicated. Here\'s how we help:' || t.startsWith('Money decisions can feel complicated. Here\'s how we help:'))).toBeTruthy();
});
test('concierge: h2 "Questions we hear the most:"', async ({ page }) => {
await page.goto('/concierge/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Questions we hear the most:' || t.startsWith('Questions we hear the most:'))).toBeTruthy();
});
test('concierge: h2 "Ready to speak with an expert?"', async ({ page }) => {
await page.goto('/concierge/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Ready to speak with an expert?' || t.startsWith('Ready to speak with an expert?'))).toBeTruthy();
});
test('concierge: nav link "Individuals"', async ({ page }) => {
await page.goto('/concierge/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Individuals' || t.startsWith('Individuals')), 'link text in nav').toBeTruthy();
});
test('concierge: nav link "Employers"', async ({ page }) => {
await page.goto('/concierge/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Employers' || t.startsWith('Employers')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('work')), 'href fragment present').toBeTruthy();
});
test('concierge: nav link "Advisors"', async ({ page }) => {
await page.goto('/concierge/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Advisors' || t.startsWith('Advisors')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('advisors')), 'href fragment present').toBeTruthy();
});
test('concierge: nav link "Automated investing A globally"', async ({ page }) => {
await page.goto('/concierge/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Automated investing A globally diversified portfolio with tr' || t.startsWith('Automated investing A globally diversified portfolio with tr')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('investing')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - goals_quiz', () => {
test('goals_quiz: page loads without error', async ({ page }) => {
const response = await page.goto('/goals-quiz/');
expect(response?.status()).toBeLessThan(400);
await expect(page.locator('body')).toBeVisible();
});
test('goals_quiz: title matches GT', async ({ page }) => {
await page.goto('/goals-quiz/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('get started with cresvia');
});
test('goals_quiz: h2 "Which starting point feels rig"', async ({ page }) => {
await page.goto('/goals-quiz/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Which starting point feels right?' || t.startsWith('Which starting point feels right?'))).toBeTruthy();
});
test('goals_quiz: h3 "Accounts"', async ({ page }) => {
await page.goto('/goals-quiz/');
const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Accounts' || t.startsWith('Accounts'))).toBeTruthy();
});
test('goals_quiz: h3 "Guidance"', async ({ page }) => {
await page.goto('/goals-quiz/');
const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Guidance' || t.startsWith('Guidance'))).toBeTruthy();
});
test('goals_quiz: h3 "Workplace retirement benefits"', async ({ page }) => {
await page.goto('/goals-quiz/');
const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Workplace retirement benefits' || t.startsWith('Workplace retirement benefits'))).toBeTruthy();
});
test('goals_quiz: header link "Cresvia LogoCresvia"', async ({ page }) => {
await page.goto('/goals-quiz/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Cresvia LogoCresvia' || t.startsWith('Cresvia LogoCresvia')), 'link text in header').toBeTruthy();
});
test('goals_quiz: nav link "Support Hub"', async ({ page }) => {
await page.goto('/goals-quiz/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Support Hub' || t.startsWith('Support Hub')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('help')), 'href fragment present').toBeTruthy();
});
test('goals_quiz: nav link "Reach out"', async ({ page }) => {
await page.goto('/goals-quiz/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Reach out' || t.startsWith('Reach out')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('contact')), 'href fragment present').toBeTruthy();
});
test('goals_quiz: footer link "Partner Banks"', async ({ page }) => {
await page.goto('/goals-quiz/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Partner Banks' || t.startsWith('Partner Banks')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('cash-portfolio')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - goldman_sachs_tax_smart_bonds', () => {
test('goldman_sachs_tax_smart_bonds: title matches GT', async ({ page }) => {
await page.goto('/goldman-sachs-tax-smart-bonds/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('tax');
});
test('goldman_sachs_tax_smart_bonds: h1 "Kestrelmark Tax-Smart Bonds Po"', async ({ page }) => {
await page.goto('/goldman-sachs-tax-smart-bonds/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Kestrelmark Tax-Smart Bonds Portfolio' || t.startsWith('Kestrelmark Tax-Smart Bonds Portfolio'))).toBeTruthy();
});
test('goldman_sachs_tax_smart_bonds: h1 "Kestrelmark Tax-Smart Bonds"', async ({ page }) => {
await page.goto('/goldman-sachs-tax-smart-bonds/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Kestrelmark Tax-Smart Bonds' || t.startsWith('Kestrelmark Tax-Smart Bonds'))).toBeTruthy();
});
test('goldman_sachs_tax_smart_bonds: h2 "More Helpful Resources"', async ({ page }) => {
await page.goto('/goldman-sachs-tax-smart-bonds/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'More Helpful Resources' || t.startsWith('More Helpful Resources'))).toBeTruthy();
});
test('goldman_sachs_tax_smart_bonds: h2 "Get invested."', async ({ page }) => {
await page.goto('/goldman-sachs-tax-smart-bonds/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Get invested.' || t.startsWith('Get invested.'))).toBeTruthy();
});
test('goldman_sachs_tax_smart_bonds: nav link "For Members"', async ({ page }) => {
await page.goto('/goldman-sachs-tax-smart-bonds/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'For Members' || t.startsWith('For Members')), 'link text in nav').toBeTruthy();
});
test('goldman_sachs_tax_smart_bonds: nav link "Workplace"', async ({ page }) => {
await page.goto('/goldman-sachs-tax-smart-bonds/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Workplace' || t.startsWith('Workplace')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('work')), 'href fragment present').toBeTruthy();
});
test('goldman_sachs_tax_smart_bonds: nav link "Planners"', async ({ page }) => {
await page.goto('/goldman-sachs-tax-smart-bonds/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Planners' || t.startsWith('Planners')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('advisors')), 'href fragment present').toBeTruthy();
});
test('goldman_sachs_tax_smart_bonds: nav link "Hands-off investing A globally"', async ({ page }) => {
await page.goto('/goldman-sachs-tax-smart-bonds/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Hands-off investing A globally diversified account where eve' || t.startsWith('Hands-off investing A globally diversified account where eve')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('investing')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - how_it_works', () => {
test('how_it_works: title matches GT', async ({ page }) => {
await page.goto('/how-it-works/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('cresvia');
});
test('how_it_works: h1 "How Cresvia works"', async ({ page }) => {
await page.goto('/how-it-works/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'How Cresvia works' || t.startsWith('How Cresvia works'))).toBeTruthy();
});
test('how_it_works: h2 "How our tools support every st"', async ({ page }) => {
await page.goto('/how-it-works/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'How our tools support every stage of your financial life:' || t.startsWith('How our tools support every stage of your financial life:'))).toBeTruthy();
});
test('how_it_works: h2 "Step 1 Share what you’d like t"', async ({ page }) => {
await page.goto('/how-it-works/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Step 1 Share what you’d like to do with your money.' || t.startsWith('Step 1 Share what you’d like to do with your money.'))).toBeTruthy();
});
test('how_it_works: h2 "Step 2 We’ll set up your accou"', async ({ page }) => {
await page.goto('/how-it-works/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Step 2 We’ll set up your account.' || t.startsWith('Step 2 We’ll set up your account.'))).toBeTruthy();
});
test('how_it_works: nav link "Individuals"', async ({ page }) => {
await page.goto('/how-it-works/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Individuals' || t.startsWith('Individuals')), 'link text in nav').toBeTruthy();
});
test('how_it_works: nav link "Employers"', async ({ page }) => {
await page.goto('/how-it-works/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Employers' || t.startsWith('Employers')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('work')), 'href fragment present').toBeTruthy();
});
test('how_it_works: nav link "Advisors"', async ({ page }) => {
await page.goto('/how-it-works/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Advisors' || t.startsWith('Advisors')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('advisors')), 'href fragment present').toBeTruthy();
});
test('how_it_works: nav link "Automated investing Broadly di"', async ({ page }) => {
await page.goto('/how-it-works/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Automated investing Broadly diversified across markets, with' || t.startsWith('Automated investing Broadly diversified across markets, with')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('investing')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - investments', () => {
test('investments: title matches GT', async ({ page }) => {
await page.goto('/investments/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('portfolio options');
});
test('investments: h1 "Curated portfolios built by pr"', async ({ page }) => {
await page.goto('/investments/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Curated portfolios built by pros' || t.startsWith('Curated portfolios built by pros'))).toBeTruthy();
});
test('investments: h2 "Portfolio picks"', async ({ page }) => {
await page.goto('/investments/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Portfolio picks' || t.startsWith('Portfolio picks'))).toBeTruthy();
});
test('investments: h2 "Make the portfolio yours."', async ({ page }) => {
await page.goto('/investments/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Make the portfolio yours.' || t.startsWith('Make the portfolio yours.'))).toBeTruthy();
});
test('investments: h2 "Get invested."', async ({ page }) => {
await page.goto('/investments/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Get invested.' || t.startsWith('Get invested.'))).toBeTruthy();
});
test('investments: nav link "Individuals"', async ({ page }) => {
await page.goto('/investments/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Individuals' || t.startsWith('Individuals')), 'link text in nav').toBeTruthy();
});
test('investments: nav link "Employers"', async ({ page }) => {
await page.goto('/investments/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Employers' || t.startsWith('Employers')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('work')), 'href fragment present').toBeTruthy();
});
test('investments: nav link "Advisors"', async ({ page }) => {
await page.goto('/investments/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Advisors' || t.startsWith('Advisors')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('advisors')), 'href fragment present').toBeTruthy();
});
test('investments: nav link "Hands-off investing Broadly di"', async ({ page }) => {
await page.goto('/investments/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Hands-off investing Broadly diversified holdings with every ' || t.startsWith('Hands-off investing Broadly diversified holdings with every ')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('investing')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - legal', () => {
test('legal: title matches GT', async ({ page }) => {
await page.goto('/legal/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('legal resources');
});
test('legal: h1 "Legal resources"', async ({ page }) => {
await page.goto('/legal/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Legal resources' || t.startsWith('Legal resources'))).toBeTruthy();
});
test('legal: h3 "Terms"', async ({ page }) => {
await page.goto('/legal/');
const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Terms' || t.startsWith('Terms'))).toBeTruthy();
});
test('legal: h3 "Policies"', async ({ page }) => {
await page.goto('/legal/');
const texts = (await page.locator('h3').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Policies' || t.startsWith('Policies'))).toBeTruthy();
});
test('legal: nav link "Individuals"', async ({ page }) => {
await page.goto('/legal/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Individuals' || t.startsWith('Individuals')), 'link text in nav').toBeTruthy();
});
test('legal: nav link "Businesses"', async ({ page }) => {
await page.goto('/legal/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Businesses' || t.startsWith('Businesses')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('work')), 'href fragment present').toBeTruthy();
});
test('legal: nav link "Advisors"', async ({ page }) => {
await page.goto('/legal/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Advisors' || t.startsWith('Advisors')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('advisors')), 'href fragment present').toBeTruthy();
});
test('legal: nav link "Hands-off investing Broadly di"', async ({ page }) => {
await page.goto('/legal/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Hands-off investing Broadly diversified worldwide, with ever' || t.startsWith('Hands-off investing Broadly diversified worldwide, with ever')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('investing')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - mobile_app', () => {
test('mobile_app: title matches GT', async ({ page }) => {
await page.goto('/mobile-app/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('cresvia mobile app');
});
test('mobile_app: h1 "Grow your money anywhere"', async ({ page }) => {
await page.goto('/mobile-app/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Grow your money anywhere' || t.startsWith('Grow your money anywhere'))).toBeTruthy();
});
test('mobile_app: h2 "A money app designed around yo"', async ({ page }) => {
await page.goto('/mobile-app/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'A money app designed around your life.' || t.startsWith('A money app designed around your life.'))).toBeTruthy();
});
test('mobile_app: h2 "View your full story."', async ({ page }) => {
await page.goto('/mobile-app/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'View your full story.' || t.startsWith('View your full story.'))).toBeTruthy();
});
test('mobile_app: h2 "Manage funds anywhere."', async ({ page }) => {
await page.goto('/mobile-app/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Manage funds anywhere.' || t.startsWith('Manage funds anywhere.'))).toBeTruthy();
});
test('mobile_app: nav link "Individuals"', async ({ page }) => {
await page.goto('/mobile-app/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Individuals' || t.startsWith('Individuals')), 'link text in nav').toBeTruthy();
});
test('mobile_app: nav link "Employers"', async ({ page }) => {
await page.goto('/mobile-app/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Employers' || t.startsWith('Employers')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('work')), 'href fragment present').toBeTruthy();
});
test('mobile_app: nav link "Advisors"', async ({ page }) => {
await page.goto('/mobile-app/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Advisors' || t.startsWith('Advisors')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('advisors')), 'href fragment present').toBeTruthy();
});
test('mobile_app: nav link "Hands-off investing Broadly di"', async ({ page }) => {
await page.goto('/mobile-app/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Hands-off investing Broadly diversified across markets, with' || t.startsWith('Hands-off investing Broadly diversified across markets, with')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('investing')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - pricing', () => {
test('pricing: title matches GT', async ({ page }) => {
await page.goto('/pricing/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('cresvia\'s pricing');
});
test('pricing: h1 "One fair fee, built around you"', async ({ page }) => {
await page.goto('/pricing/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'One fair fee, built around you' || t.startsWith('One fair fee, built around you'))).toBeTruthy();
});
test('pricing: h1 "0.25%"', async ({ page }) => {
await page.goto('/pricing/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === '0.25%' || t.startsWith('0.25%'))).toBeTruthy();
});
test('pricing: h2 "What does automated investing "', async ({ page }) => {
await page.goto('/pricing/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'What does automated investing cost?' || t.startsWith('What does automated investing cost?'))).toBeTruthy();
});
test('pricing: h2 "Investing in your future shoul"', async ({ page }) => {
await page.goto('/pricing/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Investing in your future should pay you back.' || t.startsWith('Investing in your future should pay you back.'))).toBeTruthy();
});
test('pricing: nav link "Individuals"', async ({ page }) => {
await page.goto('/pricing/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Individuals' || t.startsWith('Individuals')), 'link text in nav').toBeTruthy();
});
test('pricing: nav link "Employers"', async ({ page }) => {
await page.goto('/pricing/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Employers' || t.startsWith('Employers')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('work')), 'href fragment present').toBeTruthy();
});
test('pricing: nav link "Advisors"', async ({ page }) => {
await page.goto('/pricing/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Advisors' || t.startsWith('Advisors')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('advisors')), 'href fragment present').toBeTruthy();
});
test('pricing: nav link "Automated investing Broadly di"', async ({ page }) => {
await page.goto('/pricing/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Automated investing Broadly diversified portfolios with all ' || t.startsWith('Automated investing Broadly diversified portfolios with all ')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('investing')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - refer_a_friend_offer', () => {
test('refer_a_friend_offer: title matches GT', async ({ page }) => {
await page.goto('/refer-a-friend-offer/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('limited offer');
});
test('refer_a_friend_offer: h1 "Existing members: earn extra r"', async ({ page }) => {
await page.goto('/refer-a-friend-offer/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Existing members: earn extra rewards for every referral' || t.startsWith('Existing members: earn extra rewards for every referral'))).toBeTruthy();
});
test('refer_a_friend_offer: h2 "See how Cresvia\'s Cash Reserve"', async ({ page }) => {
await page.goto('/refer-a-friend-offer/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'See how Cresvia\'s Cash Reserve compares today' || t.startsWith('See how Cresvia\'s Cash Reserve compares today'))).toBeTruthy();
});
test('refer_a_friend_offer: h2 "Why choose Cresvia\'s Cash Rese"', async ({ page }) => {
await page.goto('/refer-a-friend-offer/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Why choose Cresvia\'s Cash Reserve account?' || t.startsWith('Why choose Cresvia\'s Cash Reserve account?'))).toBeTruthy();
});
test('refer_a_friend_offer: h2 "Get a stronger APY."', async ({ page }) => {
await page.goto('/refer-a-friend-offer/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Get a stronger APY.' || t.startsWith('Get a stronger APY.'))).toBeTruthy();
});
test('refer_a_friend_offer: nav link "Individuals"', async ({ page }) => {
await page.goto('/refer-a-friend-offer/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Individuals' || t.startsWith('Individuals')), 'link text in nav').toBeTruthy();
});
test('refer_a_friend_offer: nav link "Employers"', async ({ page }) => {
await page.goto('/refer-a-friend-offer/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Employers' || t.startsWith('Employers')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('work')), 'href fragment present').toBeTruthy();
});
test('refer_a_friend_offer: nav link "Advisors"', async ({ page }) => {
await page.goto('/refer-a-friend-offer/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Advisors' || t.startsWith('Advisors')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('advisors')), 'href fragment present').toBeTruthy();
});
test('refer_a_friend_offer: nav link "Automated investing A globally"', async ({ page }) => {
await page.goto('/refer-a-friend-offer/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Automated investing A globally diversified portfolio with ev' || t.startsWith('Automated investing A globally diversified portfolio with ev')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('investing')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - referral', () => {
test('referral: title matches GT', async ({ page }) => {
await page.goto('/referral/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('a friend invited you to join cresvia');
});
test('referral: h1 "Friend reward: Earn up to 4.00"', async ({ page }) => {
await page.goto('/referral/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Friend reward: Earn up to 4.00% APY' || t.startsWith('Friend reward: Earn up to 4.00% APY'))).toBeTruthy();
});
test('referral: h2 "See how Cresvia\'s Cash Reserve"', async ({ page }) => {
await page.goto('/referral/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'See how Cresvia\'s Cash Reserve compares' || t.startsWith('See how Cresvia\'s Cash Reserve compares'))).toBeTruthy();
});
test('referral: h2 "What makes Cresvia\'s Cash Rese"', async ({ page }) => {
await page.goto('/referral/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'What makes Cresvia\'s Cash Reserve stand out?' || t.startsWith('What makes Cresvia\'s Cash Reserve stand out?'))).toBeTruthy();
});
test('referral: h2 "Enjoy a higher APY."', async ({ page }) => {
await page.goto('/referral/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Enjoy a higher APY.' || t.startsWith('Enjoy a higher APY.'))).toBeTruthy();
});
test('referral: nav link "Individuals"', async ({ page }) => {
await page.goto('/referral/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Individuals' || t.startsWith('Individuals')), 'link text in nav').toBeTruthy();
});
test('referral: nav link "Employers"', async ({ page }) => {
await page.goto('/referral/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Employers' || t.startsWith('Employers')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('work')), 'href fragment present').toBeTruthy();
});
test('referral: nav link "Advisors"', async ({ page }) => {
await page.goto('/referral/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Advisors' || t.startsWith('Advisors')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('advisors')), 'href fragment present').toBeTruthy();
});
test('referral: nav link "Automated investing Broadly di"', async ({ page }) => {
await page.goto('/referral/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Automated investing Broadly diversified worldwide, with trad' || t.startsWith('Automated investing Broadly diversified worldwide, with trad')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('investing')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - retirement', () => {
test('retirement: title matches GT', async ({ page }) => {
await page.goto('/retirement/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('retirement planning');
});
test('retirement: h1 "The confident path to retireme"', async ({ page }) => {
await page.goto('/retirement/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'The confident path to retirement' || t.startsWith('The confident path to retirement'))).toBeTruthy();
});
test('retirement: h2 "Retirement raises a lot of que"', async ({ page }) => {
await page.goto('/retirement/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Retirement raises a lot of questions. We have answers.' || t.startsWith('Retirement raises a lot of questions. We have answers.'))).toBeTruthy();
});
test('retirement: h2 "There\'s more to Cresvia than j"', async ({ page }) => {
await page.goto('/retirement/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'There\'s more to Cresvia than just retirement.' || t.startsWith('There\'s more to Cresvia than just retirement.'))).toBeTruthy();
});
test('retirement: h2 "We\'ll help you retire just the"', async ({ page }) => {
await page.goto('/retirement/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'We\'ll help you retire just the way you want.' || t.startsWith('We\'ll help you retire just the way you want.'))).toBeTruthy();
});
test('retirement: nav link "Individuals"', async ({ page }) => {
await page.goto('/retirement/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Individuals' || t.startsWith('Individuals')), 'link text in nav').toBeTruthy();
});
test('retirement: nav link "Employers"', async ({ page }) => {
await page.goto('/retirement/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Employers' || t.startsWith('Employers')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('work')), 'href fragment present').toBeTruthy();
});
test('retirement: nav link "Advisors"', async ({ page }) => {
await page.goto('/retirement/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Advisors' || t.startsWith('Advisors')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('advisors')), 'href fragment present').toBeTruthy();
});
test('retirement: nav link "Hands-off investing Broadly di"', async ({ page }) => {
await page.goto('/retirement/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Hands-off investing Broadly diversified worldwide, with ever' || t.startsWith('Hands-off investing Broadly diversified worldwide, with ever')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('investing')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - retirement_income', () => {
test('retirement_income: title matches GT', async ({ page }) => {
await page.goto('/retirement-income/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('lasting retirement');
});
test('retirement_income: h1 "Turning your savings into stea"', async ({ page }) => {
await page.goto('/retirement-income/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Turning your savings into steady income shouldn\'t feel complicated' || t.startsWith('Turning your savings into steady income shouldn\'t feel complicated'))).toBeTruthy();
});
test('retirement_income: h2 "A dependable way to protect th"', async ({ page }) => {
await page.goto('/retirement-income/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'A dependable way to protect the years ahead.' || t.startsWith('A dependable way to protect the years ahead.'))).toBeTruthy();
});
test('retirement_income: h2 "How does Cresvia support peopl"', async ({ page }) => {
await page.goto('/retirement-income/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'How does Cresvia support people in retirement?' || t.startsWith('How does Cresvia support people in retirement?'))).toBeTruthy();
});
test('retirement_income: h2 "Your money stays protected at "', async ({ page }) => {
await page.goto('/retirement-income/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Your money stays protected at Cresvia.' || t.startsWith('Your money stays protected at Cresvia.'))).toBeTruthy();
});
test('retirement_income: nav link "Households"', async ({ page }) => {
await page.goto('/retirement-income/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Households' || t.startsWith('Households')), 'link text in nav').toBeTruthy();
});
test('retirement_income: nav link "Businesses"', async ({ page }) => {
await page.goto('/retirement-income/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Businesses' || t.startsWith('Businesses')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('work')), 'href fragment present').toBeTruthy();
});
test('retirement_income: nav link "Planners"', async ({ page }) => {
await page.goto('/retirement-income/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Planners' || t.startsWith('Planners')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('advisors')), 'href fragment present').toBeTruthy();
});
test('retirement_income: nav link "Hands-off investing Broadly di"', async ({ page }) => {
await page.goto('/retirement-income/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Hands-off investing Broadly diversified across markets, with' || t.startsWith('Hands-off investing Broadly diversified across markets, with')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('investing')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - sitemap', () => {
test('sitemap: title matches GT', async ({ page }) => {
await page.goto('/sitemap/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('cresvia.com sitemap');
});
test('sitemap: h1 "The Cresvia Sitemap"', async ({ page }) => {
await page.goto('/sitemap/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'The Cresvia Sitemap' || t.startsWith('The Cresvia Sitemap'))).toBeTruthy();
});
test('sitemap: h2 "Personal site"', async ({ page }) => {
await page.goto('/sitemap/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Personal site' || t.startsWith('Personal site'))).toBeTruthy();
});
test('sitemap: h2 "Workplace site"', async ({ page }) => {
await page.goto('/sitemap/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Workplace site' || t.startsWith('Workplace site'))).toBeTruthy();
});
test('sitemap: h2 "Advisor site"', async ({ page }) => {
await page.goto('/sitemap/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Advisor site' || t.startsWith('Advisor site'))).toBeTruthy();
});
test('sitemap: header link "Cresvia LogoCresvia"', async ({ page }) => {
await page.goto('/sitemap/');
const links = page.locator('header a, [role="banner"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Cresvia LogoCresvia' || t.startsWith('Cresvia LogoCresvia')), 'link text in header').toBeTruthy();
});
test('sitemap: nav link "Help Center"', async ({ page }) => {
await page.goto('/sitemap/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Help Center' || t.startsWith('Help Center')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('help')), 'href fragment present').toBeTruthy();
});
test('sitemap: nav link "Contact us"', async ({ page }) => {
await page.goto('/sitemap/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Contact us' || t.startsWith('Contact us')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('contact')), 'href fragment present').toBeTruthy();
});
test('sitemap: footer link "Review Cresvia Checking Disclo"', async ({ page }) => {
await page.goto('/sitemap/');
const links = page.locator('footer a, [role="contentinfo"] a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Review Cresvia Checking Disclosures.' || t.startsWith('Review Cresvia Checking Disclosures.')), 'link text in footer').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('cresvia-checking-disclosure')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - socially_responsible_broad_impact_portfolio', () => {
test('socially_responsible_broad_impact_portfolio: title matches GT', async ({ page }) => {
await page.goto('/socially-responsible-broad-impact-portfolio/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('cresvia broad impact portfolio');
});
test('socially_responsible_broad_impact_portfolio: h1 "Wide Impact Portfolio"', async ({ page }) => {
await page.goto('/socially-responsible-broad-impact-portfolio/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Wide Impact Portfolio' || t.startsWith('Wide Impact Portfolio'))).toBeTruthy();
});
test('socially_responsible_broad_impact_portfolio: h1 "Wide Impact"', async ({ page }) => {
await page.goto('/socially-responsible-broad-impact-portfolio/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Wide Impact' || t.startsWith('Wide Impact'))).toBeTruthy();
});
test('socially_responsible_broad_impact_portfolio: h2 "Helpful Resources"', async ({ page }) => {
await page.goto('/socially-responsible-broad-impact-portfolio/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Helpful Resources' || t.startsWith('Helpful Resources'))).toBeTruthy();
});
test('socially_responsible_broad_impact_portfolio: h2 "Stay invested."', async ({ page }) => {
await page.goto('/socially-responsible-broad-impact-portfolio/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Stay invested.' || t.startsWith('Stay invested.'))).toBeTruthy();
});
test('socially_responsible_broad_impact_portfolio: nav link "Individuals"', async ({ page }) => {
await page.goto('/socially-responsible-broad-impact-portfolio/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Individuals' || t.startsWith('Individuals')), 'link text in nav').toBeTruthy();
});
test('socially_responsible_broad_impact_portfolio: nav link "Employers"', async ({ page }) => {
await page.goto('/socially-responsible-broad-impact-portfolio/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Employers' || t.startsWith('Employers')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('work')), 'href fragment present').toBeTruthy();
});
test('socially_responsible_broad_impact_portfolio: nav link "Advisors"', async ({ page }) => {
await page.goto('/socially-responsible-broad-impact-portfolio/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Advisors' || t.startsWith('Advisors')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('advisors')), 'href fragment present').toBeTruthy();
});
test('socially_responsible_broad_impact_portfolio: nav link "Automated investing Broadly di"', async ({ page }) => {
await page.goto('/socially-responsible-broad-impact-portfolio/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Automated investing Broadly diversified holdings with every ' || t.startsWith('Automated investing Broadly diversified holdings with every ')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('investing')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - verify', () => {
test('verify: title matches GT', async ({ page }) => {
await page.goto('/verify/');
const t = (await page.title()).toLowerCase();
expect(t).toContain('cresvia mobile app');
});
test('verify: h1 "Download the Cresvia app"', async ({ page }) => {
await page.goto('/verify/');
const texts = (await page.locator('h1').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Download the Cresvia app' || t.startsWith('Download the Cresvia app'))).toBeTruthy();
});
test('verify: h2 "A money app designed around yo"', async ({ page }) => {
await page.goto('/verify/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'A money app designed around your goals.' || t.startsWith('A money app designed around your goals.'))).toBeTruthy();
});
test('verify: h2 "See the whole picture."', async ({ page }) => {
await page.goto('/verify/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'See the whole picture.' || t.startsWith('See the whole picture.'))).toBeTruthy();
});
test('verify: h2 "Manage money from anywhere"', async ({ page }) => {
await page.goto('/verify/');
const texts = (await page.locator('h2').allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Manage money from anywhere' || t.startsWith('Manage money from anywhere'))).toBeTruthy();
});
test('verify: nav link "Individuals"', async ({ page }) => {
await page.goto('/verify/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Individuals' || t.startsWith('Individuals')), 'link text in nav').toBeTruthy();
});
test('verify: nav link "Employers"', async ({ page }) => {
await page.goto('/verify/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Employers' || t.startsWith('Employers')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('work')), 'href fragment present').toBeTruthy();
});
test('verify: nav link "Advisors"', async ({ page }) => {
await page.goto('/verify/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Advisors' || t.startsWith('Advisors')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('advisors')), 'href fragment present').toBeTruthy();
});
test('verify: nav link "Automated investing A globally"', async ({ page }) => {
await page.goto('/verify/');
const links = page.locator('nav a');
const texts = (await links.allTextContents()).map(s => s.replace(/\s+/g, ' ').trim());
expect(texts.some(t => t === 'Automated investing A globally diversified mix with all trad' || t.startsWith('Automated investing A globally diversified mix with all trad')), 'link text in nav').toBeTruthy();
const hrefs = await links.evaluateAll(els => els.map(e => (e.getAttribute('href') || '').toLowerCase()));
expect(hrefs.some(h => h.includes('investing')), 'href fragment present').toBeTruthy();
});
});
test.describe('Functional - Routing', () => {
test('navigate to investments via "Portfolio optionsDiscover port"', async ({ page }) => {
await page.goto('/');
const link = page.locator('a[href*="investments"]').first();
expect(await link.count(), 'nav link to investments exists').toBeGreaterThan(0);
await link.click();
await page.waitForTimeout(1200);
expect(page.url().toLowerCase(), 'URL changed to destination').toContain('investments');
const bodyText = (await page.evaluate(() => document.body.innerText)).replace(/\s+/g, ' ');
expect(bodyText, 'destination distinctive content shown').toContain('Curated portfolios built by pros');
});
test('navigate to affiliate_partner_offer via "Claim offer"', async ({ page }) => {
await page.goto('/');
const link = page.locator('a[href*="affiliate-partner-offer"]').first();
expect(await link.count(), 'nav link to affiliate_partner_offer exists').toBeGreaterThan(0);
await link.click();
await page.waitForTimeout(1200);
expect(page.url().toLowerCase(), 'URL changed to destination').toContain('affiliate-partner-offer');
const bodyText = (await page.evaluate(() => document.body.innerText)).replace(/\s+/g, ' ');
expect(bodyText, 'destination distinctive content shown').toContain('New member offer Grow faster with a boost on your balance');
});
test('navigate to concierge via "Rollover supportTalk to a spec"', async ({ page }) => {
await page.goto('/');
const link = page.locator('a[href*="concierge"]').first();
expect(await link.count(), 'nav link to concierge exists').toBeGreaterThan(0);
await link.click();
await page.waitForTimeout(1200);
expect(page.url().toLowerCase(), 'URL changed to destination').toContain('concierge');
const bodyText = (await page.evaluate(() => document.body.innerText)).replace(/\s+/g, ' ');
expect(bodyText, 'destination distinctive content shown').toContain('Get going with an advisor at your side');
});
});
|