Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/jio-footer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class Footer extends LitElement {
* Github branch
*/
@property()
githubBranch = 'master';
githubBranch = 'main';

/**
* The name of the bug report template to use
Expand Down
2 changes: 1 addition & 1 deletion src/jio-improve-this-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class ImproveThisPage extends LitElement {
* Github branch
*/
@property()
githubBranch = 'master';
githubBranch = 'main';

override render() {
if (!this.sourcePath) {return null;}
Expand Down
2 changes: 1 addition & 1 deletion src/jio-report-a-problem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class ReportAProblem extends LitElement {
* Github branch
*/
@property()
githubBranch = 'master';
githubBranch = 'main';

/**
* The name of the bug report template to use
Expand Down
4 changes: 2 additions & 2 deletions src/stories/Footer.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ export const HasSourcePath: StoryObj<Footer> = {
await RepoAndSourcePath.play({...rest, args, canvasElement: wc.shadowRoot as unknown as HTMLElement});

const improveThisPage = wc.shadowRoot.querySelector('jio-improve-this-page') as ImproveThisPage;
expect(improveThisPage.githubBranch).toEqual(args.githubBranch || 'master');
expect(improveThisPage.githubBranch).toEqual(args.githubBranch || 'main');
expect(improveThisPage.githubRepo).toEqual(args.githubRepo || 'jenkins-infra/jenkins-io-components');
expect(improveThisPage.sourcePath).toEqual(args.sourcePath || 'src/stories/Footer.stories.ts');

const reportAProblem = wc.shadowRoot.querySelector('jio-report-a-problem') as ReportAProblem;
expect(reportAProblem.githubBranch).toEqual(args.githubBranch || 'master');
expect(reportAProblem.githubBranch).toEqual(args.githubBranch || 'main');
expect(reportAProblem.githubRepo).toEqual(args.githubRepo || 'jenkins-infra/jenkins-io-components');
expect(reportAProblem.sourcePath).toEqual(args.sourcePath || 'src/stories/Footer.stories.ts');
}
Expand Down
4 changes: 2 additions & 2 deletions src/stories/ImproveThisPage.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ export const RepoAndSourcePath: StoryObj<ImproveThisPage> = {
},
play: async ({canvasElement}) => {
const improveThisPage = canvasElement.querySelector('jio-improve-this-page') as ImproveThisPage;
expect(improveThisPage.githubBranch).toEqual('master');
expect(improveThisPage.githubBranch).toEqual('main');
expect(improveThisPage.githubRepo).toEqual('jenkins-infra/jenkins-io-components');
expect(improveThisPage.sourcePath).toEqual('src/stories/Footer.stories.ts');

expect(improveThisPage.shadowRoot.children).toHaveLength(1);

const link = improveThisPage.shadowRoot.querySelector('a');
expect(link).toHaveAttribute('href', 'https://github.com/jenkins-infra/jenkins-io-components/edit/master/src/stories/Footer.stories.ts');
expect(link).toHaveAttribute('href', 'https://github.com/jenkins-infra/jenkins-io-components/edit/main/src/stories/Footer.stories.ts');
expect(link).toHaveAttribute('rel', 'noreferrer noopener');
expect(link).toHaveAttribute('title', 'Edit src/stories/Footer.stories.ts on GitHub');
expect(link).not.toHaveAttribute('target');
Expand Down
2 changes: 1 addition & 1 deletion src/stories/ReportAProblem.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const RepoAndSourcePath: StoryObj<ReportAProblem> = {
},
play: async ({canvasElement, args}) => {
const reportAProblem = canvasElement.querySelector('jio-report-a-problem') as ReportAProblem;
expect(reportAProblem.githubBranch).toEqual(args.githubBranch || 'master');
expect(reportAProblem.githubBranch).toEqual(args.githubBranch || 'main');
expect(reportAProblem.githubRepo).toEqual(args.githubRepo || 'jenkins-infra/jenkins-io-components');
expect(reportAProblem.sourcePath).toEqual(args.sourcePath || 'src/stories/Footer.stories.ts');

Expand Down