-
Notifications
You must be signed in to change notification settings - Fork 406
e2e - automatically update #477
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
Conversation
tests/e2e/package.json
Outdated
}, | ||
"devDependencies": { | ||
"@types/chance": "1.1.3", | ||
"@types/edit-json-file": "^1.7.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Always better to pin the version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
await t.expect(timestampAfterUpdate).notEql(timestampForEdit); | ||
await t.expect(cloudTitle).notEql(cloudValueForEdit); | ||
await t.expect(cloudDescription).notEql(cloudValueForEdit); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add error message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
const buildFilePathNew = editJsonFile(buildPath); | ||
const createRedisFilePathNew = editJsonFile(createRedisPath); | ||
//Check the promo button | ||
await t.expect(myRedisDatabasePage.promoButton.textContent).notContains(cloudValueForEdit, 'Promo button text is updated'); | ||
//Check the json files are automatically updated | ||
const timestampAfterUpdate = await buildFilePathNew.get('timestamp'); | ||
const cloudTitle = await createRedisFilePathNew.get('cloud.title'); | ||
const cloudDescription = await createRedisFilePathNew.get('cloud.description'); | ||
await t.expect(timestampAfterUpdate).notEql(timestampForEdit); | ||
await t.expect(cloudTitle).notEql(cloudValueForEdit); | ||
await t.expect(cloudDescription).notEql(cloudValueForEdit); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something here isn't clear enough.
Do the first two lines are apart of the test or pre requisite?
It's hard to understand from reading the code the test case, and I feel that in case the test will be fail, shouldn't be easy understand the bug (and if the bug is on the product or test).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these first two lines are necessary because the data that is in these files is cached and needs to be overwritten to get the updated information
I also added more comments to this test
No description provided.