Skip to content
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

Fix Donation Component #337 and Hot Meal Day section #372 #374

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Prev Previous commit
Next Next commit
Update on tests
FranciscoBastos committed May 15, 2022
commit a96fcd09fbe348a8ff1920a40ece8d7b9c27e677
7 changes: 6 additions & 1 deletion __tests__/E2E/hotmealdonate.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
// Generated by Selenium IDE
// Porto, 2022
// This code was made with love by Francisco Bastos (https://www.linkedin.com/in/francisco-bastos-031369160/)
// for the curriculum unit of Comprehension and Evolution of Software at the
// master's in Software Engineering at the Faculty of Engineering of the University of Porto.
// Feel free to contact the author if any questions arise.
//
import { Builder, By, until } from 'selenium-webdriver';
import assert from 'assert';

7 changes: 6 additions & 1 deletion __tests__/E2E/hotmeallearnmore.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
// Generated by Selenium IDE
// Porto, 2022
// This code was made with love by Francisco Bastos (https://www.linkedin.com/in/francisco-bastos-031369160/)
// for the curriculum unit of Comprehension and Evolution of Software at the
// master's in Software Engineering at the Faculty of Engineering of the University of Porto.
// Feel free to contact the author if any questions arise.
//
import { Builder, By } from 'selenium-webdriver';
import assert from 'assert';

9 changes: 7 additions & 2 deletions __tests__/E2E/makeadonation.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
// Generated by Selenium IDE
// Porto, 2022
// This code was made with love by Francisco Bastos (https://www.linkedin.com/in/francisco-bastos-031369160/)
// for the curriculum unit of Comprehension and Evolution of Software at the
// master's in Software Engineering at the Faculty of Engineering of the University of Porto.
// Feel free to contact the author if any questions arise.
//
import { Builder, By, until } from 'selenium-webdriver';
import assert from 'assert';

@@ -39,7 +44,7 @@ describe('Make a donation', function () {
await driver.manage().setTimeouts({ implicit: 10000 });
// 7 | click | xpath=//select |
await driver.findElement(By.xpath('//select')).click();
// 8 | select | xpath=//html/body/div[1]/div/main/div[1]/div[2]/div/div/div[3]/form/div/div[5]/select/option[2] | label=$5
// 8 | select | css=#amount and xpath=//option[. = '$5'] | label=$5
{
const dropdown = await driver.findElement(By.css('#amount'));
await dropdown.findElement(By.xpath("//option[. = '$5']")).click();
9 changes: 6 additions & 3 deletions __tests__/E2E/makesanemptydonation.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
// Generated by Selenium IDE
// Porto, 2022
// This code was made with love by Francisco Bastos (https://www.linkedin.com/in/francisco-bastos-031369160/)
// for the curriculum unit of Comprehension and Evolution of Software at the
// master's in Software Engineering at the Faculty of Engineering of the University of Porto.
// Feel free to contact the author if any questions arise.
//
import { Builder, By } from 'selenium-webdriver';

describe('Makes an empty donation', function () {
@@ -22,7 +27,5 @@ describe('Makes an empty donation', function () {
await driver.manage().window().setRect({ width: 1920, height: 1080 });
// 3 | click | xpath=//form/div/button |
await driver.findElement(By.xpath('//form/div/button')).click();
// 4 | webdriverChooseOkOnVisibleConfirmation | xpath=//body/div[4]/div/div |
// await driver.switchTo().alert().accept();
});
});
7 changes: 6 additions & 1 deletion __tests__/E2E/makesanemptydonation2.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
// Generated by Selenium IDE
// Porto, 2022
// This code was made with love by Francisco Bastos (https://www.linkedin.com/in/francisco-bastos-031369160/)
// for the curriculum unit of Comprehension and Evolution of Software at the
// master's in Software Engineering at the Faculty of Engineering of the University of Porto.
// Feel free to contact the author if any questions arise.
//
const { By } = require('selenium-webdriver'),
webdriver = require('selenium-webdriver');

8 changes: 7 additions & 1 deletion __tests__/E2E/setup.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
// Porto, 2022
// This code was made with love by Francisco Bastos (https://www.linkedin.com/in/francisco-bastos-031369160/)
// for the curriculum unit of Comprehension and Evolution of Software at the
// master's in Software Engineering at the Faculty of Engineering of the University of Porto.
// Feel free to contact the author if any questions arise.
//
var assert = require('assert'),
webdriver = require('selenium-webdriver');

// This is just a simple test to see if selenium can communicate with chrome.
describe('Verify setup with Google Search', function () {
it('test case should work', function () {
var driver = new webdriver.Builder()
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -19,6 +19,7 @@
"chromedriver": "^101.0.0",
"clsx": "^1.1.1",
"contentful": "^9.0.0",
"coverage": "^0.4.1",
"cucumber": "^1.3.0",
"daisyui": "^1.14.0",
"firebase": "^9.8.0",
14,094 changes: 7,358 additions & 6,736 deletions yarn.lock

Large diffs are not rendered by default.