From 93d0111168fe8731107a7157abe304c9d36f0fa7 Mon Sep 17 00:00:00 2001 From: shadowusr Date: Thu, 1 Aug 2024 14:27:49 +0300 Subject: [PATCH 1/3] fix: fix critical bug when section height doesn't react to resizes --- lib/static/components/suites.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/static/components/suites.jsx b/lib/static/components/suites.jsx index 7a4fd1571..608828d51 100644 --- a/lib/static/components/suites.jsx +++ b/lib/static/components/suites.jsx @@ -14,7 +14,7 @@ import {getVisibleRootSuiteIds} from '../modules/selectors/tree'; function VirtualizedRow(props) { const resizeObserverRef = useRef(null); - useResizeObserver(resizeObserverRef, () => props.onResize); + useResizeObserver(resizeObserverRef, props.onResize); return
From 28ddc84a9ed107fb23cd68a0a0666648c382a543 Mon Sep 17 00:00:00 2001 From: shadowusr Date: Thu, 1 Aug 2024 14:28:11 +0300 Subject: [PATCH 2/3] fix: apply baseHost to urls that have metaBaseUrls set to auto --- lib/adapters/test-result/transformers/db.ts | 4 +- .../section/body/meta-info/content.jsx | 19 +++++++-- test/func/common.testplane.conf.js | 3 ++ .../1361a92/chrome-pwt/retry-selector.png | Bin 336 -> 0 bytes .../screens/1361a92/chrome/retry-selector.png | Bin 308 -> 304 bytes .../tests/screens/1361a92/chrome/success.png | Bin 336 -> 0 bytes .../screens/197b2c2/chrome/retry-switcher.png | Bin 491 -> 0 bytes .../screens/328ef49/chrome/retry-selector.png | Bin 310 -> 0 bytes .../42ea26d/chrome-pwt/retry-selector.png | Bin 309 -> 0 bytes .../tests/screens/42ea26d/chrome/pink.png | Bin 310 -> 0 bytes .../screens/42ea26d/chrome/retry-selector.png | Bin 283 -> 277 bytes .../screens/87f8b7e/chrome/retry-switcher.png | Bin 517 -> 0 bytes .../screens/9b544b9/chrome/retry-switcher.png | Bin 491 -> 0 bytes .../screens/9e6270b/chrome/retry-switcher.png | Bin 517 -> 0 bytes .../screens/aec277d/chrome/retry-switcher.png | Bin 517 -> 0 bytes .../c0db305/chrome-pwt/details summary.png | Bin 2659 -> 0 bytes .../screens/c9299b2/chrome/retry-switcher.png | Bin 491 -> 0 bytes .../d90f7de/chrome-pwt/retry-selector.png | Bin 305 -> 0 bytes .../screens/d90f7de/chrome/retry-selector.png | Bin 288 -> 285 bytes .../ff4deba/chrome-pwt/retry-selector.png | Bin 309 -> 0 bytes .../screens/ff4deba/chrome/retry-selector.png | Bin 283 -> 277 bytes .../section/body/meta-info/content.jsx | 39 ++++++++++++++---- 22 files changed, 52 insertions(+), 13 deletions(-) delete mode 100644 test/func/tests/screens/1361a92/chrome-pwt/retry-selector.png delete mode 100644 test/func/tests/screens/1361a92/chrome/success.png delete mode 100644 test/func/tests/screens/197b2c2/chrome/retry-switcher.png delete mode 100644 test/func/tests/screens/328ef49/chrome/retry-selector.png delete mode 100644 test/func/tests/screens/42ea26d/chrome-pwt/retry-selector.png delete mode 100644 test/func/tests/screens/42ea26d/chrome/pink.png delete mode 100644 test/func/tests/screens/87f8b7e/chrome/retry-switcher.png delete mode 100644 test/func/tests/screens/9b544b9/chrome/retry-switcher.png delete mode 100644 test/func/tests/screens/9e6270b/chrome/retry-switcher.png delete mode 100644 test/func/tests/screens/aec277d/chrome/retry-switcher.png delete mode 100644 test/func/tests/screens/c0db305/chrome-pwt/details summary.png delete mode 100644 test/func/tests/screens/c9299b2/chrome/retry-switcher.png delete mode 100644 test/func/tests/screens/d90f7de/chrome-pwt/retry-selector.png delete mode 100644 test/func/tests/screens/ff4deba/chrome-pwt/retry-selector.png diff --git a/lib/adapters/test-result/transformers/db.ts b/lib/adapters/test-result/transformers/db.ts index 635d2def6..7953d25ae 100644 --- a/lib/adapters/test-result/transformers/db.ts +++ b/lib/adapters/test-result/transformers/db.ts @@ -1,6 +1,6 @@ import {ReporterTestResult} from '../index'; import {DbTestResult} from '../../../sqlite-client'; -import {getError, getRelativeUrl, getUrlWithBase} from '../../../common-utils'; +import {getError, getUrlWithBase} from '../../../common-utils'; import _ from 'lodash'; interface Options { @@ -18,7 +18,7 @@ export class DbTestResultTransformer { const suiteUrl = getUrlWithBase(testResult.url, this._options.baseHost); const metaInfoFull = _.merge(_.cloneDeep(testResult.meta), { - url: getRelativeUrl(suiteUrl) ?? '', + url: testResult.meta?.url ?? suiteUrl ?? '', file: testResult.file, sessionId: testResult.sessionId }); diff --git a/lib/static/components/section/body/meta-info/content.jsx b/lib/static/components/section/body/meta-info/content.jsx index a2807bab8..cc843208f 100644 --- a/lib/static/components/section/body/meta-info/content.jsx +++ b/lib/static/components/section/body/meta-info/content.jsx @@ -4,7 +4,7 @@ import {connect} from 'react-redux'; import {DefinitionList} from '@gravity-ui/components'; import PropTypes from 'prop-types'; import {map, mapValues, isObject, omitBy, isEmpty} from 'lodash'; -import {isUrl, getUrlWithBase} from '../../../../../common-utils'; +import {isUrl, getUrlWithBase, getRelativeUrl} from '../../../../../common-utils'; const serializeMetaValues = (metaInfo) => mapValues(metaInfo, (v) => isObject(v) ? JSON.stringify(v) : v); @@ -32,7 +32,7 @@ const metaToElements = (metaInfo, metaInfoBaseUrls) => { if (isUrl(value)) { url = value; - } else if (metaInfoBaseUrls[key]) { + } else if (metaInfoBaseUrls[key] && metaInfoBaseUrls[key] !== 'auto') { const baseUrl = metaInfoBaseUrls[key]; const link = isUrl(baseUrl) ? resolveUrl(baseUrl, value) : path.join(baseUrl, value); url = link; @@ -95,8 +95,19 @@ class MetaInfoContent extends Component { formattedMetaInfo[key] = {content: formattedMetaInfo[key]}; }); - if (result.suiteUrl) { - formattedMetaInfo.url = {content: result.metaInfo.url || result.suiteUrl, url: getUrlWithBase(result.suiteUrl, baseHost)}; + for (const [key, value] of Object.entries(formattedMetaInfo)) { + if (isUrl(value.content) && (key === 'url' || metaInfoBaseUrls[key] === 'auto')) { + formattedMetaInfo[key] = { + content: getRelativeUrl(value.content), + url: getUrlWithBase(getRelativeUrl(value.content), baseHost) + }; + } + } + if (!formattedMetaInfo.url && result.suiteUrl) { + formattedMetaInfo.url = { + content: getRelativeUrl(result.suiteUrl), + url: getUrlWithBase(getRelativeUrl(result.suiteUrl), baseHost) + }; } return metaToElements(formattedMetaInfo, metaInfoBaseUrls); diff --git a/test/func/common.testplane.conf.js b/test/func/common.testplane.conf.js index 0ffee03fa..66a3b4519 100644 --- a/test/func/common.testplane.conf.js +++ b/test/func/common.testplane.conf.js @@ -9,6 +9,9 @@ module.exports.getCommonConfig = (projectDir) => ({ browsers: { chrome: { + assertViewOpts: { + ignoreDiffPixelCount: 4 + }, windowSize: '1280x1024', desiredCapabilities: { browserName: 'chrome', diff --git a/test/func/tests/screens/1361a92/chrome-pwt/retry-selector.png b/test/func/tests/screens/1361a92/chrome-pwt/retry-selector.png deleted file mode 100644 index 7432c9cd0f02cb397972d8b0c615ca3f3627d511..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 336 zcmV-W0k8gvP)Kmc0tXFcgI|Ik>tw2o4V7tB3U(YW2aKaJeB*=G^ih1{V-ih} zT#{!k6i?gJ7H;T%Tug7_uH9+(0PxPe&`YhHY&_#3xh7Dv%`EkDvI*h+gvg}*NM8u@xDS1k0oner0<;1liBL{Q4GJ0x0000DNk~Le0000M0000S2m$~A0P0QH3Xvfgf96R< zK~#90WB3mPU;g}f_4Cu?Z*L!beT@e_{`U6O&rhF!e}`*i`2YX^?|*+^{`iPrCnkFN zlMJbycl7e?R>8hE)9zzrI0KMHE(u0QZoOl){=D3jhEB07*qoM6N<$f@WxoGynhq diff --git a/test/func/tests/screens/1361a92/chrome/success.png b/test/func/tests/screens/1361a92/chrome/success.png deleted file mode 100644 index dbf3ade14edd11d3de33f16b5fbb1946c90e15d3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 336 zcmV-W0k8gvP)Kmc0tXFcgI|Ik>uX5F9#)ldHHnyYvNo2^W!DX&dl0 z{3$+%o8Vxx*NRKGQXE9k?MSo^b<|!EY~VnaoG&Dhd;-ivye7#t!7QA?QyyqXAH`E1 z=HVRaHO&JK=L4L;`M8+gqPvdg;}f8F?gnmQ<&?!$F49{HvD_~UFQ+Vid$*#J^W z2(EI<@@Ih2W`t(1iCUvpJYcvUqTa5fQmya+jFthjYob5t^8h-74#wLttf|EVpe!W- zatst}{acGMZI5^!-Pw~={RAjlmvk_n7ygF)0(%SdU io#?fTaPiprOC9f1Yn>^;G6|9Z0000JNR7i>KmQ70nK^(?Mlsfvd?zWX08d=v6tYcR_D55UtvVkEhvM`4q*oc1wYCYv+6-e5S=~Mzyrg;%lTAxlY+1SHiY27|#Yp#9Z`=o6vcXec#Hpr3Rpm6|1J*Bad0ZgjpoV?e*( zhvbu%ew5CU=n*j-4nb1clo2^^fO@4u(G(C?w^hnQ=SXkraBsL-ZwU9t=|q#}{}n*| zJPxPV3ER32@_`KHLg5F{A9cw4GV*tMR9jU1oK7eYgipoo6=FGL@LZlHf zuLn+#(>y@#HV2E(F* h*xj_2HX@%|#~%&u_^(+G->3ip002ovPDHLkV1gN5*lYj* diff --git a/test/func/tests/screens/328ef49/chrome/retry-selector.png b/test/func/tests/screens/328ef49/chrome/retry-selector.png deleted file mode 100644 index a40bb6b78eccf1ccd1bfcbc2cd15cffb75400de5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 310 zcmV-60m=S}P)KmLUtmKpe#{tDnJQ(4s|yU|7^@^#k|`3|6DrYWE}9 z1jEf$K?j0iYg^G_xRWhBId_7r2=4wMxCigTh4+L1!Tle@OCkmi0pR!m_r9~^rx_|s zi#^Y)0PGyWJY(AfBB23_rY^W)?|eYUU^oWm!@0H_g5{by|NJJ5ES#tQGl1NjFtqxp zS8L`0m-QaKRtJ?*nFi2qG%@H}SWf3OfXQf#WP8SHwx9t(y8xgV5q|osKmh>Bh#cyb z>4wBhU&Lv}Fdc4tfJ}7pillkK?f%y6l%%2RsCt%6GS!h#50)p&vg(4KVE_OC07*qo IM6N<$f@;-<(EtDd diff --git a/test/func/tests/screens/42ea26d/chrome-pwt/retry-selector.png b/test/func/tests/screens/42ea26d/chrome-pwt/retry-selector.png deleted file mode 100644 index d78257ad8ee9d692e7d2ba776118a70c319b3c58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 309 zcmV-50m}Y~P)KmLUtmKpe#{tDnJQ(4s|yU|7^@^#k|`3|6DrYWE}9 z1jEf$K?j0iYg^G_xRWhBId_U!1b2TB+#lYB3-1T-;Qo){F(L+b0pR!m_r8KmLUtmKpe#{tDnJQ(4s|yU|7^@^#k|`3|6DrYWE}9 z1jEf$K?j0iYg^G_xRWhBId_7r2=4wMxCigTh4+L1!Tle@OCkmi0pR!m_r9~^rx_|s zi#^Y)0PGyWJY(AfBB23_rY^W)?|eYUU^oWm!@0H_g5{by|NJJ5ES#tQGl1NjFtqxp zS8L`0m-QaKRtJ?*nFi2qG%@H}SWf3OfXQf#WP8SHwx9t(y8xgV5q|osKmh>Bh#cyb z>4wBhU&Lv}Fdc4tfJ}7pillkK?f%y6l%%2RsCt%6GS!h#50)p&vg(4KVE_OC07*qo IM6N<$f@;-<(EtDd diff --git a/test/func/tests/screens/42ea26d/chrome/retry-selector.png b/test/func/tests/screens/42ea26d/chrome/retry-selector.png index 9e1ce15b20757d11e48c7e01f9edd6840038fb85..dc9d6968f94f565df26e76d2bd769e390eff2768 100644 GIT binary patch delta 263 zcmV+i0r>u#0+j+GiBL{Q4GJ0x0000DNk~Le0000L0000S2m$~A00DYq36UWff5%Bg zK~#90?bR^~!Y~vD;9SE)cpdNHLA-$Ou3o@Z9J)BEASzDAbZG4)q}3W;@+47jE=d@pZjdUx1DLZT`0Z1+Q7O!j+*^ZqbH+-w~xEad23iqB+;K{N8or~ zDWV6L+N+qw(p!e1MQ2u`RFh4@(*9AD{e=z^(#z+7F N002ovPDHLkV1m1+btV7+ delta 269 zcmV+o0rLKp0-FLMiBL{Q4GJ0x0000DNk~Le0000M0000S2m$~A0P0QH3Xvfgf6Ylm zK~#90WB3mP|GxbH`|AIn$N&F4z>6M(l>Pex*Y}?RMEv>x_XQ!H80hZ{kVdExf1Z=9 zABvuXjrjMOT>TF~=-=o63}krW52|+<{yd_{h(C}1Gf<@e0SFBVBfg#e`k>?d=c6CV zG~(IJn}>Dg?w6nTa>;#ijCjBEW7R3g6(9DzIc~9-Oe20?|MmOM-#-ujlW)Wy7#cO= z{~!yCKNKeLKlC!<5oJa^qDsN{?<++{{QC;71ju&C-Y diff --git a/test/func/tests/screens/87f8b7e/chrome/retry-switcher.png b/test/func/tests/screens/87f8b7e/chrome/retry-switcher.png deleted file mode 100644 index d788a5e780f9ba001dc1a8ce5aab43f699361990..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 517 zcmV+g0{Z=lP)Kmdi^5K^(^i@lk{*u8-}3T?9#wo`O7d3Bi+SE9n>m zB{2CR!nClHpzS zqW)R$1KRC2{6YW3i|S+KTk@gX?Sf=-8KZL60O?YKAPXS0Z_~6zA0wrzz#H&VZwT|n z^??TF{{?{dt|7h?hbQQPZN>&Z%tJgA*#XM;Wkfb2DBYD%d8r_In1pTChP|gfHh_cr z!MCx+YC--c&)x&=O+!LUz_sAQ{_{Rt0Jq%#PC4cr$eriRIYpJ%3WO5@_BlHWHwE*K zX?Q)1m=H6^WWAvyv=+kZ)+!r7`Z$gFZXC*^Vi=n`O2O)|qIg?m15h3mL=#as1J3?M zTj7yC&6;Df{sa93@H<+>nf=QYWWk6UtO3%61aVsgp&^Mz4AuZ{ojy6ylH3b! zBWlpCP16=yxr=w9*=mkPM;ekcQf3%6CK8>yDQ_B;52NE38}RuQ=xP7q00000NkvXX Hu0mjf2Gi)F diff --git a/test/func/tests/screens/9b544b9/chrome/retry-switcher.png b/test/func/tests/screens/9b544b9/chrome/retry-switcher.png deleted file mode 100644 index 3864eb30499d9b1697007f77fb18180f3aebbc5c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 491 zcmVJNR7i>KmQ70nK^(?Mlsfvd?zWX08d=v6tYcR_D55UtvVkEhvM`4q*oc1wYCYv+6-e5S=~Mzyrg;%lTAxlY+1SHiY27|#Yp#9Z`=o6vcXec#Hpr3Rpm6|1J*Bad0ZgjpoV?e*( zhvbu%ew5CU=n*j-4nb1clo2^^fO@4u(G(C?w^hnQ=SXkraBsL-ZwU9t=|q#}{}n*| zJPxPV3ER32@_`KHLg5F{A9cw4GV*tMR9jU1oK7eYgipoo6=FGL@LZlHf zuLn+#(>y@#HV2E(F* h*xj_2HX@%|#~%&u_^(+G->3ip002ovPDHLkV1gN5*lYj* diff --git a/test/func/tests/screens/9e6270b/chrome/retry-switcher.png b/test/func/tests/screens/9e6270b/chrome/retry-switcher.png deleted file mode 100644 index d788a5e780f9ba001dc1a8ce5aab43f699361990..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 517 zcmV+g0{Z=lP)Kmdi^5K^(^i@lk{*u8-}3T?9#wo`O7d3Bi+SE9n>m zB{2CR!nClHpzS zqW)R$1KRC2{6YW3i|S+KTk@gX?Sf=-8KZL60O?YKAPXS0Z_~6zA0wrzz#H&VZwT|n z^??TF{{?{dt|7h?hbQQPZN>&Z%tJgA*#XM;Wkfb2DBYD%d8r_In1pTChP|gfHh_cr z!MCx+YC--c&)x&=O+!LUz_sAQ{_{Rt0Jq%#PC4cr$eriRIYpJ%3WO5@_BlHWHwE*K zX?Q)1m=H6^WWAvyv=+kZ)+!r7`Z$gFZXC*^Vi=n`O2O)|qIg?m15h3mL=#as1J3?M zTj7yC&6;Df{sa93@H<+>nf=QYWWk6UtO3%61aVsgp&^Mz4AuZ{ojy6ylH3b! zBWlpCP16=yxr=w9*=mkPM;ekcQf3%6CK8>yDQ_B;52NE38}RuQ=xP7q00000NkvXX Hu0mjf2Gi)F diff --git a/test/func/tests/screens/aec277d/chrome/retry-switcher.png b/test/func/tests/screens/aec277d/chrome/retry-switcher.png deleted file mode 100644 index d788a5e780f9ba001dc1a8ce5aab43f699361990..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 517 zcmV+g0{Z=lP)Kmdi^5K^(^i@lk{*u8-}3T?9#wo`O7d3Bi+SE9n>m zB{2CR!nClHpzS zqW)R$1KRC2{6YW3i|S+KTk@gX?Sf=-8KZL60O?YKAPXS0Z_~6zA0wrzz#H&VZwT|n z^??TF{{?{dt|7h?hbQQPZN>&Z%tJgA*#XM;Wkfb2DBYD%d8r_In1pTChP|gfHh_cr z!MCx+YC--c&)x&=O+!LUz_sAQ{_{Rt0Jq%#PC4cr$eriRIYpJ%3WO5@_BlHWHwE*K zX?Q)1m=H6^WWAvyv=+kZ)+!r7`Z$gFZXC*^Vi=n`O2O)|qIg?m15h3mL=#as1J3?M zTj7yC&6;Df{sa93@H<+>nf=QYWWk6UtO3%61aVsgp&^Mz4AuZ{ojy6ylH3b! zBWlpCP16=yxr=w9*=mkPM;ekcQf3%6CK8>yDQ_B;52NE38}RuQ=xP7q00000NkvXX Hu0mjf2Gi)F diff --git a/test/func/tests/screens/c0db305/chrome-pwt/details summary.png b/test/func/tests/screens/c0db305/chrome-pwt/details summary.png deleted file mode 100644 index 375eb098c933ce1cf7f01ff8fdb03967ea2ad7c3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2659 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 S6%2@7BLD?=b*epkE%6`ppUpi0 diff --git a/test/func/tests/screens/c9299b2/chrome/retry-switcher.png b/test/func/tests/screens/c9299b2/chrome/retry-switcher.png deleted file mode 100644 index 3864eb30499d9b1697007f77fb18180f3aebbc5c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 491 zcmVJNR7i>KmQ70nK^(?Mlsfvd?zWX08d=v6tYcR_D55UtvVkEhvM`4q*oc1wYCYv+6-e5S=~Mzyrg;%lTAxlY+1SHiY27|#Yp#9Z`=o6vcXec#Hpr3Rpm6|1J*Bad0ZgjpoV?e*( zhvbu%ew5CU=n*j-4nb1clo2^^fO@4u(G(C?w^hnQ=SXkraBsL-ZwU9t=|q#}{}n*| zJPxPV3ER32@_`KHLg5F{A9cw4GV*tMR9jU1oK7eYgipoo6=FGL@LZlHf zuLn+#(>y@#HV2E(F* h*xj_2HX@%|#~%&u_^(+G->3ip002ovPDHLkV1gN5*lYj* diff --git a/test/func/tests/screens/d90f7de/chrome-pwt/retry-selector.png b/test/func/tests/screens/d90f7de/chrome-pwt/retry-selector.png deleted file mode 100644 index c74f4a81c8631260a034f832b8c61ed0021a6eeb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 305 zcmeAS@N?(olHy`uVBq!ia0vp^55<%-K#{UNzBP3iRWMt-P zE;7_p^AHx!{8aiU?sN7fyMxJ7Ro|2?5b?OF>vgb>|M}<5VJ6k{oF|p&Ps_g;yK6J! zi^<<3^={{w1%z_&wf{SvI@`px#&K4l(+`IiTV9 zpThL}pZ5CiQdoXGp|Je={FQwDpTC03Z}Ob*^fj#f|M~0x?Z>2PzWo@f{-B`#0stwS VGkpBEDQ*A&002ovPDHLkV1fh3jwS#A delta 274 zcmV+t0qy>s0-ypRiBL{Q4GJ0x0000DNk~Le0000M0000S2m$~A0P0QH3Xvfgf6_@r zK~#90WB3mTpT7Qo_U8ZHr~hw0!iVlY1u6UZ1+I?)MEw5q|H&%?Ix*3cS0Ig0BObjV zSw93ldI>h-;}o!c7$KFc1#En*>6afg=4kL1;)A@$=}#N3~PG?L9@N z5ik0e9F}w4&u{g5)>?9m__X1`Xes0H&zlb)*YGFPh(G6V{kwYq|IJ6_8}T28MvZth z$im`3g$evWy^Od^d6Dyk@`CU4SBi}I{1sdYknNDCuVMAb&tLyKmLUtmKpe#{tDnJQ(4s|yU|7^@^#k|`3|6DrYWE}9 z1jEf$K?j0iYg^G_xRWhBId_U!1b2TB+#lYB3-1T-;Qo){F(L+b0pR!m_r8u#0+j+GiBL{Q4GJ0x0000DNk~Le0000L0000S2m$~A00DYq36UWff5%Bg zK~#90?bR^~!Y~vD;9SE)cpdNHLA-$Ou3o@Z9J)BEASzDAbZG4)q}3W;@+47jE=d@pZjdUx1DLZT`0Z1+Q7O!j+*^ZqbH+-w~xEad23iqB+;K{N8or~ zDWV6L+N+qw(p!e1MQ2u`RFh4@(*9AD{e=z^(#z+7F N002ovPDHLkV1m1+btV7+ delta 269 zcmV+o0rLKp0-FLMiBL{Q4GJ0x0000DNk~Le0000M0000S2m$~A0P0QH3Xvfgf6Ylm zK~#90WB3mP|GxbH`|AIn$N&F4z>6M(l>Pex*Y}?RMEv>x_XQ!H80hZ{kVdExf1Z=9 zABvuXjrjMOT>TF~=-=o63}krW52|+<{yd_{h(C}1Gf<@e0SFBVBfg#e`k>?d=c6CV zG~(IJn}>Dg?w6nTa>;#ijCjBEW7R3g6(9DzIc~9-Oe20?|MmOM-#-ujlW)Wy7#cO= z{~!yCKNKeLKlC!<5oJa^qDsN{?<++{{QC;71ju&C-Y diff --git a/test/unit/lib/static/components/section/body/meta-info/content.jsx b/test/unit/lib/static/components/section/body/meta-info/content.jsx index fb501df42..0be3aef20 100644 --- a/test/unit/lib/static/components/section/body/meta-info/content.jsx +++ b/test/unit/lib/static/components/section/body/meta-info/content.jsx @@ -193,14 +193,37 @@ describe('', () => { expectedFileUrl: 'http://127.0.0.1/path/test/file' }, { - type: 'url with query params and meta value with query params', + type: 'url when baseHost is not set and metaBaseUrls is not set', metaInfo: { - file: 'test/file?a=b' + file: 'http://localhost/test/file?a=b' + }, + metaInfoBaseUrls: {}, + baseHost: 'http://example.com/', + expectedFileLabel: 'http://localhost/test/file?a=b', + expectedFileUrl: 'http://localhost/test/file?a=b' + }, + { + type: 'url when baseHost is not set and metaBaseUrls set to auto', + metaInfo: { + file: 'http://localhost/test/file?a=b' + }, + metaInfoBaseUrls: { + file: 'auto' + }, + expectedFileLabel: '/test/file?a=b', + expectedFileUrl: 'http://localhost/test/file?a=b' + }, + { + type: 'url when baseHost is set and metaBaseUrls set to auto', + metaInfo: { + file: 'http://localhost/test/file?a=b' }, metaInfoBaseUrls: { - file: 'http://127.0.0.1/?c=d&e=f' + file: 'auto' }, - expectedFileUrl: 'http://127.0.0.1/test/file?a=b&c=d&e=f' + baseHost: 'http://example.com/', + expectedFileLabel: '/test/file?a=b', + expectedFileUrl: 'http://example.com/test/file?a=b' } ].forEach((stub) => { it(`should render link in meta info based upon metaInfoBaseUrls ${stub.type}`, () => { @@ -223,11 +246,13 @@ describe('', () => { } }; const config = {metaInfoBaseUrls: stub.metaInfoBaseUrls}; - const component = mkMetaInfoContentComponent({resultId: 'some-result'}, {tree, config}); + const view = {baseHost: stub.baseHost}; + const component = mkMetaInfoContentComponent({resultId: 'some-result'}, {tree, config, view}); + const label = stub.expectedFileLabel ?? stub.metaInfo.file; expect(component.getByText('file')).to.exist; - expect(component.getByText(stub.metaInfo.file)).to.exist; - expect(component.getByText(stub.metaInfo.file).href).to.equal(stub.expectedFileUrl); + expect(component.getByText(label)).to.exist; + expect(component.getByText(label).href).to.equal(stub.expectedFileUrl); }); }); }); From 346fdbc3560b6ca5f4df0676d9d7d60a09ce5b2e Mon Sep 17 00:00:00 2001 From: shadowusr Date: Thu, 1 Aug 2024 14:39:46 +0300 Subject: [PATCH 3/3] docs: add info about 'auto' metaInfoBaseUrls value --- docs/en/html-reporter-setup.md | 11 +++++++++++ docs/ru/html-reporter-setup.md | 12 ++++++++++++ 2 files changed, 23 insertions(+) diff --git a/docs/en/html-reporter-setup.md b/docs/en/html-reporter-setup.md index cae860a25..1eecbe230 100644 --- a/docs/en/html-reporter-setup.md +++ b/docs/en/html-reporter-setup.md @@ -250,6 +250,17 @@ For example: } ``` +When value of any key is set to `auto`, the base url will be set base host specified in the UI or kept intact if there base host isn't specified. + +For example, if you have the following `metaInfoBaseUrls` value: +```javascript +{ custom_url: 'auto' } +``` + +And set `meta.custom_url` field to `https://example.com/some/path` in your tests, you'll see in meta: +- A link to `https://example.com/some/path` when base host is not set in the UI +- A link to `https://another-host.com/some/path` when base host in the UI is set to 'https://another-host.com' + ### saveFormat **DEPRECATED** diff --git a/docs/ru/html-reporter-setup.md b/docs/ru/html-reporter-setup.md index d89aec5ec..2427c65d8 100644 --- a/docs/ru/html-reporter-setup.md +++ b/docs/ru/html-reporter-setup.md @@ -250,6 +250,18 @@ throw err; } ``` +Когда значение любого ключа установлено на `auto`, базовый URL будет установлен на базовый хост, указанный в интерфейсе отчета, или останется неизменным, если базовый хост не указан. + +Например, если у вас есть следующее значение `metaInfoBaseUrls`: + +```javascript +{ custom_url: 'auto' } +``` + +И вы установите поле `meta.custom_url` в `https://example.com/some/path` в ваших тестах, вы увидите в мете: +- Ссылку на `https://example.com/some/path`, если базовый хост не установлен в интерфейсе пользователя +- Ссылку на `https://another-host.com/some/path`, если базовый хост в интерфейсе пользователя установлен в `https://another-host.com` + ### saveFormat **Параметр устарел**