fix test number check that increments
This commit is contained in:
10
README.md
10
README.md
@@ -52,7 +52,11 @@ Look below for the "test-all" instructions.
|
||||
|
||||
* Record what version is currently on production in docs.
|
||||
|
||||
* Run the correct build:
|
||||
* Get on the server and run the correct build:
|
||||
|
||||
* `cd crowd-funder-for-time-pwa && git pull`
|
||||
|
||||
* Previous command: `rsync -azvu -e "ssh -i ~/.ssh/..." dist ubuntutest@test.timesafari.app:time-safari`
|
||||
|
||||
* Staging
|
||||
|
||||
@@ -70,9 +74,7 @@ TIME_SAFARI_APP_TITLE="TimeSafari_Test" VITE_APP_SERVER=https://test.timesafari.
|
||||
npm run build
|
||||
```
|
||||
|
||||
* Get on the server and back up the time-safari/dist folder.
|
||||
|
||||
* `rsync -azvu -e "ssh -i ~/.ssh/..." dist ubuntutest@test.timesafari.app:time-safari`
|
||||
* Back up the time-safari/dist folder.
|
||||
|
||||
* Record the new hash in the changelog. Edit package.json to increment version & add "-beta", `npm install`, and commit. Also record what version is on production.
|
||||
|
||||
|
||||
@@ -77,7 +77,17 @@ test('Record an offer', async ({ page }) => {
|
||||
// go to the home page and check that the offer is shown as new
|
||||
await page.goto('./');
|
||||
const offerNumElem = page.getByTestId('newOffersToUserProjectsActivityNumber');
|
||||
await expect(offerNumElem).toHaveText('50+');
|
||||
// extract the number and check that it's greater than 0 or "50+"
|
||||
const offerNumText = await offerNumElem.textContent();
|
||||
if (offerNumText === null) {
|
||||
throw new Error('Expected Activity Number greater than 0 but got null.');
|
||||
} else if (offerNumText === '50+') {
|
||||
// we're OK
|
||||
} else if (parseInt(offerNumText) > 0) {
|
||||
// we're OK
|
||||
} else {
|
||||
throw new Error(`Expected Activity Number of greater than 0 but got ${offerNumText}.`);
|
||||
}
|
||||
|
||||
// click on the number of new offers to go to the list page
|
||||
await offerNumElem.click();
|
||||
|
||||
Reference in New Issue
Block a user