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

Remove local dev banner when doing e2e tests #3256

Merged
merged 1 commit into from
Jun 8, 2020

Conversation

zhx828
Copy link
Member

@zhx828 zhx828 commented Jun 3, 2020

This is a part of fixes for cBioPortal/cbioportal#7561

@zhx828 zhx828 added the bug label Jun 3, 2020
@zhx828 zhx828 requested review from alisman and inodb June 3, 2020 03:20
Copy link
Member

@inodb inodb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one question about this. Overall seems cleaner using css, so that's good. I just recall there was one test that checks whether the devmode banner is shown. This tests whether the frontend is actually loaded inside the backend project. It would be good to continue to be able to confirm this. Otherwise we might not be certain that what we are testing is actually the frontend in the PR. Could be done in another way then using the banner I guess

@alisman
Copy link
Collaborator

alisman commented Jun 3, 2020

@inodb i think we could write that test to directly check the frontendConfig.frontendUrl variable

@alisman
Copy link
Collaborator

alisman commented Jun 3, 2020

@zhx828 based on screenshots it doesn't look like this worked. i think because .local-dev-banner is not actually applied to div. unfortunately that div is created in load_frontend.js of backend repo. Annoying. We might as well just move that to frontend. I mean the creation of that div.

@zhx828
Copy link
Member Author

zhx828 commented Jun 3, 2020

@alisman I added the class at the backend. We need to merge the backend to master and deploy before merging the frontend repo. cBioPortal/cbioportal#7573

@inodb
Copy link
Member

inodb commented Jun 3, 2020

@alisman checking frontendConfig.frontendUrl sounds good

Comment on lines +24 to +33
it('window.frontendConfig.frontendUrl should point to localhost 3000 when testing', function() {
// We no longer check whether the dev mode banner exits.
// The banner is hidden in e2etests.scss
assert.equal(
browser.execute(function() {
return window.frontendConfig.frontendUrl;
}).value,
'//localhost:3000/'
);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@inodb @alisman here is the updated test. Let me know whether I'm doing it right. Thank you.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks right to me

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

Update the local dev check

Signed-off-by: Hongxin Zhang <hongxin@cbio.mskcc.org>
@zhx828
Copy link
Member Author

zhx828 commented Jun 8, 2020

Three failing tests are not related to this pr.

@zhx828 zhx828 merged commit be94236 into cBioPortal:master Jun 8, 2020
@zhx828 zhx828 added test and removed bug labels Jun 9, 2020
@zhx828 zhx828 deleted the i-7561 branch June 20, 2020 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants