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

Add social tests #8

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Add social tests #8

wants to merge 5 commits into from

Conversation

SvetlanaVet
Copy link
Collaborator

No description provided.

Co-authored-by: breslavsky <breslavsky@users.noreply.github.com>
Copy link
Contributor

@breslavsky breslavsky left a comment

Choose a reason for hiding this comment

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

I like it, much better.

}
function waitForArticlesList() {
cy.get('@articleList')
.contains("div.article-preview", "Loading")
Copy link
Contributor

@breslavsky breslavsky Jan 26, 2023

Choose a reason for hiding this comment

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

  • fix double quotes to single
  • don't use none semantic tags as selectors .article-preview

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Is it right?
.contains('.article-preview', 'Loading')

.should('contain', 'Follow')
.click()
.as('followButton');
// TODO: improve css
Copy link
Contributor

Choose a reason for hiding this comment

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

CSS or selector?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

of course selector


function goToHomePage() {
cy.get('@appHeader')
.find('[show-authed=true] [ui-sref="app.home"]').as('buttonHome')
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we find better selector? Is it <a>?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

if use <a> then find two elements
https://disk.yandex.com/i/qKPV5o6XviIHlg

function deleteAllMyArticles() {
cy.get('@appHeader').find('[ui-sref*=username]').click();
debugger;
cy.wait(5000);
Copy link
Contributor

Choose a reason for hiding this comment

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

Add comment why do you need it here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't understand what is wrong! But without cy.wait(5000) it doesn't work. I tryed to use

cy.location('hash').should('eq', '#/@test_manual4');

or

cy.url().should("include", "#/@test_manual4");

but it doesn't work too
I attach video

https://www.awesomescreenshot.com/video/14393554?key=918860b78fd72922afa44bb567f51de3

Help me, please

cy.get('@articleList').find('.article-preview')
.then(articles => {
cy.log(articles.length);
if (articles.length > 2) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why 2? Why not 0?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we have two '.article-preview' when the page is empty
https://disk.yandex.com/i/tI8JGQJCKhwxXA

@breslavsky
Copy link
Contributor

@Vladimir4932 I need your approval here.

@breslavsky
Copy link
Contributor

@Vladimir4932 please tomorrow split this code to separated issues and pull requests for me:

  1. Subscribe to user test case
  2. Subscribe to user test
  3. Unsubscribe from user test case
  4. Unsubscribe from user test

@Vladimir-Tarasov
Copy link
Collaborator

@Vladimir4932 please tomorrow split this code to separated issues and pull requests for me:

  1. Subscribe to user test case
  2. Subscribe to user test
  3. Unsubscribe from user test case
  4. Unsubscribe from user test

Done. Check please.

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.

None yet

3 participants