Skip to content
Merged
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-11756-tests-1741019349059.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Tests
---

Fix linting errors in additional directories in packages/manager/cypress/e2e ([#11756](https://github.com/linode/manager/pull/11756))
9 changes: 0 additions & 9 deletions packages/manager/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,6 @@ module.exports = {
'build',
'storybook-static',
'.storybook',
'e2e/core/longview',
'e2e/core/managed',
'e2e/core/nodebalancers',
'e2e/core/notificationsAndEvents',
'e2e/core/objectStorage',
'e2e/core/objectStorageGen2',
'e2e/core/objectStorageMulticluster',
'e2e/core/oneClickApps',
'e2e/core/parentChild',
'e2e/core/placementGroups',
'e2e/core/stackscripts',
'e2e/core/volumes',
Expand Down
3 changes: 2 additions & 1 deletion packages/manager/cypress/e2e/core/longview/longview.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,8 @@ describe('longview', () => {
.click();

cy.get(`[data-qa-longview-client="${client.id}"]`).within(() => {
cy.get(`[data-testid="textfield-input"]`).clear().type(newClient.label);
cy.get(`[data-testid="textfield-input"]`).clear();
cy.focused().type(newClient.label);
cy.get(`[aria-label="Save new label"]`).should('be.visible').click();
});

Expand Down
40 changes: 17 additions & 23 deletions packages/manager/cypress/e2e/core/managed/managed-contacts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,16 @@ describe('Managed Contacts tab', () => {
.within(() => {
cy.findByLabelText('Name', { exact: false })
.should('be.visible')
.click()
.type(contactName);
.click();
cy.focused().type(contactName);

cy.findByLabelText('E-mail', { exact: false })
.should('be.visible')
.click()
.type(contactEmail);
.click();
cy.focused().type(contactEmail);

cy.findByLabelText('Primary Phone')
.should('be.visible')
.click()
.type(contactPrimaryPhone);
cy.findByLabelText('Primary Phone').should('be.visible').click();
cy.focused().type(contactPrimaryPhone);

ui.buttonGroup
.findButtonByTitle('Add Contact')
Expand Down Expand Up @@ -173,21 +171,19 @@ describe('Managed Contacts tab', () => {
.within(() => {
cy.findByLabelText('Name', { exact: false })
.should('be.visible')
.click()
.clear()
.type(contactNewName);
.click();
cy.focused().clear();
cy.focused().type(contactNewName);

cy.findByLabelText('E-mail', { exact: false })
.should('be.visible')
.click()
.clear()
.type(contactNewEmail);
.click();
cy.focused().clear();
cy.focused().type(contactNewEmail);

cy.findByLabelText('Primary Phone')
.should('be.visible')
.click()
.clear()
.type(contactNewPrimaryPhone);
cy.findByLabelText('Primary Phone').should('be.visible').click();
cy.focused().clear();
cy.focused().type(contactNewPrimaryPhone);

ui.buttonGroup
.findButtonByTitle('Save Changes')
Expand Down Expand Up @@ -241,10 +237,8 @@ describe('Managed Contacts tab', () => {
.findByTitle(`Delete Contact ${contactName}?`)
.should('be.visible')
.within(() => {
cy.findByLabelText('Contact Name:')
.should('be.visible')
.click()
.type(contactName);
cy.findByLabelText('Contact Name:').should('be.visible').click();
cy.focused().type(contactName);

ui.buttonGroup
.findButtonByTitle('Delete Contact')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,16 @@ describe('Managed Credentials tab', () => {
.findByTitle('Add Credential')
.should('be.visible')
.within(() => {
cy.findByLabelText('Label')
.should('be.visible')
.click()
.type(credentialLabel);
cy.findByLabelText('Label').should('be.visible').click();
cy.focused().type(credentialLabel);

cy.findByLabelText('Username', { exact: false })
.should('be.visible')
.click()
.type(credentialUsername);
.click();
cy.focused().type(credentialUsername);

cy.findByLabelText('Password')
.should('be.visible')
.click()
.type(credentialPassword);
cy.findByLabelText('Password').should('be.visible').click();
cy.focused().type(credentialPassword);

ui.buttonGroup
.findButtonByTitle('Add Credential')
Expand Down Expand Up @@ -150,11 +146,9 @@ describe('Managed Credentials tab', () => {
.should('be.visible')
.within(() => {
// Update label.
cy.findByLabelText('Label')
.should('be.visible')
.click()
.clear()
.type(credentialNewLabel);
cy.findByLabelText('Label').should('be.visible').click();
cy.focused().clear();
cy.focused().type(credentialNewLabel);

ui.button
.findByTitle('Update label')
Expand All @@ -168,13 +162,11 @@ describe('Managed Credentials tab', () => {
// Update credentials.
cy.findByLabelText('Username', { exact: false })
.should('be.visible')
.click()
.type(randomString());
.click();
cy.focused().type(randomString());

cy.findByLabelText('Password')
.should('be.visible')
.click()
.type(randomString());
cy.findByLabelText('Password').should('be.visible').click();
cy.focused().type(randomString());

ui.button
.findByTitle('Update credentials')
Expand Down Expand Up @@ -232,10 +224,8 @@ describe('Managed Credentials tab', () => {
.findByTitle(`Delete Credential ${credentialLabel}?`)
.should('be.visible')
.within(() => {
cy.findByLabelText('Credential Name:')
.should('be.visible')
.click()
.type(credentialLabel);
cy.findByLabelText('Credential Name:').should('be.visible').click();
cy.focused().type(credentialLabel);

ui.buttonGroup
.findButtonByTitle('Delete Credential')
Expand Down
24 changes: 9 additions & 15 deletions packages/manager/cypress/e2e/core/managed/managed-monitors.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,9 @@ describe('Managed Monitors tab', () => {
.findByTitle('Edit Monitor')
.should('be.visible')
.within(() => {
cy.findByLabelText('Monitor Label')
.should('be.visible')
.click()
.clear()
.type(newLabel);
cy.findByLabelText('Monitor Label').should('be.visible').click();
cy.focused().clear();
cy.focused().type(newLabel);

mockUpdateServiceMonitor(1, newMonitor).as('updateMonitor');
mockGetServiceMonitors([newMonitor]).as('getMonitors');
Expand Down Expand Up @@ -183,14 +181,12 @@ describe('Managed Monitors tab', () => {
.within(() => {
cy.findByLabelText('Monitor Label', { exact: false })
.should('be.visible')
.click()
.type(monitorLabel);
.click();
cy.focused().type(monitorLabel);

// Can't `findByLabelText` because multiple elements with "URL" label exist.
cy.get('input[name="address"]')
.should('be.visible')
.click()
.type(monitorUrl);
cy.get('input[name="address"]').should('be.visible').click();
cy.focused().type(monitorUrl);

ui.buttonGroup
.findButtonByTitle('Add Monitor')
Expand Down Expand Up @@ -249,10 +245,8 @@ describe('Managed Monitors tab', () => {
.findByTitle(`Delete Monitor ${monitorLabel}?`)
.should('be.visible')
.within(() => {
cy.findByLabelText('Monitor Name:')
.should('be.visible')
.click()
.type(monitorLabel);
cy.findByLabelText('Monitor Name:').should('be.visible').click();
cy.focused().type(monitorLabel);

ui.buttonGroup
.findButtonByTitle('Delete Monitor')
Expand Down
22 changes: 8 additions & 14 deletions packages/manager/cypress/e2e/core/managed/managed-ssh.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,23 +135,17 @@ describe('Managed SSH Access tab', () => {
.findByTitle(`Edit SSH Access for ${linodeLabel}`)
.should('be.visible')
.within(() => {
cy.findByLabelText('User Account')
.should('be.visible')
.click()
.clear()
.type(newUser);
cy.findByLabelText('User Account').should('be.visible').click();
cy.focused().clear();
cy.focused().type(newUser);

// Set IP address to 'Any'.
cy.findByLabelText('IP Address')
.should('be.visible')
.click()
.type('Any{enter}');
cy.findByLabelText('IP Address').should('be.visible').click();
cy.focused().type('Any{enter}');

cy.findByLabelText('Port')
.should('be.visible')
.click()
.clear()
.type(`${newPort}`);
cy.findByLabelText('Port').should('be.visible').click();
cy.focused().clear();
cy.focused().type(`${newPort}`);

ui.button
.findByTitle('Save Changes')
Expand Down
Loading