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

Chore: Add test for internal presentation links #951

Merged
merged 4 commits into from
Mar 5, 2019
Merged

Chore: Add test for internal presentation links #951

merged 4 commits into from
Mar 5, 2019

Conversation

jeremypress
Copy link
Contributor

No description provided.

@boxcla
Copy link

boxcla commented Mar 5, 2019

Verified that @jeremypress has signed the CLA. Thanks for the pull request!

ConradJChan
ConradJChan previously approved these changes Mar 5, 2019
cy.contains('LINK TO PAGE 1')

// Internal links should be rendered with <a> tags by PDF.js
cy.get('.bp-content a').click();
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it make sense to do a getByTestId('bp-content').find('a') instead since we have been trying to avoid querying by css classes?

ConradJChan
ConradJChan previously approved these changes Mar 5, 2019
cy.showPreview(token, fileWithLinksId);

// Assert document content is present and clickable
cy.contains('LINK TO PAGE 1')
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this a link to page 1 or page 3? Also missing a semicolon here.

cy.showPreview(token, fileWithLinksId);

// Assert document content is present and clickable
cy.contains('LINK TO PAGE 3');
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe you may be able to do cy.contains('LINK TO PAGE 3').click(); as a single statement.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For links to work in preview with PPTs, you have to add a shape, so the text isn't actually clickable.

@jeremypress jeremypress merged commit ebb6e75 into box:master Mar 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants