-
Notifications
You must be signed in to change notification settings - Fork 10
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
[test] filters e2e #182
base: master
Are you sure you want to change the base?
[test] filters e2e #182
Changes from 2 commits
3814619
f055909
7a6790c
413b753
96f1d4c
1b3b029
325f5a2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* global describe */ | ||
/* global context */ | ||
/* global it */ | ||
/* global expect */ | ||
/* global cy */ | ||
/* eslint no-undef: "error" */ | ||
|
||
describe('Filters Testing', () => { | ||
context('Test for Filters Route', () => { | ||
it('Should be on Filters page', () => { | ||
cy.visit('/events'); | ||
cy.get('h3').should('contain', 'Welcome to Event Management'); | ||
}); | ||
}); | ||
context('Test for Organization Filters', () => { | ||
it('should have an arrow button', () => { | ||
cy.get( | ||
':nth-child(1) .Select .Select-control .Select-arrow-zone .Select-arrow', | ||
{ timeout: 30000 } | ||
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. timeouts should be defined as constants |
||
) //Gets the location of the Organisation field with a delay of 30000 | ||
.eq(0); | ||
// .click(); //Clicks the toggle button | ||
}); | ||
|
||
it('should select one option', () => { | ||
cy.get( | ||
':nth-child(1) .Select .Select-control .Select-arrow-zone .Select-arrow', | ||
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. selectors should be defined as constants |
||
{ timeout: 30000 } //gets the location with a delay of 30000 | ||
) | ||
.eq(0) | ||
.click(); | ||
cy.contains('NES').click(); //Selects the dropdown menu option | ||
}); | ||
|
||
it('should deselect option', () => { | ||
cy.get(':nth-child(1)>.Select-value-icon').click(); //Deselects one of the option | ||
}); | ||
|
||
it('should select multiple options', () => { | ||
cy.get( | ||
':nth-child(1) .Select .Select-control .Select-arrow-zone .Select-arrow', | ||
{ timeout: 30000 } //gets the location with a delay of 30000 | ||
) | ||
.eq(0) | ||
.click(); | ||
cy.contains('NES').click(); //Selects the dropdown menu option | ||
cy.get( | ||
':nth-child(1) .Select .Select-control .Select-arrow-zone .Select-arrow', | ||
{ timeout: 30000 } //gets the location with a delay of 30000 | ||
) | ||
.eq(0) | ||
.click(); | ||
cy.contains('Recurship').click(); //Selects the dropdown menu option | ||
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. Since you are testing against our live environment, it would be better to make generic asserts like (list contains atleast one item). |
||
}); | ||
|
||
it('should deselect all the options', () => { | ||
cy.get(':nth-child(1)>.Select-value-icon').click(); //Deselects one of the option | ||
cy.get('.Select-value-icon').click(); //Deselects both | ||
}); | ||
|
||
// cy.get('form .btn').click(); | ||
}); | ||
}); |
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.
im not sure what this test is actually testing. We are looking to test functionality not design.