-
Notifications
You must be signed in to change notification settings - Fork 9
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
Feature/cypress test #148
Open
sudip-md
wants to merge
5
commits into
develop
Choose a base branch
from
feature/cypress-test
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+138
−6
Open
Feature/cypress test #148
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
852ffae
Modified and added new test cases
e9e2c84
Added new test cases
670e1c5
add and update new test cases
8c4e80c
Add create user in initialize.sh for E2E tests.
iamdharmesh 8c67f86
Merge branch 'develop' of github.com:10up/eight-day-week into feature…
iamdharmesh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#!/bin/bash | ||
npm run env run tests-wordpress "chmod -c ugo+w /var/www/html" | ||
npm run env run tests-cli "wp rewrite structure '/%postname%/' --hard" | ||
|
||
npm run env run tests-cli "wp user create editor [email protected] --user_pass=password --role=editor" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
describe('Article Status', () => { | ||
before(() => { | ||
cy.login(); | ||
}); | ||
|
||
it("Create Article Status", () => { | ||
cy.visit(`wp-admin/edit-tags.php?taxonomy=pi-article-status&post_type=print-issue`); | ||
cy.get('#tag-name').type('Active-01'); | ||
cy.get('#submit').click(); | ||
}); | ||
|
||
it("Edit Article Status", () => { | ||
cy.visit(`wp-admin/edit-tags.php?taxonomy=pi-article-status&post_type=print-issue`); | ||
cy.get('[aria-label="“Active-01” (Edit)"]').click(); | ||
cy.get('#name').clear(); | ||
cy.get('#name').type('Active-02') | ||
cy.get('.button').click(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above, Add a verification step to confirm status edited successfully. Could you please help to add verification steps for all the tests? |
||
}); | ||
|
||
it("Delete Article Status", () => { | ||
cy.visit(`wp-admin/edit-tags.php?taxonomy=pi-article-status&post_type=print-issue`); | ||
cy.get('[aria-label="“Active-02” (Edit)"]').click(); | ||
cy.get('.delete').click(); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
describe('Issue Status', () => { | ||
before(() => { | ||
cy.login(); | ||
}); | ||
|
||
it("Create Issue Status", () => { | ||
cy.visit(`wp-admin/edit-tags.php?taxonomy=print_issue_status&post_type=print-issue`); | ||
cy.get('#tag-name').type('Active-01'); | ||
cy.get('#submit').click(); | ||
}); | ||
|
||
it("Edit Issue Status", () => { | ||
cy.visit(`wp-admin/edit-tags.php?taxonomy=print_issue_status&post_type=print-issue`); | ||
cy.get('[aria-label="“Active-01” (Edit)"]').click(); | ||
cy.get('#name').clear(); | ||
cy.get('#name').type('Active-02') | ||
cy.get('.button').click(); | ||
}); | ||
|
||
it("Delete Issue Status", () => { | ||
cy.visit(`wp-admin/edit-tags.php?taxonomy=print_issue_status&post_type=print-issue`); | ||
cy.get('[aria-label="“Active-02” (Edit)"]').click(); | ||
cy.get('.delete').click(); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
describe('Publications', () => { | ||
before(() => { | ||
cy.login(); | ||
}); | ||
|
||
it("Create Publications", () => { | ||
cy.visit(`wp-admin/edit-tags.php?taxonomy=print_issue_publication&post_type=print-issue`); | ||
cy.get('#tag-name').type('Weekly Articles'); | ||
cy.get('#submit').click(); | ||
}); | ||
|
||
it("Edit Publications", () => { | ||
cy.visit(`wp-admin/edit-tags.php?taxonomy=print_issue_publication&post_type=print-issue`); | ||
cy.get('[aria-label="“Weekly Articles” (Edit)"]').click(); | ||
cy.get('#name').clear(); | ||
cy.get('#name').type('Monthly Articles') | ||
cy.get('.button').click(); | ||
}); | ||
|
||
it("Delete Publications", () => { | ||
cy.visit(`wp-admin/edit-tags.php?taxonomy=print_issue_publication&post_type=print-issue`); | ||
cy.get('[aria-label="“Monthly Articles” (Edit)"]').click(); | ||
cy.get('.delete').click(); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
describe('Check Custom Role', () => { | ||
before(() => { | ||
cy.login(); | ||
}); | ||
|
||
it("Change user role Role to Print Editor and remove Print Editor role", () => { | ||
cy.visit(`wp-admin/users.php`); | ||
cy.get('#user_2').click(); | ||
cy.get('[type="checkbox"]').check('2'); | ||
cy.get('#pp-print-role').select(2); | ||
cy.get('#changeit').click(); | ||
cy.get('#pp-print-role').select(1); | ||
cy.get('#changeit').click(); | ||
|
||
}); | ||
}); |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 might want to add a verification step here to confirm that the article status was created successfully.
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.
@iamdharmesh probably best if you help get things updated for this PR and merge in