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

E2e bring back skipped tests #1363

Merged
merged 17 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions e2e-testing/cypress/e2e/6-posts/posts.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,16 @@ describe('Automated Tests for Posts', () => {
postFunctions.fill_required_form_fields();
postFunctions.complete_add_post_steps();
postFunctions.verify_created_post_exists();
});

it.skip('Verifies post details', () => {
postFunctions.open_post_for_details();
postFunctions.verify_post_details();
});

it('Changes and verifies status of a post', () => {
postFunctions.open_post_creation_form();
postFunctions.fill_required_form_fields();
postFunctions.complete_add_post_steps();
postFunctions.change_post_status();
});
it.skip('Deletes a post', () => {
it('Deletes a post', () => {
postFunctions.delete_post();
});
});
14 changes: 9 additions & 5 deletions e2e-testing/cypress/functions/PostsFunctions/PostFunctions.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ class PostFunctions {
cy.get(PostLocators.postPreview)
.children(PostLocators.postItem)
.contains(this.postTitle)
.should('be.visible');
.should('be.visible')
.click();
}

open_post_for_details() {
Expand All @@ -72,7 +73,7 @@ class PostFunctions {
cy.get(DataViewLocators.revealFiltersBtn).click();
cy.get(DataViewLocators.clearFiltersBtn).click();

cy.get(PostLocators.postItem).eq(0).click();
cy.get(PostLocators.postItem).eq(0).click({ force: true });
}

verify_post_details() {
Expand All @@ -83,7 +84,8 @@ class PostFunctions {
//verify survey fields
cy.get(PostLocators.titleValue).should('contain', 'Automated Title Response');
cy.get(PostLocators.descriptionValue).should('contain', 'Automated Description Response');
cy.contains('Automated Short text').scrollIntoView().should('be.visible');
cy.get('[data-qa="posts"] > :nth-child(2)').scrollTo('bottom');
// cy.contains('Automated Short text').scrollIntoView().should('be.visible');
cy.contains('This is an automated long text response').should('be.visible');
cy.contains(99.9).should('be.visible');
cy.contains(100).should('be.visible');
Expand All @@ -99,10 +101,12 @@ class PostFunctions {
cy.get(DataViewLocators.revealFiltersBtn).click();
cy.get(DataViewLocators.clearFiltersBtn).click();

//select post
//verify post count to verify we are in correct post page
cy.get('[data-qa="feed-page-results"]').contains('Current results: 20 / 518');
cy.contains(this.postTitle).scrollIntoView();
cy.contains(this.postTitle).click();

//change post to be deleted to "New Post Title for Location"
cy.contains(this.postTitle).click({ force: true });

//delete post
cy.get(PostLocators.postMenuDots).eq(0).click();
Expand Down
Loading