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

chore(sto-bro): add filter locations e2e test #6113

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
13 changes: 13 additions & 0 deletions packages/e2e/cypress/integration/common/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,12 @@ Then('I see the button containing {string}', (name: string) => {
}).should('exist');
});

Then('I do not see the button containing {string}', (name: string) => {
cy.findByRole('button', {
name: new RegExp(`${escapeRegExp(name)}`, 'i'),
}).should('not.exist');
});

Then('I see the first button containing {string}', (name: string) => {
cy.findAllByRole('button', {
name: new RegExp(`${escapeRegExp(name)}`, 'i'),
Expand Down Expand Up @@ -546,6 +552,13 @@ When('I type my new password', () => {
cy.findInputField('New Password').type(Cypress.env('VALID_PASSWORD'));
});

When(
'I see input with placeholder {string} and type {string}',
(name: string, value: string) => {
cy.findByPlaceholderText(name).type(value);
}
);

Then('I click the submit button', () => {
/**
* Submit button text differs on React/Vue vs Angular. Testing for both for
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Feature: StorageBrowser Filter Locations

Background:
Given I'm running the example "ui/components/storage/storage-browser/default-auth"

@react
Scenario: Filter locations
When I type my "email" with status "CONFIRMED"
Then I type my password
Then I click the "Sign in" button
Then I see the first button containing "private"
When I see input with placeholder "Filter folders and files" and type "pu"
Then I click the "Submit" button
Then I see the first button containing "public"
Then I do not see the button containing "private"
When I click the button containing "Clear search"
Then I see the first button containing "private"

Loading