This repository has been archived by the owner on Dec 11, 2024. It is now read-only.
generated from agilepathway/gauge-jira
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve Space homepage content (#61)
* Improve Space homepage content Prior to this commit the Confluence Space homepage (for any Spaces that we publish Gauge specs to) was just Confluence's default generic homepage. This commit updates the Confluence Space homepage to have a useful overview of what the Space contains and why, along with links to find out more about Gauge and this Gauge Confluence plugin. We republish this homepage content on every run of the plugin, even though it is just rewriting the same content each time. This is so that it is easy to update the homepage content in the future, if and when we want to amend or improve it. * Fix functional tests by updating Space name * Set default Confluence Space key in tests * Test that homepage is republished on every run This commit adds a Gauge spec to verify that the Confluence Space homepage is updated (i.e. republished by the plugin) on every run of the plugin. This is important as if we tried to do something "clever" such as only updating the homepage on the first run of the plugin, we'd be stuck if we ever want to roll out a change which modifies the content of the homepage. * Bump plugin minor version * Run the CI tests just on Ubuntu Prior to this commit we were running the CI tests on Ubuntu, Windows and macOS. This commit removes Windows and macOS from the CI/CD tests. The reason for this is that having the test suite run simultaneously on all three was sometimes causing subtle test failures, generally caused by contention around the same Confluence Space. Also created #62 to ensure that we run the CI tests on a schedule (weekly?) against all 3 operating systems.
- Loading branch information
Showing
16 changed files
with
244 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# The Confluence Space homepage contains useful info | ||
|
||
## The Space homepage contains useful info after publishing, when the space was created by the plugin | ||
|
||
* Publish "1" specs to Confluence | ||
|
||
* Homepage has title "Gauge specs for example-user/example-repo Home" | ||
|
||
* Homepage contains "Do not edit this Space manually." | ||
|
||
|
||
## The Space homepage contains useful info after publishing, when the space was manually created | ||
Tags: create-space-manually | ||
|
||
* Publish "1" specs to Confluence | ||
|
||
* Homepage has title "Gauge specs for example-user/example-repo Home" | ||
|
||
* Homepage contains "Do not edit this Space manually." | ||
|
||
|
||
## The Space homepage is republished on every run of the plugin, when the space was created by the plugin | ||
|
||
* Publish "1" specs to Confluence | ||
|
||
The version number is 2 after the initial publish because the plugin immediately updates the homepage that | ||
was initially created with default content when the space was created by the plugin, on the same plugin run. | ||
* Homepage version number is "2" | ||
|
||
* Publish "1" specs to Confluence | ||
|
||
* Homepage version number is "3" | ||
|
||
|
||
## The Space homepage is republished on every run of the plugin, when the space was manually created | ||
|
||
Tags: create-space-manually | ||
|
||
* Homepage version number is "1" | ||
|
||
* Publish "1" specs to Confluence | ||
|
||
* Homepage version number is "2" | ||
|
||
* Publish "1" specs to Confluence | ||
|
||
* Homepage version number is "3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
functional-tests/src/test/java/com/thoughtworks/gauge/test/confluence/Homepage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.thoughtworks.gauge.test.confluence; | ||
|
||
import org.json.JSONObject; | ||
|
||
public class Homepage { | ||
|
||
private JSONObject jsonHomepage; | ||
|
||
public Homepage(JSONObject jsonHomepage) { | ||
this.jsonHomepage = jsonHomepage; | ||
} | ||
|
||
public String getTitle() { | ||
return jsonHomepage.getString("title"); | ||
} | ||
|
||
public String getBody() { | ||
return jsonHomepage.getJSONObject("body").getJSONObject("view").getString("value"); | ||
} | ||
|
||
public int getVersion() { | ||
return jsonHomepage.getJSONObject("version").getInt("number"); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return jsonHomepage.toString(4); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.