Skip to content

Commit

Permalink
Merge branch 'main' into refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
AEkaterina authored Oct 9, 2023
2 parents 507441f + d4eb7ec commit cd8cada
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 48 deletions.
80 changes: 42 additions & 38 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,48 +48,52 @@ jobs:
continue-on-error: true

- name: Generate Allure Report
uses: AEkaterina/action-allure-report@v0.1.1
if: success() || failure()
- name: Upload report
uses: actions/upload-artifact@v3
run: mvn allure:report

- name: Upload Allure Report
uses: actions/upload-artifact@v2
with:
name: allure-report
path: allure-report/
if: success() || failure()
path: target/site/allure-maven-plugin

- name: Get Allure history
uses: actions/checkout@v3
if: always()
continue-on-error: true
- name: Archive Allure Report
uses: actions/upload-artifact@v2
with:
ref: gh-pages
path: gh-pages
name: allure-report
path: target/site/allure-maven-plugin

- name: Allure Report action from marketplace
uses: simple-elf/allure-report-action@master
if: always()
id: allure-report
with:
allure_results: ./
gh_pages: gh-pages
allure_report: allure-report
allure_history: allure-history
# - name: Get Allure history
# uses: actions/checkout@v3
# if: always()
# continue-on-error: true
# with:
# ref: gh-pages
# path: gh-pages

- name: Deploy report to Github Pages
if: always()
uses: peaceiris/actions-gh-pages@v2
env:
PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: allure-history
keep_files: true
# - name: Allure Report action from marketplace
# uses: simple-elf/allure-report-action@master
# if: always()
# id: allure-report
# with:
# allure_results: allure-results
# gh_pages: gh-pages
# allure_report: allure-report
# allure_history: allure-history

- name: Post the link to the report
if: always()
uses: Sibz/github-status-action@v1
with:
authToken: ${{secrets.PERSONAL_TOKEN}}
context: 'Test report'
state: 'success'
sha: ${{ github.event.pull_request.head.sha || github.sha }}
target_url: https://thepalaceproject.github.io/allure-html-reporter-github-pages/${{ github.run_number }}
# - name: Deploy report to GitHub Pages
# if: always()
# uses: peaceiris/actions-gh-pages@v2
# env:
# PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
# PUBLISH_BRANCH: gh-pages
# PUBLISH_DIR: allure-history

# - name: Post the link to the report
# if: always()
# uses: Sibz/github-status-action@v1
# with:
# authToken: ${{secrets.PERSONAL_TOKEN}}
# context: 'Test report'
# state: 'success'
# sha: ${{ github.event.pull_request.head.sha || github.sha }}
# target_url: https://thepalaceproject.github.io/allure-html-reporter-github-pages/${{ github.run_number }}
17 changes: 17 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<cucumber.version>5.7.0</cucumber.version>
<allure.results.directory>target/allure-results</allure.results.directory>
</properties>

<build>
Expand All @@ -27,10 +28,19 @@
</configuration>
</plugin>

<!-- <plugin>-->
<!-- <groupId>io.qameta.allure</groupId>-->
<!-- <artifactId>allure-maven</artifactId>-->
<!-- <version>2.10.0</version>-->
<!-- </plugin>-->

<plugin>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-maven</artifactId>
<version>2.10.0</version>
<configuration>
<resultsDirectory>${project.build.directory}/allure-results</resultsDirectory>
</configuration>
</plugin>

<plugin>
Expand Down Expand Up @@ -153,5 +163,12 @@
<version>1.3.1</version>
</dependency>

<dependency>
<groupId>net.masterthought</groupId>
<artifactId>cucumber-reporting</artifactId>
<version>5.7.6</version>
<scope>test</scope>
</dependency>

</dependencies>
</project>
4 changes: 2 additions & 2 deletions src/test/java/features/Search.feature
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Feature: Search module

@allure
@palace
Scenario: Find a library and delete it
When Close tutorial screen
And Close welcome screen
Expand Down Expand Up @@ -114,7 +114,7 @@ Feature: Search module
And Edit data by adding characters in search field and save it as 'newWord'
Then Placeholder contains word 'newWord' text in search field

@palace
@report
Scenario: Check of empty field in LYRASIS Reads
When Close tutorial screen
Then Welcome screen is opened
Expand Down
13 changes: 13 additions & 0 deletions src/test/java/features/test/test.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Feature: test for Aquality

@aquality
Scenario: Check the possibility of editing data in search field
When Close tutorial screen
Then Welcome screen is opened
When Close welcome screen
Then Add library screen is opened
When Add library "LYRASIS Reads" on Add library screen
And Open search modal
And Type text "Book" and save it as 'word'
And Edit data by adding characters in search field and save it as 'newWord'
Then Placeholder contains word 'newWord' text in search field
14 changes: 7 additions & 7 deletions src/test/java/runners/TestRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@
"hooks",
"stepdefinitions"
},
// plugin = {
// "io.qameta.allure.cucumber5jvm.AllureCucumber5Jvm"
// },
tags = "@run"
plugin = {
"io.qameta.allure.cucumber5jvm.AllureCucumber5Jvm"
},
tags = "@report"
)

public class TestRunner {

@BeforeClass
public static void setup() {
AqualityServices.getLogger().info("Start getting books");
XMLUtil xmlUtil = new XMLUtil();
GettingBookUtil.setXmlUtil(xmlUtil);
GettingBookUtil.printDistributorsInfo();
// XMLUtil xmlUtil = new XMLUtil();
// GettingBookUtil.setXmlUtil(xmlUtil);
// GettingBookUtil.printDistributorsInfo();
AqualityServices.getLogger().info("end getting books");
}
}
2 changes: 1 addition & 1 deletion src/test/java/screens/AlertScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class AlertScreen extends Screen{
private static final String ACTION_BUTTON_LOCATOR_ANDROID = UNIQUE_ELEMENT_LOCATOR_ANDROID + "//android.widget.Button[@text=\"%s\"]";

private final ILabel lblAlertMessage = getElementFactory().getLabel(LocatorUtils.getLocator(
new AndroidLocator(By.xpath("")),
new AndroidLocator(By.id("permission_message")),
new IosLocator(By.xpath(UNIQUE_ELEMENT_LOCATOR_IOS + "//XCUIElementTypeScrollView/XCUIElementTypeOther/XCUIElementTypeStaticText[1]"))), "Alert message");
private final ILabel lblNotificationAlert = getElementFactory().getLabel(LocatorUtils.getLocator(
new AndroidLocator(By.xpath("")),
Expand Down
1 change: 1 addition & 0 deletions src/test/java/stepdefinitions/ApplicationSteps.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public void checkTutorialScreenIsOpened() {

@When("Close tutorial screen")
public void closeTutorialScreen() {
AqualityServices.getLogger().info("Closing tutorial screen");
if(alertScreen.state().waitForDisplayed()) {
alertScreen.waitAndPerformAlertActionIfDisplayed(ActionButtonsForBooksAndAlertsKeys.ALLOW);
}
Expand Down
1 change: 1 addition & 0 deletions src/test/resources/cucumber.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cucumber.options=--plugin json:target/cucumber-report.json

0 comments on commit cd8cada

Please sign in to comment.