Skip to content

Selenium Work flow enhancements #4065

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

Draft
wants to merge 49 commits into
base: development
Choose a base branch
from

Conversation

khaledyoussef24
Copy link
Contributor

Description

Selenium Work flow enhancements: make 'network' input a choice type for workflow_dispatch
The Selenium tests should be able to run against any of the following environments:

Changes

List of changes this PR includes

Related Issues

List of related issues

Tested Scenarios

A list of scenarios tried to match the deliverables

Documentation PR

For UI changes, Please provide the Documentation PR on info_grid

To consider

Preliminary Checks:

  • Preliminary Checks
    • Does it completely address the issue linked?
    • What about edge cases?
    • Does it meet the specified acceptance criteria?
    • Are there any unintended side effects?
    • Does the PR adhere to the team's coding conventions, style guides, and best practices?
    • Does it integrate well with existing features?
    • Does it impact the overall performance of the application?
    • Are there any bottlenecks or slowdowns?
    • Has it been optimized for efficiency?
    • Has it been adequately tested with unit, integration, and end-to-end tests?
    • Are there any known defects or issues?
    • Is the code well-documented?
    • Are changes to documentation reflected in the code?

UI Checks:

  • UI Checks
    • If a UI design is provided/ does it follow it?
    • Does every button work?
    • Is the data displayed logical? Is it what you expected?
    • Does every validation work?
    • Does this interface feel intuitive?
    • What about slow network? Offline?
    • What if the gridproxy/graphql/chain is failing?
    • What would a first time user have a hard time navigating here?

Code Quality Checks:

  • Code Quality Checks
    • Code formatted/linted? Are there unused imports? .. etc
    • Is there redundant/repeated code?
    • Are there conditionals that are always true or always false?
    • Can we write this more concisely?
    • Can we reuse this code? If yes, where?
    • Will the changes be easy to maintain and update in the future?
    • Can this code become too complex to understand for other devs?
    • Can this code cause future integration problems?

Testing Checklist

  • Does it Meet the specified acceptance criteria.
  • Test if changes can affect any other functionality.
  • Tested with unit, integration, and end-to-end tests.
  • Tested the un-happy path and rollback scenarios.
  • Documentation updated to meet the latest changes.
  • Check automated tests working successfully with the changes.
  • Can be covered by automated tests.

General Checklist

  • Tests included
  • Build pass
  • Documentation
  • Code format and docstring
  • Screenshots/Video attached (needed for UI changes)

Copy link
Contributor

@ramezsaeed ramezsaeed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please provide test runs results on mainnet and testnet

@@ -2,38 +2,77 @@ name: Playground Selenium Tests

on:
workflow_dispatch:
inputs:
branch:
description: "Select which Git branch to run against"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets unify our messages and use the same message like grid nigtly
"Use workflow from"

type: choice
default: "dev"
options:
- local
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The local option will run the dashboard server on which network?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will do a local lerna build and run locally;
and this was the originally daily night run.
but i think we don't need it anymore and better to run nightly run on staging.
what do you think ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, but it's not a network cause the local server could run against dev, qa, test, and main nets. Also, the branch option will only run the tests from this branch, but the source code will be based on the deployed website. So IMO, we should always run the server locally with the preferred network.

here is the guide to switch the network https://github.com/threefoldtech/tfgrid-sdk-ts/blob/development/packages/playground/docs/build.md#run-the-script

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what we can do is
keep the default nightly run install the server locally to have the same branch.

but for other networks don't see the point of that;
we can use the tests from any branch to run against any network release,
this will help us more in release actually.

but will keep your point only for nightly run on local build.

Comment on lines 46 to 61
- name: Set up Node.js 18
uses: actions/setup-node@v4
with:
node-version: 18
- name: Yarn install
run: yarn install
- name: Lerna Build
run: yarn lerna run build
- name: Yarn Serve
node-version: "18"

- name: Install JS dependencies & build
if: ${{ github.event.inputs.network == 'local' }}
run: |
yarn install
yarn lerna run build

- name: Start playground server
run: make run project=playground &
- name: Wait for localhost

- name: Wait for server to be ready
run: sleep 60
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these steps for running the local server, and only the install step has the condition if: ${{ github.event.inputs.network == 'local' }}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes these steps are needed only for launch the dashboard locally; instead of this in all other network we just use the dashboard URL.

Copy link
Contributor

@ramezsaeed ramezsaeed Apr 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed with Hanafy and Team; to add a flag to be used if want a local build against any specific network, and by default the nightly workflow will run against staging env.

@khaledyoussef24 khaledyoussef24 marked this pull request as draft May 6, 2025 11:26
Copy link
Contributor

@ramezsaeed ramezsaeed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ramezsaeed
Copy link
Contributor

work in progress:

  • Tested with act to run the github action jobs locally
  • still facing a lot of errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants