-
Notifications
You must be signed in to change notification settings - Fork 4
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: breslavsky <breslavsky@users.noreply.github.com>
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.
I like it, much better.
} | ||
function waitForArticlesList() { | ||
cy.get('@articleList') | ||
.contains("div.article-preview", "Loading") |
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.
- fix double quotes to single
- don't use none semantic tags as selectors
.article-preview
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.
Is it right?
.contains('.article-preview', 'Loading')
.should('contain', 'Follow') | ||
.click() | ||
.as('followButton'); | ||
// TODO: improve css |
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.
CSS or selector?
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.
of course selector
|
||
function goToHomePage() { | ||
cy.get('@appHeader') | ||
.find('[show-authed=true] [ui-sref="app.home"]').as('buttonHome') |
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.
Can we find better selector? Is it <a>
?
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.
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); |
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.
Add comment why do you need it here.
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.
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) { |
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.
Why 2
? Why not 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.
we have two '.article-preview'
when the page is empty
https://disk.yandex.com/i/tI8JGQJCKhwxXA
@Vladimir4932 I need your approval here. |
@Vladimir4932 please tomorrow split this code to separated issues and pull requests for me:
|
Done. Check please. |
No description provided.