Skip to content

Commit

Permalink
Fix multiple submit bug
Browse files Browse the repository at this point in the history
Currently there are two submit type button in data source
which cause cypress fail to find and click. In this PR, I
switch to use data-test-subj to uniquely identify the btn.

Issue Resolved:
#439

Signed-off-by: Anan Zhuang <[email protected]>
  • Loading branch information
ananzh authored and kavilla committed May 18, 2023
1 parent 82270e4 commit b72bc25
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const commonUI = new CommonUI(cy);
* Test that table visualization can filter out value. Same as filter for value.
*/

describe('table visualization basic functions', () => {
describe('table visualization in embedded mode', () => {
const expectedData = [
'0',
'1,059',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,13 @@ if (Cypress.env('DATASOURCE_MANAGEMENT_ENABLED')) {
it('with no auth and all required inputs', () => {
cy.get('[name="dataSourceTitle"]').type('test_noauth');
cy.get('[name="endpoint"]').type(OSD_TEST_DOMAIN_ENDPOINT_URL);
<<<<<<< HEAD
cy.get('[data-test-subj="createDataSourceFormAuthTypeSelect"]').select(
'no_auth'
);
=======
cy.get('[for="no_auth"]').click();
>>>>>>> Fix multiple submit bug
cy.getElementByTestId('createDataSourceButton').click();

cy.location('pathname', { timeout: 6000 }).should(
Expand Down

0 comments on commit b72bc25

Please sign in to comment.