-
Notifications
You must be signed in to change notification settings - Fork 33
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
Adding tests for Record view, request file, search #1488
base: master
Are you sure you want to change the base?
Conversation
webui/src/__tests__/common.js
Outdated
@@ -3,7 +3,7 @@ import Nightmare from 'nightmare'; | |||
jasmine.DEFAULT_TIMEOUT_INTERVAL=20*1000; | |||
|
|||
export const nightmareConfig = { | |||
// show: true, | |||
show: true, |
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.
Let's keep show: true
for debugging only
await login(page); | ||
// page.end(); | ||
} catch(e){ | ||
console.error(e); |
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 keep the indentation here consistent
|
||
await assertElementText(page, '#header-navbar-collapse > .user > li > a', USER_EMAIL); | ||
describe('User profile', function () { | ||
test('user can navigate to the profile page', async function() { |
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.
indentation error
let page = Nightmare(nightmareConfig).goto(B2SHARE_URL+'/records/47077e3c4b9f4852a40709e338ad4620'); | ||
|
||
await page.wait('.col-lg-6 .well .col-sm-12.list-unstyled li .col-sm-8') //Open Access | ||
.evaluate(function () { |
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.
a function for this pattern would be more readable (see assertElementText)
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.
yeah, I tried to use it, but most of the time it doesn't find the element :/ I know, doesn't make sense!
}); | ||
|
||
// Should move it after creating a new record with restrict access! | ||
// describe('A restricted published record', function () { |
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.
Commented this test for now, because there is no restricted record in the demo.
|
||
// await expect(page.url() == B2SHARE_URL+'/records/47077e3c4b9f4852a40709e338ad4620/abuse'); | ||
|
||
// await page.click(' .form-horizontal .row .col-sm-1 > #abusecontent ') //checked |
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.
It doesn't find the radio button, can you please take a look? @emanueldima
I just added the 'in progress' label because the tests don't run consistently on my system. Can you please try running them and check how it is on your side? @emanueldima |
This is my result:
I'll try to debug this while you're on holidays. |
No description provided.