Skip to content

Commit

Permalink
Merge pull request #166 from Arquisoft/150-increase-code-coverage
Browse files Browse the repository at this point in the history
Removed sonar call on e2e
  • Loading branch information
UO289845 committed Apr 28, 2024
2 parents 52ef5aa + d4307c6 commit 95ab536
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 15 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,4 @@ jobs:
- run: npm --prefix gatewayservice install
- run: npm --prefix webapp install
- run: npm --prefix webapp run build
- run: npm --prefix webapp run test:e2e
- name: Analyze with SonarCloud
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- run: npm --prefix webapp run test:e2e
5 changes: 5 additions & 0 deletions webapp/e2e/features/FeaturesToAdd.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Home:
Scenario: Closing the text container
Given I am on the home page
When I click on the toggle button to open and then I click it to close
Then The text container should be visible
7 changes: 1 addition & 6 deletions webapp/e2e/features/home.feature
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,4 @@ Feature: Home page functionality
Scenario: Opening the text container
Given I am on the home page
When I click on the toggle button to open
Then The text container should be hidden

Scenario: Closing the text container
Given I am on the home page
When I click on the toggle button to open and then I click it to close
Then The text container should be visible
Then The text container should be hidden
6 changes: 3 additions & 3 deletions webapp/e2e/steps/home.steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ defineFeature(feature, test => {
await expect(page).toMatchElement('.text-container.hidden');
});
});

/*
test('Closing the text container', ({ given, when, then }) => {
given('I am on the home page', async () => {
await page.goto('http://localhost:3000/home');
await page.waitForSelector('.general');
});
when('I click on the toggle button to open and then I click it to close', async () => {
when('I click on the toggle button to open and then I click it to close', async () => {
await page.click('label[for="toggleOpen"]');
Expand All @@ -65,7 +65,7 @@ defineFeature(feature, test => {
then('The text container should be visible', async () => {
await expect(page).toMatchElement('.text-container.visible');
});
});
});*/

afterAll(async () => {
await browser.close();
Expand Down

0 comments on commit 95ab536

Please sign in to comment.