-
Notifications
You must be signed in to change notification settings - Fork 367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pull Requests for Data #8235
Pull Requests for Data #8235
Changes from all commits
ce126bf
68390c1
671aff4
d0c75ae
acaeaac
61864e1
f0788fd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,9 +8,6 @@ import {Link, NavItem} from "../nav"; | |
import {useRouter} from "../../hooks/router"; | ||
import {RefTypeBranch} from "../../../constants"; | ||
|
||
// TODO (gilo): this is temp, until PRfD will be ready | ||
const showPulls = false; | ||
|
||
export const RepositoryNavTabs = ({ active }) => { | ||
const { reference } = useRefs(); | ||
const router = useRouter(); | ||
|
@@ -60,14 +57,10 @@ export const RepositoryNavTabs = ({ active }) => { | |
<Link active={active === 'tags'} href={`/repositories/${repoId}/tags`} component={NavItem}> | ||
<TagIcon/> Tags | ||
</Link> | ||
{ | ||
// TODO (gilo): this is temp, until PRfD will be ready | ||
showPulls && | ||
Comment on lines
-63
to
-65
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 😄 |
||
<Link active={active === 'pulls'} href={`/repositories/${repoId}/pulls`} component={NavItem}> | ||
{/* TODO (gilo): the icon is very similar to the compare icon, consider changing it*/} | ||
<GitPullRequestIcon/> Pull Requests | ||
</Link> | ||
} | ||
<Link active={active === 'pulls'} href={`/repositories/${repoId}/pulls`} component={NavItem}> | ||
{/* TODO (gilo): the icon is very similar to the compare icon, consider changing it*/} | ||
<GitPullRequestIcon/> Pull Requests | ||
</Link> | ||
<Link active={active === 'compare'} href={withRefAndCompareContext(`/repositories/${repoId}/compare`)} component={NavItem}> | ||
<GitCompareIcon/> Compare | ||
</Link> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added classes to make elements more discoverable. |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For non |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import { Locator, Page } from "@playwright/test"; | ||
|
||
export class PullsPage { | ||
private page: Page; | ||
|
||
constructor(page: Page) { | ||
this.page = page; | ||
} | ||
|
||
async getPullsListCount(): Promise<number> { | ||
await this.page.locator("div.pulls-list").isVisible(); | ||
return this.page | ||
.locator("div.pulls-list") | ||
.locator("pull-row") | ||
.count(); | ||
} | ||
|
||
async switchCompareBranch(name: string): Promise<void> { | ||
await this.page.getByRole("button", {name: "to branch: "}).click(); | ||
await this.page.getByRole("button", {name}).click(); | ||
} | ||
|
||
async clickCreatePullButton(): Promise<void> { | ||
await this.page.getByRole("button", {name: "Create Pull Request"}).click(); | ||
} | ||
|
||
async getBranchesCompareURI(): Promise<string> { | ||
return await this.page.locator("div.lakefs-uri").innerText(); | ||
} | ||
|
||
async clickMergePullButton(): Promise<void> { | ||
await this.page.getByRole("button", {name: "Merge pull request"}).click(); | ||
} | ||
|
||
async fillPullTitle(title: string): Promise<void> { | ||
await this.page.getByPlaceholder("Add a title...").fill(title); | ||
} | ||
|
||
async fillPullDescription(description: string): Promise<void> { | ||
await this.page.getByPlaceholder("Describe your changes...").fill(description); | ||
} | ||
|
||
async gotoPullsTab(id: string): Promise<void> { | ||
await this.page.locator(`#pulls-tabs-tab-${id}`).click(); | ||
} | ||
|
||
async getFirstPullsRowDetails(): Promise<{title: string, description: string}> { | ||
const firstPullRow = this.page.locator("div.pull-row").first(); | ||
const title = await firstPullRow.locator(".pull-title").innerText(); | ||
const description = await firstPullRow.locator(".pull-description").innerText(); | ||
return {title, description}; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This reveals PRfD to everyone.