aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorPhilippe Perrin <philippe.perrin@sonarsource.com>2019-12-26 09:59:39 +0100
committerSonarTech <sonartech@sonarsource.com>2019-12-30 20:46:13 +0100
commit79d34eddc5d477e6452867f5a466c660ef6ecbbc (patch)
tree9e8e0714fa8529909dfeb637eb76cd3e14e5cf33 /server
parentc28a3b7208a8bc96a3057f41bbdde4c353d2b959 (diff)
downloadsonarqube-79d34eddc5d477e6452867f5a466c660ef6ecbbc.tar.gz
sonarqube-79d34eddc5d477e6452867f5a466c660ef6ecbbc.zip
ITs for project branch-like's page
Diffstat (limited to 'server')
-rw-r--r--server/sonar-web/src/main/js/apps/projectBranches/components/App.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/projectBranches/components/BranchLikeRow.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/projectBranches/components/BranchLikeTabs.tsx7
-rw-r--r--server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/__snapshots__/App-test.tsx.snap1
-rw-r--r--server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/__snapshots__/BranchLikeRow-test.tsx.snap4
-rw-r--r--server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/__snapshots__/BranchLikeTabs-test.tsx.snap2
6 files changed, 13 insertions, 5 deletions
diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/App.tsx b/server/sonar-web/src/main/js/apps/projectBranches/components/App.tsx
index 768916e34b4..bcd323ad438 100644
--- a/server/sonar-web/src/main/js/apps/projectBranches/components/App.tsx
+++ b/server/sonar-web/src/main/js/apps/projectBranches/components/App.tsx
@@ -33,7 +33,7 @@ export function App(props: AppProps) {
const { branchLikes, component, onBranchesChange } = props;
return (
- <div className="page page-limited">
+ <div className="page page-limited" id="project-branch-like">
<header className="page-header">
<h1>{translate('project_branch_pull_request.page')}</h1>
<LifetimeInformation />
diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/BranchLikeRow.tsx b/server/sonar-web/src/main/js/apps/projectBranches/components/BranchLikeRow.tsx
index c1b90f73115..c5f65387469 100644
--- a/server/sonar-web/src/main/js/apps/projectBranches/components/BranchLikeRow.tsx
+++ b/server/sonar-web/src/main/js/apps/projectBranches/components/BranchLikeRow.tsx
@@ -65,7 +65,7 @@ export function BranchLikeRow(props: BranchLikeRowProps) {
{branchLike.analysisDate && <DateFromNow date={branchLike.analysisDate} />}
</td>
{displayPurgeSetting && isBranch(branchLike) && (
- <td className="nowrap">
+ <td className="nowrap js-test-purge-toggle-container">
<BranchPurgeSetting branch={branchLike} component={component} />
</td>
)}
diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/BranchLikeTabs.tsx b/server/sonar-web/src/main/js/apps/projectBranches/components/BranchLikeTabs.tsx
index 785cf78b58b..d99621aaf53 100644
--- a/server/sonar-web/src/main/js/apps/projectBranches/components/BranchLikeTabs.tsx
+++ b/server/sonar-web/src/main/js/apps/projectBranches/components/BranchLikeTabs.tsx
@@ -111,7 +111,12 @@ export default class BranchLikeTabs extends React.PureComponent<Props, State> {
return (
<>
- <BoxedTabs onSelect={this.onTabSelect} selected={currentTab} tabs={TABS} />
+ <BoxedTabs
+ className="branch-like-tabs"
+ onSelect={this.onTabSelect}
+ selected={currentTab}
+ tabs={TABS}
+ />
<BranchLikeTable
branchLikes={branchLikesToDisplay}
diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/__snapshots__/App-test.tsx.snap b/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/__snapshots__/App-test.tsx.snap
index 0e39878623b..61c61da9c91 100644
--- a/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/__snapshots__/App-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/__snapshots__/App-test.tsx.snap
@@ -3,6 +3,7 @@
exports[`should render correctly 1`] = `
<div
className="page page-limited"
+ id="project-branch-like"
>
<header
className="page-header"
diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/__snapshots__/BranchLikeRow-test.tsx.snap b/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/__snapshots__/BranchLikeRow-test.tsx.snap
index 7406b9a94fa..4ec603777aa 100644
--- a/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/__snapshots__/BranchLikeRow-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/__snapshots__/BranchLikeRow-test.tsx.snap
@@ -46,7 +46,7 @@ exports[`should render correctly for branch 1`] = `
/>
</td>
<td
- className="nowrap"
+ className="nowrap js-test-purge-toggle-container"
>
<BranchPurgeSetting
branch={
@@ -150,7 +150,7 @@ exports[`should render correctly for main branch 1`] = `
/>
</td>
<td
- className="nowrap"
+ className="nowrap js-test-purge-toggle-container"
>
<BranchPurgeSetting
branch={
diff --git a/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/__snapshots__/BranchLikeTabs-test.tsx.snap b/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/__snapshots__/BranchLikeTabs-test.tsx.snap
index 3dfe2a1e639..7f4bdce5f81 100644
--- a/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/__snapshots__/BranchLikeTabs-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/__snapshots__/BranchLikeTabs-test.tsx.snap
@@ -3,6 +3,7 @@
exports[`should render all tabs correctly 1`] = `
<Fragment>
<BoxedTabs
+ className="branch-like-tabs"
onSelect={[Function]}
selected={0}
tabs={
@@ -107,6 +108,7 @@ exports[`should render all tabs correctly 1`] = `
exports[`should render all tabs correctly 2`] = `
<Fragment>
<BoxedTabs
+ className="branch-like-tabs"
onSelect={[Function]}
selected={1}
tabs={